Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

WIAItemMBS.AnalyzeItem
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: The AnalyzeItem method causes the Windows Image Acquisition (WIA) hardware device to acquire and try to detect what data types are present.
Notes:
This method is used with scanners to detect what type of data is on a page. When an application calls this method, the WIA hardware device driver scans and analyzes the current page. For each data type it detects, it creates an WiaItem object to represent the region on the page the data occupies.

Image processing and OCR software can use this capability to detect graphics and text on a page. This method adds the regions it creates into the WIA device's WiaItem tree. The application can select the individual regions and use the standard data transfer methods to acquire data from them.

If necessary, applications can override the regions created by this method.

Works only on WIA 1.x.
Lasterror is set.

Feedback, Comments & Corrections

WIAItemMBS.CreateChildItem(ItemFlags as Integer, CreationFlags as Integer, ItemName as string, FullItemName as string) as WIAItemMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: The CreateChildItem method is used by applications to add WiaItem objects to the WiaItem tree of a device.
Notes:
ItemFlags: Specifies the WIA item type.
CreationFlags: Specifies how to create the new item. Only for WIA 2.x. Can be 0 to set the default values for the properties of the child. Can be &H40000000 to copy the values of all Read/Write properties from the parent.
ItemName: Specifies the WIA item name, such as "Top". You can think of this parameter as being equivalent to a file name.
FullItemName: Specifies the full WIA item name. You can think of this parameter as equivalent to a full path to a file, such as "003\Root\Top". Only for WIA 1.x.

Lasterror is set.
Returns nil on any error and the new item object on success.

Some WIA hardware devices allow applications to create new items in the WiaItem tree that represents the device. Applications must test the devices to see if they support this capability. Use the EnumerateDeviceCapabilities function to enumerate the current device's capabilities.

If the device allows the creation of new items in the WiaItem tree, invoking CreateChildItem creates a new WiaItem that is a child of the current node.

Feedback, Comments & Corrections

WIAItemMBS.DataTransfer as WIADataTransferMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: Creates a Data transfer object.
Notes:
Lasterror is set.
Only for WIA 1.x.
Returns nil on any error.

Feedback, Comments & Corrections

WIAItemMBS.DeleteItem
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: Removes the current IWiaItem object from the object tree of the device.
Notes:
Lasterror is set.
Available on both WIA 1.x and 2.x.

The Windows Image Acquisition (WIA) run-time system represents each WIA hardware device connected to the user's computer as a hierarchical tree of IWiaItem objects. A given WIA device may or may not allow applications to delete IWiaItem objects from its tree. Use the EnumerateDeviceCapabilities function to query the device for item deletion capability.

If the device supports item deletion in its WiaItem tree, invoke the DeleteItem method to remove the WiaItem object. Note that this method will only delete an object after all references to the object have been released.

Feedback, Comments & Corrections

WIAItemMBS.DeviceCommand(command as WIAGUIDMBS) as WIAItemMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: Issues a command to a Windows Image Acquisition (WIA) hardware device.
Example:
dim targetItem as WIAItemMBS // your item
dim resultItem as WIAItemMBS
resultItem = targetItem.DeviceCommand(targetItem.kCommandTakePicture)
Notes:
Command: Specifies the command to send to the WIA 2.0 device. See kCommand* constants.
Works with WIA 1.x and 2.x.

Applications use this method to send WIA commands to hardware devices.

When the application sends the kCommandTakePicture command to the device, the WIA run-time system creates the WiaItem object to represent the image. The DeviceCommand method returns this new WIAItemMBS object.

Feedback, Comments & Corrections

