RH>If I allocate global memory using the Windows 3.1-API
RH>function HANDLE GlobalAlloc(WORD, DWORD), what do I do with
RH>the returned handle?
You have to lock the memory into place with the GlobalLock function.
Later you'll have to unlock it with the GlobalUnlock. The handle
indicates allocated memory but it can be moved around while locked
memory can't - I think it has something to do with descriptors (no
segments in protected mode). Anyways, GlobalLock returns the pointer to
our memory location.
LPSTR GlobalLock(HANDLE);
PS. Define STRICT before you compile your program. This will enable
tighter syntax checking. :)
Hope that helps!
* SLMR 2.1a * I'm in shape ... round's a shape isn't it?
--- FMail 0.92
---------------
* Origin: The Programmer's Oasis on FIDONET! (1:348/203)
|