Skip to content

Latest commit

 

History

History
139 lines (106 loc) · 5.37 KB

nf-wia_xp-iwiadevmgr-selectdevicedlg.md

File metadata and controls

139 lines (106 loc) · 5.37 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wia_xp.IWiaDevMgr.SelectDeviceDlg
IWiaDevMgr::SelectDeviceDlg (wia_xp.h)
The IWiaDevMgr::SelectDeviceDlg displays a dialog box that enables the user to select a hardware device for image acquisition.
IWiaDevMgr interface [WIA]
SelectDeviceDlg method
IWiaDevMgr.SelectDeviceDlg
IWiaDevMgr::SelectDeviceDlg
SelectDeviceDlg
SelectDeviceDlg method [WIA]
SelectDeviceDlg method [WIA]
IWiaDevMgr interface
_wia_IWiaDevMgr_SelectDeviceDlg
wia._wia_IWiaDevMgr_SelectDeviceDlg
wia_xp/IWiaDevMgr::SelectDeviceDlg
wia\_wia_IWiaDevMgr_SelectDeviceDlg.htm
wia
VS|wia|~\wia\refwia\ifaces\iwiadevmgr\selectdevicedlg.htm
12/05/2018
IWiaDevMgr interface [WIA],SelectDeviceDlg method, IWiaDevMgr.SelectDeviceDlg, IWiaDevMgr::SelectDeviceDlg, SelectDeviceDlg, SelectDeviceDlg method [WIA], SelectDeviceDlg method [WIA],IWiaDevMgr interface, _wia_IWiaDevMgr_SelectDeviceDlg, wia._wia_IWiaDevMgr_SelectDeviceDlg, wia_xp/IWiaDevMgr::SelectDeviceDlg
wia_xp.h
Wia.h
Windows
Windows 2000 Professional, Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
Wiaguid.lib
Wiaservc.dll
Windows
19H1
IWiaDevMgr::SelectDeviceDlg
wia_xp/IWiaDevMgr::SelectDeviceDlg
c++
APIRef
kbSyntax
COM
Wiaservc.dll
IWiaDevMgr.SelectDeviceDlg

IWiaDevMgr::SelectDeviceDlg

-description

The IWiaDevMgr::SelectDeviceDlg displays a dialog box that enables the user to select a hardware device for image acquisition.

-parameters

-param hwndParent [in]

Type: HWND

Handle of the window that owns the Select Device dialog box.

-param lDeviceType [in]

Type: LONG

Specifies which type of WIA device to use. Can be set to StiDeviceTypeDefault, StiDeviceTypeScanner, or StiDeviceTypeDigitalCamera.

-param lFlags [in]

Type: LONG

Specifies dialog box behavior. Can be set to any of the following values:

Constant Meaning
0 Use the default behavior.
WIA_SELECT_DEVICE_NODEFAULT Display the dialog box even if there is only one matching device. For more information, see the Remarks section of this reference page.

-param pbstrDeviceID [in, out]

Type: BSTR*

On output, receives a string which contains the device's identifier string. On input, pass the address of a pointer if this information is needed, or NULL if it is not needed.

-param ppItemRoot [out, retval]

Type: IWiaItem**

Receives the address of a pointer to the IWiaItem interface of the root item of the tree that represents the selected WIA device. If no devices are found, it contains the value NULL.

-returns

Type: HRESULT

This method returns the following values:

Return Value Meaning
S_OK A device was successfully selected.
S_FALSE The user canceled the dialog box.
WIA_S_NO_DEVICE_AVAILABLE There are no WIA hardware devices that match the specifications given in the lDeviceType parameter.

-remarks

This method creates and displays the Select Device dialog box so the user can select a WIA device for image acquisition. If a device is successfully selected, the IWiaDevMgr::SelectDeviceDlg method creates a hierarchical tree of IWiaItem objects for the device. It stores a pointer to the IWiaItem interface of the root item in the parameter ppItemRoot.

Particular types of devices may be displayed to the user by specifying the device types through the lDeviceType parameter. If only one device meets the specification, IWiaDevMgr::SelectDeviceDlg does not display the Select Device dialog box. Instead it creates the IWiaItem tree for the device and store a pointer to the IWiaItem interface of the root item in the parameter ppItemRoot. You can override this behavior and force IWiaDevMgr::SelectDeviceDlg to display the Select Device dialog box by passing WIA_SELECT_DEVICE_NODEFAULT as the value for the lFlags parameter.

If more than one WIA device matches the specification, all matching devices are displayed in the Select Device dialog box so the user may choose one.

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

It is recommended that applications make device and image selection available through a menu item named From scanner or camera on the File menu.