Platforms to show: All Mac Windows Linux Cross-Platform

Back to WIADeviceManager2MBS class.

WIADeviceManager2MBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 10.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Creates a new WIA 2.0 manager object.
Example
dim DeviceManager as new WIADeviceManager2MBS

if 0 = DeviceManager.Handle then
MsgBox "Failed to initialize device manager."
else
MsgBox "OK"
end if

WIADeviceManager2MBS.CreateDevice(DeviceID as string) as WIAItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 10.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Creates a hierarchical tree of WiaItem objects for a Windows Image Acquisition device.

DeviceID: Specifies the unique identifier of the WIA device.

Lasterror is set.

Applications use the CreateDevice method to create a device object for the WIA devices specified by the DeviceID parameter.

Returns the WIAItemMBS object for the root item. Applications can use this tree of objects to control and retrieve data from the WIA device.

WIADeviceManager2MBS.EnumDeviceInfo(flags as Integer = &h10) as WIADeviceInfoEnumeratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 10.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Creates an enumerator of property information for each available Windows Image Acquisition device.
Example
dim DeviceManager2 as new WIADeviceManager2MBS

// Enumerate all local devices
dim e as WIADeviceInfoEnumeratorMBS = DeviceManager2.EnumDeviceInfo(DeviceManager2.kEnumLocal)
if e<>Nil then

dim p as WIAPropertyStorageMBS = e.NextItem
while p<>Nil

// display the name of the device in a listbox
Listbox1.AddFolder p.Read(p.kDevicePropertyDevNameString)

p = e.NextItem
wend
end if

Flags: Specifies the types of WIA devices to enumerate. Should be set to kEnumLocal or kEnumAll.
Lasterror is set.

WIADeviceManager2MBS.GetImageDialog(Flags as integer, DeviceID as string, parentWindow as DesktopWindow, FolderName as String, Filename as String, byref item as WIAItemMBS) as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 22.0 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The GetImageDialog method displays one or more dialog boxes that enable a user to acquire an image from a Windows Image Acquisition (WIA) 2.0 device and write the image to a specified file. This method extends the functionality of SelectDeviceDlg to encapsulate image acquisition within a single API call.

Lasterror is set.

Flags: Specifies dialog box behavior. Can be set to the following values: kDeviceDialogUseCommonUI
DeviceID: Specifies the scanner to use.
parentWindowHandle: A handle of the window that owns the Get Image dialog box.
FolderName: Specifies the name of the folder ito store the scanned files in.
Filename: Specifies the name of the file to write the image data to.
item: The variable to return the WiaItem that the images were scanned from.

Returns an array with paths to the files that have been scanned.

If the application passes an emapty string for the value of the DeviceID parameter, GetImageDialog displays the Select Device dialog box so that the user can select the WIA 2.0 input device.

Use a menu item named From scanner on the File menu so that device and image selections are available in your application.

The dialog box must have sufficient rights to FolderName so that it can save the files with unique file names. Protect the folder with an access control list (ACL) because it contains user data.

See also:

WIADeviceManager2MBS.GetImageDialog(Flags as Integer, DeviceID as string, parentWindow as window, FolderName as String, Filename as String, byref item as WIAItemMBS) as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 10.3 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The GetImageDialog method displays one or more dialog boxes that enable a user to acquire an image from a Windows Image Acquisition (WIA) 2.0 device and write the image to a specified file. This method extends the functionality of SelectDeviceDlg to encapsulate image acquisition within a single API call.

Lasterror is set.

Flags: Specifies dialog box behavior. Can be set to the following values: kDeviceDialogUseCommonUI
DeviceID: Specifies the scanner to use.
parentWindowHandle: A handle of the window that owns the Get Image dialog box.
FolderName: Specifies the name of the folder ito store the scanned files in.
Filename: Specifies the name of the file to write the image data to.
item: The variable to return the WiaItem that the images were scanned from.

Returns an array with paths to the files that have been scanned.

If the application passes an emapty string for the value of the DeviceID parameter, GetImageDialog displays the Select Device dialog box so that the user can select the WIA 2.0 input device.

Use a menu item named From scanner on the File menu so that device and image selections are available in your application.

