DeviceInfo.Create method

The Create method of the DeviceInfo object makes a connection to the Windows Image Acquisition (WIA) device specified by the DeviceInfo object, and returns an Item object that represents the device.

Syntax

retVal = DeviceInfo.Create()

Parameters

This method has no parameters.

Return value

Type: IWiaDispatchItem

This method returns the Item object that represents the device that is created.

Remarks

Use the Create method to create a connection to a WIA hardware device after enumerating the Devices collection. The method returns an Item object that represents the device (a root item).

Examples

The following example demonstrates the use of the Create method.

<SCRIPT LANGUAGE="VBScript">
Dim objWia
Dim objDeviceInfoCollection
Dim objDeviceInfo
Dim objItem
 
Set objWIA = CreateObject("Wia.Script")
 
Set objDeviceInfoCollection = objWia.Devices
 
For Each objDeviceInfo In objDeviceInfoCollection
    Set objItem = objDeviceInfo.Create()
Next
</SCRIPT>

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
DLL
Wiascr.dll (version 4.90 or later)