WIAItemMBS.DeviceDialog(Flags as Integer, Win as window, FolderName as string, Filename as string, paths() as string, items() as WIAItemMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No No No
Function: Displays a dialog box to the user to prepare for image acquisition.
Notes:
Lasterror is set.
Only for WIA 2.x.

Flags: 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 following flags: kDeviceDialogSingleImage, kDeviceDialogUseCommonUI and kSelectDeviceNoDefault
Win: A handle to the parent window.
FolderName: Specifies the folder name where the files are to be transferred.
Filename: Specifies the template file name.
paths: An array to be filled with the file paths.
items: An array to be filled with the wia item objects.

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 WiaTransferMBS class to acquire the image.

See also:

Feedback, Comments & Corrections

WIAItemMBS.DeviceDialog(Flags as Integer, WindowHandle as Integer, FolderName as string, Filename as string, paths() as string, items() as WIAItemMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: Displays a dialog box to the user to prepare for image acquisition.
Notes:
Lasterror is set.
Only for WIA 2.x.

Flags: 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 following flags: kDeviceDialogSingleImage, kDeviceDialogUseCommonUI and kSelectDeviceNoDefault
WindowHandle: A handle to the parent window.
FolderName: Specifies the folder name where the files are to be transferred.
Filename: Specifies the template file name.
paths: An array to be filled with the file paths.
items: An array to be filled with the wia item objects.

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 WiaTransferMBS class to acquire the image.

See also:

Feedback, Comments & Corrections

WIAItemMBS.DeviceDialog(Win as window, Flags as Integer, Intent as Integer) as WIAItemMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No No No
Function: The DeviceDialog method is used by applications to display a dialog box to the user to prepare for image acquisition.
Notes:
win: Handle of the parent window of the dialog box.
Flags: Specifies a set of flags that control the dialog box's operation. Can be set to any of the following values: kDeviceDialogUseCommonUI and kDeviceDialogSingleImage.
Intent: Specifies what type of data the image is intended to represent. For a list of image intent values, kIntent* constants.

Lasterror is set.
Only for WIA 1.x.

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 WiaDataTransferMBS interface to acquire the image.

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

See also:

Feedback, Comments & Corrections

WIAItemMBS.DeviceDialog(WindowHandle as Integer, Flags as Integer, Intent as Integer) as WIAItemMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: The DeviceDialog method is used by applications to display a dialog box to the user to prepare for image acquisition.
Notes:
WindowHandle: Handle of the parent window of the dialog box.
Flags: Specifies a set of flags that control the dialog box's operation. Can be set to any of the following values: kDeviceDialogUseCommonUI and kDeviceDialogSingleImage.
Intent: Specifies what type of data the image is intended to represent. For a list of image intent values, kIntent* constants.

Lasterror is set.
Only for WIA 1.x.

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 WiaDataTransferMBS interface to acquire the image.

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

See also:

Feedback, Comments & Corrections

WIAItemMBS.EnumerateChildItems(CategoryGUID as WIAGUIDMBS=nil) as WIAItemEnumeratorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: Creates and returns an enumerator object for non-empty folders in a WiaItem tree of a Windows Image Acquisition (WIA) device.
Example:
Sub EnumerateItems(root as WIAItemMBS)
dim e as WIAItemEnumeratorMBS = Root.EnumerateChildItems

if e<>Nil then
dim it as WIAItemMBS = e.NextItem

while it<>nil

// do something with item

it = e.NextItem
wend

end if
End Sub
Notes:
Lasterror is set.
Works for WIA 1.x and WIA 2.x.

CategoryGUID: Specifies a category for which child nodes are enumerated. If nil, then all child nodes are enumerated. This parameter is only used on WIA 2.x.

The WIA run-time system represents each WIA hardware device as a hierarchical tree of WiaItem objects. The EnumerateChildItems method enables applications to enumerate child items in the current item. However, it can only be applied to items that are folders.

If the folder is not empty, it contains a subtree of WiaItem objects. The EnumerateChildItems method enumerates all of the items contained in the folder.

Feedback, Comments & Corrections

WIAItemMBS.EnumerateDeviceCapabilities(Flags as Integer) as WIADeviceCapabilitiesEnumeratorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: Creates an enumerator that is used to ascertain the commands and events a Windows Image Acquisition (WIA) device supports.
Notes:
Flags: Specifies a flag that selects the type of capabilities to enumerate. Can be a combination of kDeviceCommands and kDeviceEvents.

Works for both WIA 1.x and 2.x
Lasterror is set.

Use this method to create an enumerator object to obtain the set of commands and events that a WIA device supports. You can use the Flags parameter to specify which kinds of device capabilities to enumerate.

Feedback, Comments & Corrections

WIAItemMBS.FindItemByName(name as string) as WIAItemMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: Searches an item's tree of subitems using the name as the search key.
Notes:
name: Specifies the name fo the item to search for.

Lasterror is set.
Works with WIA 1.x and 2.x.

This method searches the current item's tree of sub-items using the name as the search key. If FindItemByName finds the item specified by name, it retruns the WiaItem object.

Feedback, Comments & Corrections

WIAItemMBS.ItemCategory as WIAGUIDMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: Gets an item's category information.
Notes:
Lasterror is set. Only for WIA 2.x.

Every WiaItemMBS object in the hierarchical tree of objects associated with a Windows Image Acquisition (WIA) 2.0 hardware device has a specific category. This method enables applications to identify the category of any item in a hierarchical tree of item objects in a device.

Requires Windows Vista or Windows Server 2008.

Feedback, Comments & Corrections

WIAItemMBS.ItemType as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: Gets an item's type information.
Example:
dim it as WIAItemMBS // your item
if BitwiseAnd(it.ItemType,it.kTypeFolder)=it.kTypeFolder or BitwiseAnd(it.ItemType, it.kTypeHasAttachments)=it.kTypeHasAttachments then
msgbox "may have children."
else
msgbox "no children."
end if
Notes:
Works with WIA 1.x and 2.x.
Lasterror is set.

Every WiaItemMBS object in the hierarchical tree of objects associated with a Windows Image Acquisition (WIA) 2.0 hardware device has a specific data type. Item objects represent folders and files. Folders contain file objects. File objects contain data acquired by the device such as images and sounds. This method enables applications to identify the type of any item in a hierarchical tree of item objects in a device.

An item may have more than one type. For example, an item that represents an audio file will have the type attributes WiaItemTypeAudio bitwiseor WiaItemTypeFile.

Feedback, Comments & Corrections

WIAItemMBS.ParentItem as WIAItemMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: Gets the parent item in the tree that represents a Windows Image Acquisition (WIA) 2.0 hardware device.
Notes:
Works only in WIA 2.x. Lasterror is set.
Given any WiaItem object in the object tree of a WIA 2.0 hardware device, the application retrieves a pointer to the parent item by calling this function.

Feedback, Comments & Corrections

WIAItemMBS.PropertyStorage as WIAPropertyStorageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: Queries properties for this item.
Example:
Sub ListProperties(it as WIAItemMBS, plist as listbox)
// enumerate properties into a given listbox

// clear list
PList.DeleteAllRows

// get properties
dim p as WIAPropertyStorageMBS = it.PropertyStorage
if p<>Nil then
dim e as WIAPropertyEnumeratorMBS = p.Enumerate

if e<>nil then
dim ps as WIAPropertyMBS = e.NextItem

while ps<>Nil
// read the property value
dim v as Variant = p.Read(ps)

// get some identifier string for the listbox, name or id
dim k as string = ps.Name
if len(k)=0 then
k = str(ps.ID)
end if

PList.AddRow k

if v.Type = v.TypeObject then
if v isa WIAGUIDMBS then
dim g as WIAGUIDMBS = v
PList.Cell(PList.LastIndex,1)=g.DisplayString
else
PList.Cell(PList.LastIndex,1)="? some object" // should never happen
end if
else
PList.Cell(PList.LastIndex,1)=v.StringValue
end if

ps = e.NextItem
wend

end if
end if
End Sub
Notes:
Lasterror is set.
Returns nil on any error.

Feedback, Comments & Corrections

WIAItemMBS.RootItem as WIAItemMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: Retrieves the root item of a tree of item objects used to represent a Windows Image Acquisition (WIA) hardware device.
Notes:
Lasterror is set.
Works with WIA 1.x and 2.x.

Given any WiaItem object in the object tree of a WIA hardware device, the application retrieves a pointer to the root item by calling this function.

Feedback, Comments & Corrections

WIAItemMBS.Transfer as WIATransferMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Image Capture MBS Win Plugin 10.3 No Yes No Yes, Windows only No
Function: Creates a transfer object for this item.
Notes:
Only available on WIA 2.x.
Lasterror is set.
Returns nil on any error.

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins