AddDriverPackage method
The AddDriverPackage method publishes a driver package to the Microsoft Windows Device Testing Framework (WDTF) driver package collection. The method returns a PublishedDriverPackage object for the driver package within the collection.
Syntax
HRESULT AddDriverPackage(
[in] IDriverPackage *pPackage,
[out, retval] IPublishedDriverPackage **ppAddedPackage
);
Parameters
pPackage [in]
The DriverPackage object that references the driver package that will be published to the WDTF driver package collection.ppAddedPackage [out, retval]
The address of a variable that will receive the pointer to a PublishedDriverPackage object. This object represents the instance of the driver package within the WDTF driver package collection.
Return value
AddDriverPackage returns a standard HRESULT value.
Remarks
To publish a driver package to the WDTF driver package collection, you must first call the DeviceManagement::GetDriverPackageForInf method to create an object of a DriverPackage interface. The AddDriverPackage method is passed this object through the pPackage parameter.
Driver packages that are published can be referenced by calling the DeviceManagement::GetPublishedDriverPackagesWithFilter method. This method returns an IDriverPackageCollection object that contains a list of PublishedDriverPackage objects.
To remove the driver package from the WDTF driver package collection, call DeviceManagement::RemoveDriverPackage and pass the PublishedDriverPackage object that was returned from the AddDriverPackage method by using the ppAddedPackage parameter.
For more information about the WDTF driver package collection, see IDriverPackageCollection.
A driver package that is published by calling the AddDriverPackage method is not staged to the driver store that is managed by the operating system. To stage and install a driver package, call the DeviceManagement::InstallDriver method.
See also
DeviceManagement::InstallDriver
DeviceManagement::RemoveDriverPackage
Send comments about this topic to Microsoft
Build date: 1/12/2012