The dialog box must have sufficient rights to FolderName so that it can save the files with unique file names. Protect the folder with an access control list (ACL) because it contains user data.

See also:

WIADeviceManager2MBS.GetImageDialog(Flags as Integer, DeviceID as string, parentWindowHandle as Integer, FolderName as String, Filename as String, byref item as WIAItemMBS) as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 10.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The GetImageDialog method displays one or more dialog boxes that enable a user to acquire an image from a Windows Image Acquisition (WIA) 2.0 device and write the image to a specified file. This method extends the functionality of SelectDeviceDlg to encapsulate image acquisition within a single API call.

Lasterror is set.

Flags: Specifies dialog box behavior. Can be set to the following values: kDeviceDialogUseCommonUI
DeviceID: Specifies the scanner to use.
parentWindowHandle: A handle of the window that owns the Get Image dialog box.
FolderName: Specifies the name of the folder ito store the scanned files in.
Filename: Specifies the name of the file to write the image data to.
item: The variable to return the WiaItem that the images were scanned from.

Returns an array with paths to the files that have been scanned.

If the application passes an empty string for the value of the DeviceID parameter, GetImageDialog displays the Select Device dialog box so that the user can select the WIA 2.0 input device.

Use a menu item named From scanner on the File menu so that device and image selections are available in your application.

The dialog box must have sufficient rights to FolderName so that it can save the files with unique file names. Protect the folder with an access control list (ACL) because it contains user data.

See also:

WIADeviceManager2MBS.SelectDeviceDialog(parentWindow as DesktopWindow, DeviceType as integer, Flags as integer) as WIAItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 22.0 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Displays a dialog box that enables the user to select a hardware device for image acquisition.

parentWindow: Specifies the parent window of the Select Device dialog box.
DeviceType: Specifies which type of WIA 2.0 device to use. See WIA Device Type Specifiers for a list of possible values.
Flags: Specifies the behavior of the dialog box. The value can be one of the following constants: kSelectDeviceNoDefault
DeviceID: Optional, 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 "" if it is not needed.

Returns the WIAItem which was selected.
Lasterror is set.

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 SelectDeviceDialog method creates a hierarchical tree of IWiaItem2 objects for the device. It returns the WiaItemMBS object of the root item.

The application can restrict the devices displayed to the user to particular types by specifying the device types through the DeviceType parameter. If only one device meets the specification, SelectDeviceDialog does not display the Select Device dialog box. Instead it returns the WiaItemMBS tree for the device. You can override this behavior and force SelectDeviceDialog to display the dialog box by specifying kSelectDeviceNoDefault as the value for the Flags 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.

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

See also:

WIADeviceManager2MBS.SelectDeviceDialog(parentWindow as DesktopWindow, DeviceType as integer, Flags as integer, byref DeviceID as string) as WIAItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 22.0 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Displays a dialog box that enables the user to select a hardware device for image acquisition.

parentWindow: Specifies the parent window of the Select Device dialog box.
DeviceType: Specifies which type of WIA 2.0 device to use. See WIA Device Type Specifiers for a list of possible values.
Flags: Specifies the behavior of the dialog box. The value can be one of the following constants: kSelectDeviceNoDefault
DeviceID: Optional, 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 "" if it is not needed.

Returns the WIAItem which was selected.
Lasterror is set.

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 SelectDeviceDialog method creates a hierarchical tree of IWiaItem2 objects for the device. It returns the WiaItemMBS object of the root item.

The application can restrict the devices displayed to the user to particular types by specifying the device types through the DeviceType parameter. If only one device meets the specification, SelectDeviceDialog does not display the Select Device dialog box. Instead it returns the WiaItemMBS tree for the device. You can override this behavior and force SelectDeviceDialog to display the dialog box by specifying kSelectDeviceNoDefault as the value for the Flags 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.

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

See also:

WIADeviceManager2MBS.SelectDeviceDialog(parentWindow as window, DeviceType as Integer, Flags as Integer) as WIAItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 10.3 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Displays a dialog box that enables the user to select a hardware device for image acquisition.
Example
dim DeviceManager as new WIADeviceManager2MBS

