Oops--I had the wrong things commented out.  The call to
MemPtrRecoverHandle is what's crashing, not the DmReleaseRecord.

This leads to another question: why can't the handle be recovered properly?
Is there something about handles, locked handles, and recovering handles
that I don't know and should know.

Thanks,
Dan Hewins
Synergy Solutions, Inc.





I narrowed the problem down to one call.  I have a few bitmaps that I use
over and over again in my app so in StartApplication I do the following for
each one:

        resH = DmGetResource(bitmapRsc, TriggerClosedBitmap);
        ErrFatalDisplayIf(!resH, "Missing Closed Trigger bitmap");
        TriggerClosed = MemHandleLock(resH);

Then from my StopApplication id do this for each one:

        resH = MemPtrRecoverHandle(TriggerClosed);
        ErrFatalDisplayIf(!resH, "Missing Closed Trigger bitmap");
        MemHandleUnlock(resH);
        DmReleaseResource(resH);


Reply via email to