>This is fine, but more efficient (and less code) would be to replace the
>last line with
> MemPtrUnlock(bitmapP);
Done Speed wasn't an issue with this particular code bit since it will get
executed rather infrequently. I just though I could avoid using an extra
Handle but wasn't sure if I was violating something with the OS.
>More correct code would be to add a line which calls DmReleaseResource on
>the original handle. So far that isn't necessary, but I shudder to think
>how many apps would have trouble if it was in fact made necessary.
So far all my other apps except this one instance do call
DmReleaseResource, I guess I'll add the line
Thanks
Dave
-----Original Message-----
From: David Fedor <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, April 15, 1999 3:52 PM
Subject: Re: Is this legal?
>>BitmapPtr bitmapP;
>>
>>bitmapP = (BitmapPtr) MemHandleLock(DmGetResource('Tbmp',1300));
>>WinDrawBitmap(bitmapP,X,Y);
>>MemHandleUnlock(DmGetResource('Tbmp',1300);
>>
>>Specifically do I need to assign the result from DmGetResource to
VoidHandle
>>or will it work as is. So far it compiles and runs correctly.
>
>
>This is fine, but more efficient (and less code) would be to replace the
>last line with
> MemPtrUnlock(bitmapP);
>
>More correct code would be to add a line which calls DmReleaseResource on
>the original handle. So far that isn't necessary, but I shudder to think
>how many apps would have trouble if it was in fact made necessary.
>
>-David Fedor
>Palm Developer Support
>
>
>
>