SetResourceHandler

2.x

  RSRCHDLRPROC SetResourceHandler(hinst, lpszType, lpLoadProc)    
  HINSTANCE hinst; /* handle of application instance */
  LPCSTR lpszType; /* address of resource-type identifier */
  RSRCHDLRPROC lpLoadProc; /* callback procedure-instance address */

The SetResourceHandler function installs a callback function that loads resources.

Parameters

hinst

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

lpszType

Points to a null-terminated string that specifies a resource type. For predefined resource types, the high-order word should be zero and the low-order word should indicate the resource type.

lpLoadProc

Specifies the procedure-instance address of the application-supplied callback function. For more information, see the description of the LoadProc callback function.

Return Value

The return value is a pointer to the previously installed resource handler, if the function is successful. If no resource handler has been explicitly installed, the return value is a pointer to the default resource handler.

Comments

An application may find this function useful for handling its own resource types, but the use of this function is not required.

The address passed as the lpLoadProc parameter must be created by using the MakeProcInstance function.

See Also

FindResource, LoadProc, LockResource, MakeProcInstance