IWiaEventCallback::ImageEventCallback method (wia_xp.h)

The IWiaEventCallback::ImageEventCallback method is invoked by the Windows Image Acquisition (WIA) run-time system when a hardware device event occurs.

Syntax

HRESULT ImageEventCallback(
  [in]      const GUID *pEventGUID,
  [in]      BSTR       bstrEventDescription,
  [in]      BSTR       bstrDeviceID,
  [in]      BSTR       bstrDeviceDescription,
  [in]      DWORD      dwDeviceType,
  [in]      BSTR       bstrFullItemName,
  [in, out] ULONG      *pulEventType,
  [in]      ULONG      ulReserved
);

Parameters

[in] pEventGUID

Type: const GUID*

Specifies the unique identifier of the event. For a complete list of device events, see WIA Event Identifiers.

[in] bstrEventDescription

Type: BSTR

Specifies the string description of the event.

[in] bstrDeviceID

Type: BSTR

Specifies the unique identifier of the WIA device.

[in] bstrDeviceDescription

Type: BSTR

Specifies the string description of the device.

[in] dwDeviceType

Type: DWORD

Specifies the type of the device. See WIA Device Type Specifiers for a list of possible values.

[in] bstrFullItemName

Type: BSTR

Specifies the full name of the WIA item that represents the device.

[in, out] pulEventType

Type: ULONG*

Pointer to a ULONG that specifies whether an event is a notification event, an action event, or both. A value of 1 indicates a notification event, a value of 2 indicates an action event, and a value of 3 indicates that the event is of both notification and action type.

[in] ulReserved

Type: ULONG

Reserved for user information.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

To receive notification of WIA hardware device events, applications pass a pointer to the IWiaEventCallback interface to the RegisterEventCallbackInterface method. The WIA run-time system then uses that interface pointer to invoke the IWiaEventCallback::ImageEventCallback method whenever a WIA hardware device event occurs.

Note that there is no guarantee the callback will be invoked on the same thread that registered the IWiaEventCallback interface.

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