DeviceManagement for System Targets
The DeviceManagement interface for system targets provides operations that are global to a computer. This includes access to the driver store and the device node (devnode) tree.
interface IMachine : IAction
Methods
Rescan
Causes Plug and Play (PnP) to re-enumerate all devices that are installed on a computer and then install a driver on any device with the IsReinstallNeeded property set.GetDriverPackageForInf
Creates an instance of the DriverPackage interface that is based on the specified INF file from a driver package.AddDriverPackage
Publishes a driver package, which is represented by a DriverPackage object, to the Microsoft Windows Device Testing Framework (WDTF) driver package collection.RemoveDriverPackage
Removes a driver package, which is represented by a PublishedDriverPackage object, from the WDTF driver package collection.WaitNoPendingInstallEvents
Waits until all device installs have completed.InstallDriver
Installs a driver package, which is represented by a DriverPackage object, on all devices that match a specified hardware ID and are ranked higher than the currently installed driver.GetPublishedDriverPackagesWithFilter
Returns PublishedDriverPackage objects that are published to the WDTF driver package collection.
The following methods are obsolete. Do not use them.
- GetDeviceById
Returns the device object that has the specified deviceId.
The following methods are reserved for future use. Do not use them.
CreateRootEnumeratedDevice
Creates a root-enumerated devnode.GetClassName
Returns the name that is associated with the specified class GUID.
Properties
The following properties are obsolete. Do not use them.
DriverPackages
A collection of all driver packages that were published to the WDTF driver package collection.Devices
A collection of all non-phantom (that is, physically present) devices on the computer.AllDevices
A collection of all devices on the computer.RootDevice
The root device of the device hierarchy.
Remarks
The DriverPackage action interface acts on an instance of the ITarget interface that is retrieved from the SystemDepot object. You can retrieve a target-specific implementation of an action interface by calling the ITarget::GetInterface method with the desired WDTFProgID.
You can use the methods and properties from the DeviceManagement interface to create different test scenarios that require management of devices at the system level.
There is also a separate interface for DeviceManagement of individual devices. For more information about this related (but separate) device-type interface, see DeviceManagement for Device Targets.
For more information about the WDTF driver package collection, see IDriverPackageCollection.
Implementation Details
WDTFProgID: DeviceManagement
TraceLevel Path: HKCR\WDTFActions.1\System\DeviceManagement\
Note The implementation of this interface is not thread-safe.
Type Libraries
WDTF.tlb
WDTFInterfaces.tlb
DeviceManagement.tlb
Related topics
DeviceManagement for Device Targets
Send comments about this topic to Microsoft
Build date: 1/12/2012