LoadResource
The LoadResource
function loads the specified resource into global memory.
HGLOBAL LoadResource(
HMODULE hModule, |
// resource-module
handle |
HRSRC hResInfo |
// resource handle |
); |
|
Parameters
hModule
Identifies
the module whose executable file contains the resource. If hModule is
NULL, Windows loads the resource from the module that was used to create the
current process.
hResInfo
Identifies
the resource to be loaded. This handle must be created by using the FindResource
Return Values
If the
function succeeds, the return value is a handle to the global memory block
containing the data associated with the resource.
If the
function fails, the return value is NULL. To get extended error information,
call GetLastError
Remarks
Both Windows
95 and Windows NT automatically free resources. You do not need to call the FreeResource
function to free a resource loaded by using the LoadResource function.
See Also