windows_programming_notes.nbk: Home | Index | Next Page: LOGBRUSH | Previous Page: LoadResource
Locks the specified resource in memory.
LPVOID LockResource( HGLOBAL hResData );
If the loaded resource is locked, the return value is a pointer to the first byte of the resource; otherwise, it is NULL.
The pointer returned by LockResource is valid until the module containing the resource is unloaded. It is not necessary to unlock resources because the system automatically deletes them when the process that created them terminates.
Do not try to lock a resource by using the handle returned by the FindResource or FindResourceEx function. Such a handle points to random data.
windows_programming_notes.nbk: Home | Index | Next Page: LOGBRUSH | Previous Page: LoadResource
Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time