IWiaItem2::DeviceDlg method

Displays a dialog box to the user to prepare for image acquisition.

Syntax

HRESULT DeviceDlg(
  [in]      LONG      lFlags,
  [in]      HWND      hwndParent,
  [in]      BSTR      bstrFolderName,
  [in]      BSTR      bstrFilename,
  [in]      LONG      *plNumFiles,
  [in, out] BSTR      **ppbstrFilePaths,
  [in, out] IWiaItem2 **ppIWiaItem2
);

Parameters

lFlags [in]

Type: LONG

Specifies a set of flags that control the dialog box's operation. The value can be either 0 to represent the default behavior or any of the WIA_DEVICE_DIALOG flags described in WiaFlag.

hwndParent [in]

Type: HWND

A handle to the parent window.

bstrFolderName [in]

Type: BSTR

Specifies the folder name where the files are to be transferred.

bstrFilename [in]

Type: BSTR

Specifies the template file name.

plNumFiles [in]

Type: LONG*

A pointer to the number of items in the ppbstrFilePaths array.

ppbstrFilePaths [in, out]

Type: BSTR**

The address of a pointer to an array of paths for the scanned files. Initialize the pointer to point to an array of size zero (0) before IWiaItem2::DeviceDlg is called.

ppIWiaItem2 [in, out]

Type: IWiaItem2**

The address of an array of pointers to IWiaItem2 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. It is also used to specify image scan properties such as brightness and contrast.

After this method returns, the application can use the IWiaTransfer 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 ppIWiaItem2 parameter. Applications must also free the array using CoTaskMemFree.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Wia.h
IDL
Wia.idl