LoadProc

2.x

  HGLOBAL CALLBACK LoadProc(hglbMem, hinst, hrsrcResInfo)    
  HGLOBAL hglbMem; /* handle of object containing resource */
  HINSTANCE hinst; /* handle of application instance */
  HRSRC hrsrcResInfo; /* handle of a resource */

The LoadProc function is an application-defined callback function that receives information about a resource to be locked and can process that information as needed.

Parameters

hglbMem

Identifies a memory object that contains a resource. This parameter is NULL if the resource has not yet been loaded.

hinst

Identifies the instance of the module whose executable file contains the resource.

hrsrcResInfo

Identifies the resource. The resource must have been created by using the FindResource function.

Return Value

The return value is a global memory handle for memory that was allocated using the GMEM_DDESHARE flag in the GlobalAlloc function.

Comments

If an attempt to lock the memory object identified by the hglbMem parameter fails, this means the resource has been discarded and must be reloaded.

LoadProc is a placeholder for the application-defined function name. The actual name must be exported by including it in an EXPORTS statement in the application's module-definition file.

See Also

FindResource, GlobalAlloc, SetResourceHandler