다음을 통해 공유


CommonDialog.ShowSelectDevice method

Displays a dialog box that enables the user to select a hardware device for image acquisition.

Syntax

ppResult = .ShowSelectDevice( _
  [ ByVal DeviceType As WiaDeviceType ], _
  [ ByVal AlwaysSelectDevice As VARIANT_BOOL ], _
  [ ByVal CancelError As VARIANT_BOOL ] _
) As HRESULT

Parameters

DeviceType [in, optional]

Type: WiaDeviceType

WiaDeviceType value.

Value Meaning
UnspecifiedDeviceType
Default. The device type is unknown.

AlwaysSelectDevice [in, optional]

Type: VARIANT_BOOL

Boolean value that indicates whether to always show the select device dialog box.

Value Meaning
False
Default. Do not show the select device dialog box.
True
Show the select device dialog box.

CancelError [in, optional]

Type: VARIANT_BOOL

Boolean value that indicates whether to generate an error if the user cancels the dialog box.

Value Meaning
False
Default. Do not generate an error.
True
Generate an error.

Return value

Type: Device**

Returns the selected Device object on success, otherwise returns Nothing.

Remarks

For example code, see Take a Picture in Shared Samples.

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

Reference

CommonDialog

ShowAcquireImage

ShowAcquisitionWizard

ShowDeviceProperties

ShowSelectItems

Device

Type (Device)

Connect

Type (DeviceInfo)

Device (VideoPreview)