Registers a function to be called with imaging-specific data. For information about the messages that can be handled, see Messages.

DWORD
WINAPI
WIMRegisterMessageCallback(
	HANDLE   hWim
	FARPROC  fpMessageProc,
	PVOID	pvUserData
	);

Parameters

hWim

[in opt] The handle to a .wim file returned by WIMCreateFile.

fpMessageProc

[in] A pointer to an application-defined callback function. For more information, see the WIMMessageCallback function.

pvUserData

[in] A pointer that specifies an application-defined value to be passed to the callback function.

Return Value

If the function succeeds, then the return value is the zero-based index of the callback. If the function fails, then the return value is INVALID_CALLBACK_VALUE (0xFFFFFFFF). To obtain extended error information, call the GetLastError function.

Remarks

If a WIM handle is specified, the callback function receives messages for only that WIM file. If no handle is specified, then the callback function receives messages for all image handles.

Call the WIMUnregisterMessageCallback function when the callback function is no longer required.

See Also