IWiaDevMgr::RegisterEventCallbackInterface method (wia_xp.h)
The IWiaDevMgr::RegisterEventCallbackInterface method registers a running application Windows Image Acquisition (WIA) event notification.
Syntax
HRESULT RegisterEventCallbackInterface(
[in] LONG lFlags,
[in] BSTR bstrDeviceID,
[in] const GUID *pEventGUID,
[in] IWiaEventCallback *pIWiaEventCallback,
[out] IUnknown **pEventObject
);
Parameters
[in] lFlags
Type: LONG
Currently unused. Should be set to zero.
[in] bstrDeviceID
Type: BSTR
Specifies a device identifier. Pass NULL to register for the event on all WIA devices.
[in] pEventGUID
Type: const GUID*
Specifies the event for which the application is registering. For a list of standard events, see WIA Event Identifiers.
[in] pIWiaEventCallback
Type: IWiaEventCallback*
Pointer to the IWiaEventCallback interface that the WIA system used to send the event notification.
[out] pEventObject
Type: IUnknown**
Receives the address of a pointer to the IUnknown interface.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Applications use the EnumRegisterEventInfo method to retrieve a pointer to an enumerator object for event registration properties.
An application can find whether an event is an action type or notification type (or both) event by examining the ulFlags value of a WIA_DEV_CAP structure returned by event enumeration.
Applications can unregister for events by using the IUnknown pointer returned through the pEventObject parameter to call the IUnknown::Release method.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | wia_xp.h (include Wia.h) |
Library | Wiaguid.lib |
DLL | Wiaservc.dll |