Platforms to show: All Mac Windows Linux Cross-Platform

Back to WIADeviceManager1MBS class.

WIADeviceManager1MBS.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 1.0 manager object.
Example
dim DeviceManager as new WIADeviceManager1MBS

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

WIADeviceManager1MBS.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.

WIADeviceManager1MBS.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 DeviceManager1 as new WIADeviceManager1MBS

// Enumerate all local devices
dim e as WIADeviceInfoEnumeratorMBS = DeviceManager1.EnumDeviceInfo(DeviceManager1.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.
Lasterror is set.

WIADeviceManager1MBS.GetImageDialog(parentWindow as DesktopWindow, DeviceType as integer, Flags as integer, Intent as integer, file as folderitem, rootitem as WIAItemMBS=nil)

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) device and write the image to a specified file.

Lasterror is set.

This method combines the functionality of SelectDeviceDialog to completely encapsulate image acquisition within a single API call.

parentWindowHandle: Handle of the window that owns the Get Image dialog box.
DeviceType: Specifies which type of WIA device to use. Is set to kDeviceTypeDefault, kDeviceTypeScanner, or kDeviceTypeDigitalCamera.
Flags: Specifies dialog box behavior. Can be set to the following constants: kSelectDeviceNoDefault, kDeviceDialogUseCommonUI and kDeviceDialogSingleImage.
Intent: Specifies what type of data the image is intended to represent. Use kIntent* constants.
rootitem: Returns the interface of the hierarchical tree of WiaItem objects returned by CreateDevice.
file: Specifies the name of the file to which the image data is written.

Invoking this method displays a dialog box that enables users to acquire images. It can also display the Select Device dialog box created by the SelectDeviceDlg method.

If the application passes nil for the value of the rootitem parameter, GetImageDlg displays the Select Device dialog box that lets the user select the WIA input device. If the application specifies a WIA input device by passing a pointer to the device's item tree through the pItemRoot parameter, GetImageDlg does not display the Select Device dialog box. Instead, it will use the specified input device to acquire the image.

When using the Select Device dialog box, applications can specify types of WIA input devices. To do so, they must set the rootitem parameter to NULL and pass the appropriate constants through the DeviceType parameter. If more than one device of the specified type is present, the GetImageDlg displays the Select Device dialog box to let the user select which device will be used.

If GetImageDlg finds only one matching device, it will not display the Select Device dialog box. Instead, it will select the matching device. You can override this behavior and force GetImageDlg to display the Select Device dialog box by passing kSelectDeviceNoDefault as the value for the lFlags 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.

The dialog must have sufficient rights to the folder for file that it can save the file with a unique file name. The folder should also be protected with an access control list (ACL) because it contains user data.

See also:

WIADeviceManager1MBS.GetImageDialog(parentWindow as window, DeviceType as Integer, Flags as Integer, Intent as Integer, file as folderitem, rootitem as WIAItemMBS=nil)

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) device and write the image to a specified file.

Lasterror is set.

This method combines the functionality of SelectDeviceDialog to completely encapsulate image acquisition within a single API call.

parentWindowHandle: Handle of the window that owns the Get Image dialog box.
DeviceType: Specifies which type of WIA device to use. Is set to kDeviceTypeDefault, kDeviceTypeScanner, or kDeviceTypeDigitalCamera.
Flags: Specifies dialog box behavior. Can be set to the following constants: kSelectDeviceNoDefault, kDeviceDialogUseCommonUI and kDeviceDialogSingleImage.
Intent: Specifies what type of data the image is intended to represent. Use kIntent* constants.
rootitem: Returns the interface of the hierarchical tree of WiaItem objects returned by CreateDevice.
file: Specifies the name of the file to which the image data is written.

Invoking this method displays a dialog box that enables users to acquire images. It can also display the Select Device dialog box created by the SelectDeviceDlg method.

If the application passes nil for the value of the rootitem parameter, GetImageDlg displays the Select Device dialog box that lets the user select the WIA input device. If the application specifies a WIA input device by passing a pointer to the device's item tree through the pItemRoot parameter, GetImageDlg does not display the Select Device dialog box. Instead, it will use the specified input device to acquire the image.

When using the Select Device dialog box, applications can specify types of WIA input devices. To do so, they must set the rootitem parameter to NULL and pass the appropriate constants through the DeviceType parameter. If more than one device of the specified type is present, the GetImageDlg displays the Select Device dialog box to let the user select which device will be used.

If GetImageDlg finds only one matching device, it will not display the Select Device dialog box. Instead, it will select the matching device. You can override this behavior and force GetImageDlg to display the Select Device dialog box by passing kSelectDeviceNoDefault as the value for the lFlags 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.

The dialog must have sufficient rights to the folder for file that it can save the file with a unique file name. The folder should also be protected with an access control list (ACL) because it contains user data.

See also:

WIADeviceManager1MBS.GetImageDialog(parentWindowHandle as Integer, DeviceType as Integer, Flags as Integer, Intent as Integer, file as folderitem, rootitem as WIAItemMBS=nil)

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) device and write the image to a specified file.

Lasterror is set.

This method combines the functionality of SelectDeviceDialog to completely encapsulate image acquisition within a single API call.

parentWindowHandle: Handle of the window that owns the Get Image dialog box.
DeviceType: Specifies which type of WIA device to use. Is set to kDeviceTypeDefault, kDeviceTypeScanner, or kDeviceTypeDigitalCamera.
Flags: Specifies dialog box behavior. Can be set to the following constants: kSelectDeviceNoDefault, kDeviceDialogUseCommonUI and kDeviceDialogSingleImage.
Intent: Specifies what type of data the image is intended to represent. Use kIntent* constants.
rootitem: Returns the interface of the hierarchical tree of WiaItem objects returned by CreateDevice.
file: Specifies the name of the file to which the image data is written.

Invoking this method displays a dialog box that enables users to acquire images. It can also display the Select Device dialog box created by the SelectDeviceDlg method.

If the application passes nil for the value of the rootitem parameter, GetImageDlg displays the Select Device dialog box that lets the user select the WIA input device. If the application specifies a WIA input device by passing a pointer to the device's item tree through the pItemRoot parameter, GetImageDlg does not display the Select Device dialog box. Instead, it will use the specified input device to acquire the image.

When using the Select Device dialog box, applications can specify types of WIA input devices. To do so, they must set the rootitem parameter to NULL and pass the appropriate constants through the DeviceType parameter. If more than one device of the specified type is present, the GetImageDlg displays the Select Device dialog box to let the user select which device will be used.

If GetImageDlg finds only one matching device, it will not display the Select Device dialog box. Instead, it will select the matching device. You can override this behavior and force GetImageDlg to display the Select Device dialog box by passing kSelectDeviceNoDefault as the value for the lFlags 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.

The dialog must have sufficient rights to the folder for file that it can save the file with a unique file name. The folder should also be protected with an access control list (ACL) because it contains user data.

See also:

WIADeviceManager1MBS.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:

WIADeviceManager1MBS.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:

WIADeviceManager1MBS.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 WIADeviceManager1MBS

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:

WIADeviceManager1MBS.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:

WIADeviceManager1MBS.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:

WIADeviceManager1MBS.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:

WIADeviceManager1MBS.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:

WIADeviceManager1MBS.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:

WIADeviceManager1MBS.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...