if 0 = DeviceManager.Handle then
MsgBox "Failed to initialize device manager."
else
dim it as WIAItemMBS = DeviceManager.SelectDeviceDialog(window1, DeviceManager.kDeviceTypeDefault, DeviceManager.kSelectDeviceNoDefault)

if it<>Nil then
dim p as WIAPropertyStorageMBS = it.PropertyStorage
dim name as string = p.Read(p.kItemPropertyItemNameString)
MsgBox name
end if
end if

parentWindow: Specifies the parent window of the Select Device dialog box.
DeviceType: Specifies which type of WIA 2.0 device to use. See WIA Device Type Specifiers for a list of possible values.
Flags: Specifies the behavior of the dialog box. The value can be one of the following constants: kSelectDeviceNoDefault
DeviceID: Optional, 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 "" if it is not needed.

Returns the WIAItem which was selected.
Lasterror is set.

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 SelectDeviceDialog method creates a hierarchical tree of IWiaItem2 objects for the device. It returns the WiaItemMBS object of the root item.

The application can restrict the devices displayed to the user to particular types by specifying the device types through the DeviceType parameter. If only one device meets the specification, SelectDeviceDialog does not display the Select Device dialog box. Instead it returns the WiaItemMBS tree for the device. You can override this behavior and force SelectDeviceDialog to display the dialog box by specifying kSelectDeviceNoDefault as the value for the Flags 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.

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

See also:

WIADeviceManager2MBS.SelectDeviceDialog(parentWindow as window, DeviceType as Integer, Flags as Integer, byref DeviceID as string) as WIAItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 10.3 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Displays a dialog box that enables the user to select a hardware device for image acquisition.

parentWindow: Specifies the parent window of the Select Device dialog box.
DeviceType: Specifies which type of WIA 2.0 device to use. See WIA Device Type Specifiers for a list of possible values.
Flags: Specifies the behavior of the dialog box. The value can be one of the following constants: kSelectDeviceNoDefault
DeviceID: Optional, 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 "" if it is not needed.

Returns the WIAItem which was selected.
Lasterror is set.

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 SelectDeviceDialog method creates a hierarchical tree of IWiaItem2 objects for the device. It returns the WiaItemMBS object of the root item.

The application can restrict the devices displayed to the user to particular types by specifying the device types through the DeviceType parameter. If only one device meets the specification, SelectDeviceDialog does not display the Select Device dialog box. Instead it returns the WiaItemMBS tree for the device. You can override this behavior and force SelectDeviceDialog to display the dialog box by specifying kSelectDeviceNoDefault as the value for the Flags 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.

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

See also:

WIADeviceManager2MBS.SelectDeviceDialog(parentWindowHandle as Integer, DeviceType as Integer, Flags as Integer) as WIAItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 10.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Displays a dialog box that enables the user to select a hardware device for image acquisition.

parentWindow: Specifies the parent window of the Select Device dialog box.
DeviceType: Specifies which type of WIA 2.0 device to use. See WIA Device Type Specifiers for a list of possible values.
Flags: Specifies the behavior of the dialog box. The value can be one of the following constants: kSelectDeviceNoDefault
DeviceID: Optional, 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 "" if it is not needed.

Returns the WIAItem which was selected.
Lasterror is set.

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 SelectDeviceDialog method creates a hierarchical tree of IWiaItem2 objects for the device. It returns the WiaItemMBS object of the root item.

The application can restrict the devices displayed to the user to particular types by specifying the device types through the DeviceType parameter. If only one device meets the specification, SelectDeviceDialog does not display the Select Device dialog box. Instead it returns the WiaItemMBS tree for the device. You can override this behavior and force SelectDeviceDialog to display the dialog box by specifying kSelectDeviceNoDefault as the value for the Flags 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.

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

See also:

WIADeviceManager2MBS.SelectDeviceDialog(parentWindowHandle as Integer, DeviceType as Integer, Flags as Integer, byref DeviceID as string) as WIAItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 10.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Displays a dialog box that enables the user to select a hardware device for image acquisition.

parentWindow: Specifies the parent window of the Select Device dialog box.
DeviceType: Specifies which type of WIA 2.0 device to use. See WIA Device Type Specifiers for a list of possible values.
Flags: Specifies the behavior of the dialog box. The value can be one of the following constants: kSelectDeviceNoDefault
DeviceID: Optional, 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 "" if it is not needed.

