IWiaItem::DeviceDlg method (wia_xp.h)
The IWiaItem::DeviceDlg method is used by applications to display a dialog box to the user to prepare for image acquisition.
Syntax
HRESULT DeviceDlg(
[in] HWND hwndParent,
[in] LONG lFlags,
[in] LONG lIntent,
[out] LONG *plItemCount,
[out] IWiaItem ***ppIWiaItem
);
Parameters
[in] hwndParent
Type: HWND
Handle of the parent window of the dialog box.
[in] lFlags
Type: LONG
Specifies a set of flags that control the dialog box's operation. Can be set to any of the following values:
Flag | Meaning |
---|---|
0 | Default behavior. |
WIA_DEVICE_DIALOG_SINGLE_IMAGE | Restrict image selection to a single image in the device image acquisition dialog box. |
WIA_DEVICE_DIALOG_USE_COMMON_UI | Use the system UI, if available, rather than the vendor-supplied UI. If the system UI is not available, the vendor UI is used. If neither UI is available, the function returns E_NOTIMPL. |
[in] lIntent
Type: LONG
Specifies what type of data the image is intended to represent. For a list of image intent values, see Image Intent Constants.
[out] plItemCount
Type: LONG*
Receives the number of items in the array indicated by the ppIWiaItem parameter.
[out] ppIWiaItem
Type: IWiaItem***
Receives the address of an array of pointers to IWiaItem interfaces.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
This method displays a dialog box to the user that an application uses to gather all the information required for image acquisition. For instance, this dialog box enables the user to select images to download from a camera. When using a scanner, it is also used to specify image scan properties such as brightness and contrast.
After this method returns, the application can use the IWiaDataTransfer interface to acquire the image.
Applications must call the IUnknown::Release method for each element in the array of interface pointers they receive through the ppIWiaItem parameter. Applications must also free the array using CoTaskMemFree.
It is recommended that applications make device and image selection available through a menu item named From scanner or camera on the File menu.
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 |