HGLOBAL AllocResource(hinst, hrsrc, cbResource) | |||||
HINSTANCE hinst; | /* handle of module containing resource | */ | |||
HRSRC hrsrc; | /* handle of resource, */ | ||||
DWORD cbResource; | /* size to allocate, or zero | */ |
The AllocResource function allocates uninitialized memory for the given resource.
hinst
Identifies the instance of the module whose executable file contains the resource.
hrsrc
Identifies the desired resource. This handle should have been created by using the FindResource function.
cbResource
Specifies the size, in bytes, of the memory object to allocate for the resource. If this parameter is zero, Windows allocates enough memory for the specified resource.
The return value is the handle of the global memory object if the function is successful.