LockResource

  LPVOID LockResource(hglb)    
  HGLOBAL hglb; /* identifies resource to lock */

The LockResource function locks the specified resource. The resource is locked in memory.

Parameters

hglb

Identifies the resource to be locked. The LoadResource function returns this handle.

Return Value

The return value points to the first byte of the loaded resource if the resource was locked. Otherwise, it is NULL.

Comments

Win32 applications do not have to unlock resources locked with the LockResource function.

Trying to lock a resource with the handle returned by FindResource or FindResourceEx causes an error.

See Also

FindResource, FindResourceEx, LoadResource