Returns the WIAItem which was selected.
Lasterror is set.

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 SelectDeviceDialog method creates a hierarchical tree of IWiaItem2 objects for the device. It returns the WiaItemMBS object of the root item.

The application can restrict the devices displayed to the user to particular types by specifying the device types through the DeviceType parameter. If only one device meets the specification, SelectDeviceDialog does not display the Select Device dialog box. Instead it returns the WiaItemMBS tree for the device. You can override this behavior and force SelectDeviceDialog to display the dialog box by specifying kSelectDeviceNoDefault as the value for the Flags 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.

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

See also:

WIADeviceManager2MBS.SelectDeviceDialogID(parentWindow as DesktopWindow, DeviceType as integer, Flags as integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 22.0 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Displays a dialog box that enables the user to select a hardware device for image acquisition.

Lasterror is set.

parentWindow: Specifies the parent window of the Select Device dialog box.
DeviceType: Specifies which type of WIA device to use. See kDeviceType* constants.
Flags: Specifies the behavior of the dialog box. You can pass the following constant: kSelectDeviceNoDefault

Returns the selected DeviceID.

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 SelectDeviceDialogID method retruns its identifier string to the application.

The application can restrict the devices displayed to the user to particular types by specifying the device types through the DeviceType parameter. If only one device meets the specification, SelectDeviceDialogID does not display the Select Device dialog box. Instead it passes the device's identifier string to the application without displaying the dialog box. You can override this behavior and force SelectDeviceDialogID to display the dialog box by passing kSelectDeviceNoDefault as the value for the lFlags parameter. If more than one WIA device matches the specification, all matching devices are displayed in the SelectDevice dialog box so the user may choose one.

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

See also:

WIADeviceManager2MBS.SelectDeviceDialogID(parentWindow as window, DeviceType as Integer, Flags as Integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 10.3 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Displays a dialog box that enables the user to select a hardware device for image acquisition.

Lasterror is set.

parentWindow: Specifies the parent window of the Select Device dialog box.
DeviceType: Specifies which type of WIA device to use. See kDeviceType* constants.
Flags: Specifies the behavior of the dialog box. You can pass the following constant: kSelectDeviceNoDefault

Returns the selected DeviceID.

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 SelectDeviceDialogID method retruns its identifier string to the application.

The application can restrict the devices displayed to the user to particular types by specifying the device types through the DeviceType parameter. If only one device meets the specification, SelectDeviceDialogID does not display the Select Device dialog box. Instead it passes the device's identifier string to the application without displaying the dialog box. You can override this behavior and force SelectDeviceDialogID to display the dialog box by passing kSelectDeviceNoDefault as the value for the lFlags parameter. If more than one WIA device matches the specification, all matching devices are displayed in the SelectDevice dialog box so the user may choose one.

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

See also:

WIADeviceManager2MBS.SelectDeviceDialogID(parentWindowHandle as Integer, DeviceType as Integer, Flags as Integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Capture MBS Win Plugin 10.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Displays a dialog box that enables the user to select a hardware device for image acquisition.

Lasterror is set.

parentWindow: Specifies the parent window of the Select Device dialog box.
DeviceType: Specifies which type of WIA device to use. See kDeviceType* constants.
Flags: Specifies the behavior of the dialog box. You can pass the following constant: kSelectDeviceNoDefault

Returns the selected DeviceID.

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 SelectDeviceDialogID method retruns its identifier string to the application.

The application can restrict the devices displayed to the user to particular types by specifying the device types through the DeviceType parameter. If only one device meets the specification, SelectDeviceDialogID does not display the Select Device dialog box. Instead it passes the device's identifier string to the application without displaying the dialog box. You can override this behavior and force SelectDeviceDialogID to display the dialog box by passing kSelectDeviceNoDefault as the value for the lFlags parameter. If more than one WIA device matches the specification, all matching devices are displayed in the SelectDevice dialog box so the user may choose one.

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

See also:

The items on this page are in the following plugins: MBS Win Plugin.


The biggest plugin in space...