BOOL FreeResource(hResData)
This function removes a loaded resource from memory by freeing the allocated memory occupied by that resource.
The FreeResource function does not actually free the resource until the reference count is zero (that is, the number of calls to the function equals the number of times the application called the LoadResource function for this resource). This ensures that the data remain in memory for the application to use.
Parameter | Type/Description |
hResData | HANDLE Identifies the data associated with the resource. The handle is assumed to have been created by using the LoadResource function. |
The return value specifies the outcome of the function. The return value is nonzero if the function has failed and the resource has not been freed. The return value is zero if the function is successful.