Share via


CommandID Constants

Specifies common Device and Item commands as String versions of GUIDs.

Constant/value Description
wiaCommandSynchronize
{9B26B7B2-ACAD-11D2-A093-00C04F72DC3C}
CommandID for Synchronize. Causes the device driver to synchronize cached items with the hardware device.
wiaCommandTakePicture
{AF933CAC-ACAD-11D2-A093-00C04F72DC3C}
CommandID for Take Picture. Causes a WIA device to acquire an image.
wiaCommandDeleteAllItems
{E208C170-ACAD-11D2-A093-00C04F72DC3C}
CommandID for Delete All Items. Notifies the device to delete all items that can be deleted from the device.
wiaCommandChangeDocument
{04E725B0-ACAE-11D2-A093-00C04F72DC3C}
CommandID for Change Document. Causes the document scanner to load the next page in its document handler. Does not apply to other device types.
wiaCommandUnloadDocument
{1F3B3D8E-ACAE-11D2-A093-00C04F72DC3C}
CommandID for Unload Document. Notifies the document scanner to unload all remaining pages in its document handler. Does not apply to other device types.

Remarks

Use a CommandID Constants constant as the value for the CommandID parameter for the ExecuteCommand (Device) and ExecuteCommand (Item) methods. You can also use a CommandID Constants constant as the value of the CommandID properties in a DeviceCommand object.

The following example shows how to signal a camera to take a picture if the device selected is a camera.

Dim dev 'As Device

Set dev = CommonDialog1.ShowSelectDevice

If dev.Type = CameraDeviceType Then
    Dim itm 'As Item
    
    Set itm = dev.ExecuteCommand(wiaCommandTakePicture)
End If

Similar to the previous code example, the following example shows how to determine if the selected device supports the wiaCommandTakePicture command.

Dim dev 'As Device
Dim dc 'As DeviceCommand

Set dev = CommonDialog1.ShowSelectDevice
For Each dc In dev.Commands
    If dc.CommandID = wiaCommandTakePicture Then
        MsgBox "Selected device supports the TakePicture command"
    End If
End If

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 R2 [desktop apps only]
Header
Wiaaut.h
IDL
Wiaaut.idl

See also

CommandID