IWiaItem2::DeviceCommand method

Issues a command to a Windows Image Acquisition (WIA) 2.0 hardware device.

Syntax

HRESULT DeviceCommand(
  [in]            LONG      lFlags,
  [in]      const GUID      *pCmdGUID,
  [in, out]       IWiaItem2 **ppIWiaItem2
);

Parameters

lFlags [in]

Type: LONG

Currently unused. Should be set to zero.

pCmdGUID [in]

Type: const GUID*

Specifies the command to send to the WIA 2.0 device. See WIA Device Commands.

ppIWiaItem2 [in, out]

Type: IWiaItem2**

Receives the address of a pointer to the IWiaItem2 item created by the command, if any.

Return value

Type: HRESULT

In addition to the standard COM error codes, the method may return the following value.

Return code Description
E_CMDNOTSUPPORTED
The command is not implemented for the IWiaItem2 interface on which the method is called. The numeric value for this error is not yet defined.

 

Remarks

The behavior of this method is different depending on the category of the node on which the method is called.

When the application sends the WIA_CMD_TAKE_PICTURE command to the device using the IWiaItem2::DeviceCommand method, the WIA 2.0 run-time system creates an IWiaItem2 object to represent the image. The IWiaItem2::DeviceCommand method stores the address of the interface in the ppIWiaItem2 parameter.

Applications must call the IUnknown::Release method on the interface pointers they receive through the ppIWiaItem2 parameter.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Wia.h
IDL
Wia.idl