Skip to content

Latest commit

 

History

History
 
 

AppDrv

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>DIFxAPI AppDrv</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR><!-- #BeginEditable "doctitle" --><!-- #EndEditable --></HEAD>
<BODY link=#0000FF><FONT face=Verdana size=5>
<H2>Driver Install Frameworks API (DIFx API) </H2></FONT><FONT 
face=Verdana size=2>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><A 
href="file:///C:/Documents%20and%20Settings/tstone/My%20Documents/DIFx%20Readmes/DPInst/readme.htm#Note">Note</A> 

<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><A 
href="file:///C:/Documents%20and%20Settings/tstone/My%20Documents/DIFx%20Readmes/DPInst/readme.htm#Intro">Description</A> 
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><A 
href="file:///C:/Documents%20and%20Settings/tstone/My%20Documents/DIFx%20Readmes/DPInst/readme.htm#Run">Building the Sample</A> 
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><A 
href="file:///C:/Documents%20and%20Settings/tstone/My%20Documents/DIFx%20Readmes/DPInst/readme.htm#Plug">Running the Sample</A> 
<H3><A name=Note></A>Note</H3>
<P>This sample works only on an x86 Windows operating system. However, the 
techniques illustrated in this sample apply to Windows operating systems for 
other architectures as well.<BR>&nbsp; 
<H3><A name=Intro></A>Description</H3>
<P>This sample demonstrates the usage of the application to driver dependency feature of DIFx API. It provides an example of how the INSTALLERINFO structure is to be used in calls to DriverPackageInstall and DriverPackageUninstall functions. By passing the INSTALLERINFO structure as a parameter to the DriverPackageInstall function, an application expresses a dependency on the driver package. By passing the INSTALLERINFO structure as a parameter to the DriverPackageUninstall function, an application removes its dependency on the driver package.
</P>
<H3><A name=Run></A>Building the Sample</H3>
<P>Navigate to the src\setup\DIFxAPI\AppDrv directory and run the following command: 

<P>&nbsp;&nbsp;&nbsp; build -cZ 

<H3><A name=Plug></A>Running the Sample</H3>
<P>The usage of AppDrv.exe is as follows:</P>
<P>AppDrv.exe &lt;option&gt; &lt;full path to the inf file&gt; &lt;Application ID&gt; &lt;Product 
display name&gt; &lt;Product name&gt; &lt;Manufacturer name&gt;<br>
&nbsp;</P>
<P>&lt;option&gt;<option> <full path to the inf file> <Application ID> <Product display name> <Product name> <Manufacturer name>

<option> can be one of the following:</P>
<P>&nbsp;&nbsp;&nbsp; /i - Install the driver
	
</P>
<P>&nbsp;&nbsp;&nbsp; /u - Uninstall the driver

<Application ID> 

</P>
<P>&lt;Application ID&gt; is a unique identifier that denotes the application that is installing the driver</P>
<P>&lt;Product Display name&gt; is a user-friendly display name for the application that is installing the driver
<Product name> 

</P>
<P>&lt;Product name&gt;&nbsp; is the name of the application that is installing the driver</P>
<P>&lt;Manufacturer name&gt; is the name of the company that is shipping that is installing the driver

</P>
<P>In order to understand the application to driver dependency feature of DIFx 
API, try the following:</P>
<P>1) Run the command</P>
<P>&nbsp;&nbsp;&nbsp; AppDrv.exe /i <Path to some INF> &lt;Path to INF&gt; abc123 "My first application" "App 1" "Good Company, Inc."

<Path to INF> 

</P>
<P>&nbsp;&nbsp;&nbsp; &lt;Path to INF&gt; should be the full path to the INF file for some driver package. 

</P>
<P>For example, you can use one of the sample driver packages that are provided in the directory src\setup\DIFxSampleDriverPackages in the DDK.

At this point DIFx API will install the driver and it will register that an application with application ID "abc123" is dependent on the driver.

</P>
<P>2) Run the command:</P>
<P>&nbsp;&nbsp;&nbsp; AppDrv.exe /i <Path to the same INF> &lt;Path to the same INF&gt; xyz456 "My second application" "App 2" "Good Company, Inc."

<Path to the same INF> 

</P>
<P>&nbsp;&nbsp;&nbsp; &lt;Path to the same INF&gt; should be the path to the same INF that was used in step 1.

</P>
<P>At this point DIFx API will register that two applications, with application IDs "abc123" and "xyz456" are dependent on the driver.

</P>
<P>3) Run the command:</P>
<P>&nbsp;&nbsp;&nbsp; AppDrv.exe /u &lt;Path to the same INF&gt; <Path to the same INF> abc123 "My first application" "App 1" "Good Company, Inc."

<Path to the same INF> 

</P>
<P>&nbsp;&nbsp;&nbsp; &lt;Path to the same INF&gt; should be the path to the same INF that was used in step 1.

</P>
<P>At this point, DIFx API will remove the dependency of the application with application ID "abc123" from the driver. However, it will not uninstall the driver, because the application with application ID "xyz456" is still dependent on it.

</P>
<P>4) Run the command:</P>
<P>&nbsp;&nbsp;&nbsp; AppDrv.exe /u <Path to the same INF> &lt;Path to the same INF&gt; xyz456 "My second application" "App 2" "Good Company, Inc."

<Path to the same INF> 
</P>
<P>&nbsp;&nbsp;&nbsp; &lt;Path to the same INF&gt; should be the path to the same INF that was used in step 1.

</P>
<P>At this point, DIFx API will remove the dependency of the application with application ID "xyz456" from the driver. Since no other applications are dependent on the driver, DIFx API will also uninstall the driver.
</P>

<P align=center><A 
href="file:///C:/Documents%20and%20Settings/tstone/My%20Documents/DIFx%20Readmes/DPInst/readme.htm#top"><FONT 
face=Verdana size=2>Top of page</FONT></A><FONT face=Verdana size=2> 
</P></FONT><FONT face="MS Sans Serif" size=1>
<P>© Microsoft Corporation 2002</FONT> </FONT></P></BODY></HTML>