IWiaItem::DeviceCommand method (wia_xp.h)
The IWiaItem::DeviceCommand issues a command to a Windows Image Acquisition (WIA) hardware device.
Syntax
HRESULT DeviceCommand(
[in] LONG lFlags,
[in] const GUID *pCmdGUID,
[in, out] IWiaItem **pIWiaItem
);
Parameters
[in] lFlags
Type: LONG
Currently unused. Should be set to zero.
[in] pCmdGUID
Type: const GUID*
Specifies a unique identifier that specifies the command to send to the WIA hardware device. For a list of valid device commands, see WIA Device Commands.
[in, out] pIWiaItem
Type: IWiaItem**
On output, this pointer points to the item created by the command, if any.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Applications use this method to send WIA commands to hardware devices.
When the application sends the WIA_CMD_TAKE_PICTURE command to the device, IWiaItem::DeviceCommand, the WIA run-time system creates the IWiaItem object to represent the image. The IWiaItem::DeviceCommand method stores the address of the interface in the pIWiaItem parameter.
Applications must call the IUnknown::Release method on the interface pointers they receive through the pIWiaItem parameter.
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 |