FreeResource

2.x

  BOOL FreeResource(hglbResource)    
  HGLOBAL hglbResource; /* handle of loaded resource */

The FreeResource function decrements (decreases by one) the reference count of a loaded resource. When the reference count reaches zero, the memory occupied by the resource is freed.

Parameters

hglbResource

Identifies the data associated with the resource. The handle is assumed to have been created by using the LoadResource function.

Return Value

The return value is zero if the function is successful. Otherwise, it is nonzero, indicating that the function has failed and the resource has not been freed.

Comments

The reference count for a resource is incremented (increased by one) each time an application calls the LoadResource function for the resource.

See Also

LoadResource