DeviceManager Object

Manages the imaging devices connected to the computer. The DeviceManager control is an invisible-at-runtime control that you can create using "WIA.DeviceManager" as the ProgID in a call to CreateObject, or by dropping a DeviceManager object on a form.

Members Table

The following table lists the members exposed by the DeviceManager object.

Event Description
OnEvent Fires for any event registered with RegisterEvent.
Method Description
RegisterEvent Registers the specified EventID Constants for the specified DeviceID. If DeviceID is "*" then OnEvent is called whenever the event specified occurs for any device. Otherwise, OnEvent is only called if the event specified occurs on the device specified.
RegisterPersistentEvent Registers the specified Command to launch when the specified EventID for the specified DeviceID occurs. Command can be either a class identifier (CLSID) or the full path name and the appropriate command-line arguments needed to invoke the application.
UnregisterEvent Unregisters the specified EventID for the specified DeviceID. UnregisterEvent should only be called for the EventID and DeviceID for which you called RegisterEvent.
UnregisterPersistentEvent Unregisters the specified Command for the specified EventID for the specified DeviceID. UnregisterPersistentEvent should only be called for the Command, Name, Description, Icon, EventID, and DeviceID for which you called RegisterPersistentEvent.
Property Description
DeviceInfos (DeviceManager) Retrieves a collection of all imaging devices connected to this computer.

Remarks

Note you can call RegisterEvent on all DeviceEvent objects found in the Events collection on the Device object. However, you can only call RegisterPersistentEvent on DeviceEvent objects that have a Type (DeviceEvent) property containing the ActionEvent flag.

For example code, see List all Available Devices by Name and DeviceID in Shared Samples.

Object Information

CLSID Not available
Minimum operating systems Windows XP SP1

See Also

OnEvent