This commit is contained in:
Barry Golden 2015-08-05 18:03:26 -07:00
Родитель 0c44721f73
Коммит c7e42e0b72
5 изменённых файлов: 63 добавлений и 198 удалений

Просмотреть файл

@ -17,7 +17,7 @@ Build the sample
For information on how to build a driver solution using Microsoft Visual Studio, see [Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644).
**Note**  Starting in Windows 8.1, the WDK no longer contains the co-installers by default. You can obtain the co-installers by downloading the *wdfcoinstaller.msi* package from [WDK 8 Redistributable Components](http://go.microsoft.com/fwlink/p/?LinkID=226396).
**Note**  The WDK no longer contains the co-installers by default. You can obtain the co-installers by downloading the *wdfcoinstaller.msi* package from [WDK 8 Redistributable Components](http://go.microsoft.com/fwlink/p/?LinkID=226396).
Run the sample
--------------
@ -60,7 +60,7 @@ It supports cancellation of any IOCTL which may be I/O intensive, particularly a
There are hooks for all [WBDI IOCTLs](http://msdn.microsoft.com/en-us/library/windows/hardware/ff536414), including the optional IOCTLs.
PnP is very simple for this driver. It needs to only implement OnPrepareHardware and OnReleaseHardware from IPnpCallbackHardware.
PnP is very simple for this driver. It needs to only implement **OnPrepareHardware** and **OnReleaseHardware** from **IPnpCallbackHardware**.
Some device drivers may need to keep several pending reads to the WinUsb I/O target in order to properly flush all I/O that comes from the device during a capture.

Просмотреть файл

@ -13,37 +13,31 @@ Build the sample
You can build the sample in two ways: using Microsoft Visual Studio or the command line (*MSBuild*).
Building a Driver Using Visual Studio
-------------------------------------
### Building a Driver Using Visual Studio
You build a driver the same way you build any project or solution in Visual Studio. When you create a new driver project using a Windows driver template, the template defines a default (active) project configuration and a default (active) solution build configuration. When you create a project from existing driver sources or convert existing driver code that was built with previous versions of the WDK, the conversion process preserves the target version information (operating systems and platform).
The default Solution build configuration is Windows 8.1 Debug and Win32.
The default Solution build configuration is **Debug** and **Win32**.
### To select a configuration and build a driver
**To select a configuration and build a driver**
1. Open the driver project or solution in Visual Studio (find fastfat.sln or fastfat.vcxproj).
2. Right-click the solution in the **Solutions Explorer** and select **Configuration Manager**.
3. From the **Configuration Manager**, select the **Active Solution Configuration** (for example, Windows 8.1 Debug or Windows 8.1 Release) and the **Active Solution Platform** (for example, Win32) that correspond to the type of build you are interested in.
3. From the **Configuration Manager**, select the **Active Solution Configuration** (for example, Debug or Release) and the **Active Solution Platform** (for example, Win32) that correspond to the type of build you are interested in.
4. From the Build menu, click **Build Solution** (Ctrl+Shift+B).
Building a Driver Using the Command Line (MSBuild)
--------------------------------------------------
### Building a Driver Using the Command Line (MSBuild)
You can build a driver from the command line using the Visual Studio Command Prompt window and the Microsoft Build Engine (MSBuild.exe) Previous versions of the WDK used the Windows Build utility (Build.exe) and provided separate build environment windows for each of the supported build configurations. You can now use the Visual Studio Command Prompt window for all build configurations.
### To select a configuration and build a driver or an application
**To select a configuration and build a driver or an application**
1. Open a Visual Studio Command Prompt window at the **Start** screen. From this window you can use MsBuild.exe to build any Visual Studio project by specifying the project (.VcxProj) or solutions (.Sln) file.
2. Navigate to the project directory and enter the **MSbuild** command for your target. For example, to perform a clean build of a Visual Studio driver project called *filtername*.vcxproj, navigate to the project directory and enter the following MSBuild command: **msbuild /t:clean /t:build .\\fastfat.vcxproj**.
2. Navigate to the project directory and enter the **MSbuild** command for your target. For example, to perform a clean build of a Visual Studio driver project called *filtername*.vcxproj, navigate to the project directory and enter the following MSBuild command:
Run the sample
--------------
**msbuild /t:clean /t:build .\\fastfat.vcxproj**.
Installation
------------
No INF file is provided with this sample because the *fastfat* file system driver (fastfat.sys) is already part of the Windows operating system. You can build a private version of this file system and use it as a replacement for the native driver.
[Send comments about this topic to Microsoft](mailto:wsddocfb@microsoft.com?subject=Documentation%20feedback%20[\ifsk]:%20fastfat%20File%20System%20Driver%20%20RELEASE:%20(1/23/2015)&body=%0A%0APRIVACY%20STATEMENT%0A%0AWe%20use%20your%20feedback%20to%20improve%20the%20documentation.%20We%20don't%20use%20your%20email%20address%20for%20any%20other%20purpose,%20and%20we'll%20remove%20your%20email%20address%20from%20our%20system%20after%20the%20issue%20that%20you're%20reporting%20is%20fixed.%20While%20we're%20working%20to%20fix%20this%20issue,%20we%20might%20send%20you%20an%20email%20message%20to%20ask%20for%20more%20info.%20Later,%20we%20might%20also%20send%20you%20an%20email%20message%20to%20let%20you%20know%20that%20we've%20addressed%20your%20feedback.%0A%0AFor%20more%20info%20about%20Microsoft's%20privacy%20policy,%20see%20http://privacy.microsoft.com/en-us/default.aspx. "Send comments about this topic to Microsoft")

Просмотреть файл

@ -23,19 +23,14 @@ Once you have downloaded the sample, the .mht files in the sample's docs directo
For more information about WFP callout drivers, see [Windows Filtering Platform Callout Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff571068).
Related topics
--------------
[Windows Filtering Platform Callout Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff571068)
Open the driver solution in Visual Studio
-----------------------------------------
Navigate to the folder that has the extracted sample. Double click the solution file, WFPSampler.sln. In Visual Studio, locate Solution Explorer. (If this is not already open, choose **Solution Explorer** from the **View** menu.) In Solution Explorer, you can see one solution that has 6 projects:
Navigate to the folder that contains the sample. Double click the solution file, WFPSampler.sln. In Visual Studio, locate Solution Explorer. (If this is not already open, choose **Solution Explorer** from the **View** menu.) In Solution Explorer, you can see one solution that has these projects:
- a user-mode application project named **WFPSampler** (under the **Exe** node)
- a user-mode library project named **WFPSampler** (under the **Lib** node)
- a package project named **package** (lower case) (under the **Package** node)
- a user-mode service project named **WFPSamplerService** (under the **Svc** node)
- a driver project named **WFPSamplerCalloutDriver** (under the **Sys** node)
- a kernel-mode library project named **WFPSampler** (under the **Syslib** node)
@ -43,60 +38,7 @@ Navigate to the folder that has the extracted sample. Double click the solution
Set the configuration and platform in Visual Studio
---------------------------------------------------
In Visual Studio, in Solution Explorer, right click **Solution WFPSampler (6 projects)**, and choose **Configuration Manager**. Set the configuration and the platform. Make sure that the configuration and platform are the same for all three projects. Do not check the **Deploy** boxes. SHere are some examples of configuration and platform settings.
<table>
<colgroup>
<col width="33%" />
<col width="33%" />
<col width="33%" />
</colgroup>
<thead>
<tr class="header">
<th align="left">Configuration
Platform
Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">Win8.1 Debug
x64
The driver will run on an x64 hardware platform that is running Windows 8.1. The driver will not run on any earlier versions of Windows.</td>
<td align="left">Win7 Debug
x64
The driver will run on an x64 hardware platform that is running Windows 7 or a later version of Windows.</td>
</tr>
</tbody>
</table>
Set the KMDF version for the driver and kernel-mode library
-----------------------------------------------------------
The operating system that you specified in your configuration is called the *target operating system*. For example, if you specified Win7 Debug in your configuration, your target operating system is Windows 7. In Solution Explorer, right-click **WFPSamplerCalloutDriver** (under the **Sys** node), and choose **Properties**. Navigate to **Configuration Properties \> Driver Model Settings**. Set **KMDF Version Major** to 1. Set **KMDF Version Minor** according to your target operating system.
<table>
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<thead>
<tr class="header">
<th align="left">Target operating system
KMDF minor version</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">Windows 7
9</td>
<td align="left">Windows 8
11</td>
</tr>
</tbody>
</table>
Repeat this process for the **WFPSampler** kernel-mode library (under the **Syslib** node).
In Visual Studio, in Solution Explorer, right click **Solution WFPSampler (5 projects)**, and choose **Configuration Manager**. Set the configuration and the platform. Make sure that the configuration and platform are the same for all projects. Do not check the **Deploy** boxes.
Set the runtime library for the user-mode application, library, and service
---------------------------------------------------------------------------
@ -112,29 +54,11 @@ Open the WfpSamplerInstall.cmd file (in the scripts folder) in Visual Studio.
Change this line:
<table>
<colgroup>
<col width="100%" />
</colgroup>
<tbody>
<tr class="odd">
<td align="left"><pre><code>RunDLL32.Exe syssetup,SetupInfObjectInstallAction DefaultInstall 131 %WinDir%\System32\Drivers\WFPSamplerCalloutDriver.Inf</code></pre></td>
</tr>
</tbody>
</table>
`RunDLL32.Exe syssetup,SetupInfObjectInstallAction DefaultInstall 131 %WinDir%\System32\Drivers\WFPSamplerCalloutDriver.Inf`
to this:
<table>
<colgroup>
<col width="100%" />
</colgroup>
<tbody>
<tr class="odd">
<td align="left"><pre><code>RunDLL32.Exe syssetup,SetupInfObjectInstallAction DefaultInstall 132 %WinDir%\System32\Drivers\WFPSamplerCalloutDriver.Inf</code></pre></td>
</tr>
</tbody>
</table>
`RunDLL32.Exe syssetup,SetupInfObjectInstallAction DefaultInstall 132 %WinDir%\System32\Drivers\WFPSamplerCalloutDriver.Inf`
For more information about this setting, see the Remarks section for the [**InstallHinfSection**](http://msdn.microsoft.com/en-us/library/windows/hardware/aa376957) function.
@ -148,62 +72,41 @@ For more information about using Microsoft Visual Studio to build a driver packa
Locate the built driver package
-------------------------------
In File Explorer, navigate to the folder that contains your built driver package. The location of this folder varies depending on what you set for configuration and platform. For example, if your settings are Win7 Debug and x64, the package is in your sample folder under x64\\Win7Debug\\package.
In File Explorer, navigate to the folder that contains your built driver package. The location of this folder varies depending on what you set for configuration and platform. For example, if your settings are Debug and x64, the driver is in your sample folder under **\\Debug**.
The package folder contains these 4 files:
The driver folder contains these files:
<table>
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<thead>
<tr class="header">
<th align="left">File
Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">wfpsamplercalloutdriver.cat
A signed catalog file, which serves as the signature for the entire package.</td>
<td align="left">WFPSamplerCalloutDriver.inf
An information (INF) file that contains information needed to install the driver.</td>
</tr>
</tbody>
</table>
File | Description
-----|------------
wfpsamplercalloutdriver.cat | A signed catalog file, which serves as the signature for the entire package.
WFPSamplerCalloutDriver.inf | An information (INF) file that contains information needed to install the driver.
WFPSamplerCalloutDriver.sys | The WFPSampler driver.
**Note**  
**Note**  The build process might also put WdfCoinstaller010*xx*.dll in the driver folder, but this file is not really part of the driver package. The INF file does not reference any coinstallers.
The build process might also put WdfCoinstaller010*xx*.dll in the package folder, but this file is not really part of the driver package. The INF file does not reference any coinstallers. The driver package, which is test-signed, actually contains only three files:
- wfpsamplercalloutdriver.cat
- WFPSamplerCalloutDriver.inf
- WFPSamplerCalloutDriver.sys
Because the package does not contain a KMDF coinstaller, it is important that you set the KMDF minor version (as described previously) according to your target operating system when you built the driver.
Because the package does not contain a KMDF coinstaller, it is important that you set the KMDF minor version according to your target operating system when you built the driver.
Locate the symbol file (PDB) for the driver
-------------------------------------------
In **File Explorer**, locate the symbol file, WFPSamplerCalloutDriver.pdb. The location of this file varies depending on what you set for configuration and platform. For example, if your settings are Win7 Debug and x64, the PDB file is in your sample folder under sys\\x64\\Win7Debug.
In **File Explorer**, locate the symbol file, WFPSamplerCalloutDriver.pdb. The location of this file varies depending on what you set for configuration and platform. For example, if your settings are Debug and Win32, the PDB file is in your sample folder under sys\\Debug.
Locate the user-mode application and its symbol file (PDB)
----------------------------------------------------------
In **File Explorer**, locate the user-mode application (WFPSampler.exe) and its symbol file (WFPSampler.pdb). The location of these files varies depending on what you set for configuration and platform. For example, if your settings are Win7 Debug and x64, WFPSampler.exe and WFPSampler.pdb are in your sample folder under exe\\x64\\Win7Debug.
In **File Explorer**, locate the user-mode application (WFPSampler.exe) and its symbol file (WFPSampler.pdb). The location of these files varies depending on what you set for configuration and platform. For example, if your settings are Debug and x64, WFPSampler.exe and WFPSampler.pdb are in your sample folder under exe\\Debug.
Locate the kernel-mode service and its symbol file (PDB)
--------------------------------------------------------
In **File Explorer**, locate the kernel-mode library, WFPSamplerService.exe. The location of this file varies depending on what you set for configuration and platform. For example, if your settings are Win7 Debug and x64, WFPSamplerService.exe and WFPSamplerService.pdb are in your sample folder under svc\\x64\\Win7Debug.
In **File Explorer**, locate the kernel-mode library, WFPSamplerService.exe. The location of this file varies depending on what you set for configuration and platform. For example, if your settings are Debug and x64, WFPSamplerService.exe and WFPSamplerService.pdb are in your sample folder under svc\\Debug.
Run the sample
--------------
The computer where you install the driver is called the *target computer* or the *test computer*. Typically this is a separate computer from where you develop and build the driver package. The computer where you develop and build the driver is called the *host computer*.
The process of moving the driver package to the target computer and installing the driver is called *deploying the driver*. You can deploy the Windows Filtering Platform Sample driver automatically or manually.
The process of moving the driver to the target computer and installing the driver is called *deploying the driver*. You can deploy the Windows Filtering Platform Sample driver automatically or manually.
Automatic deployment
--------------------
@ -231,10 +134,10 @@ Copy additional files to the target computer
Copy the driver's PDB file (WFPSamplerCalloutDriver.pdb), the user-mode service's PDB file (WFPSamplerService.pdb) and the user-mode application's PDB file (WFPSampler.pdb) to a folder on the target computer (for example, c:\\Symbols).
Copy the [TraceView](http://msdn.microsoft.com/en-us/library/windows/hardware/ff553872) and [**SignTool**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff551778) tools to a folder on the target computer (for example c:\\Tools).
Copy the [**TraceView**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff553872) and [**SignTool**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff551778) tools to a folder on the target computer (for example c:\\Tools).
- [TraceView](http://msdn.microsoft.com/en-us/library/windows/hardware/ff553872) comes with the WDK. You can find it in your WDK installation folder under Tools (for example, c:\\Program Files (x86)\\Windows Kits\\8.1\\Tools\\x64\\TraceView.exe).
- [**SignTool**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff551778) also comes with the WDK. You can find it in your WDK installation folder under bin (for example, c:\\Program Files (x86)\\Windows Kits\\8.1\\bin\\x64\\SignTool.exe).
- [**TraceView**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff553872) comes with the WDK. You can find it in your WDK installation folder under Tools (for example, c:\\Program Files (x86)\\Windows Kits\\10\\Tools\\x64\\TraceView.exe).
- [**SignTool**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff551778) also comes with the WDK. You can find it in your WDK installation folder under bin (for example, c:\\Program Files (x86)\\Windows Kits\\10\\bin\\x64\\SignTool.exe).
Installing the driver
---------------------

Просмотреть файл

@ -14,13 +14,13 @@ Building a Driver Using Visual Studio
You build a driver the same way you build any project or solution in Visual Studio. When you create a new driver project using a Windows driver template, the template defines a default (active) project configuration and a default (active) solution build configuration. When you create a project from existing driver sources or convert existing driver code that was built with previous versions of the WDK, the conversion process preserves the target version information (operating systems and platform).
The default Solution build configuration is Windows 8.1 Debug and Win32.
The default Solution build configuration is **Debug** and **Win32**.
### To select a configuration and build a driver or an application
1. Open the driver project or solution in Visual Studio (find *samplename*.sln or *samplename*.vcxproj).
2. Right-click the solution in the **Solutions Explorer** and select **Configuration Manager**.
3. From the **Configuration Manager**, select the **Active Solution Configuration** (for example, Windows 8.1 Debug or Windows 8.1 Release) and the **Active Solution Platform** (for example, Win32) that correspond to the type of build you are interested in.
3. From the **Configuration Manager**, select the **Active Solution Configuration** (for example, Debug or Release) and the **Active Solution Platform** (for example, Win32) that correspond to the type of build you are interested in.
4. From the Build menu, click **Build Solution** (Ctrl+Shift+B).
Building a Driver Using the Command Line (MSBuild)
@ -31,7 +31,9 @@ You can build a driver from the command line using the Visual Studio Command Pro
### To select a configuration and build a driver or an application
1. Open a Visual Studio Command Prompt window at the **Start** screen. From this window you can use MsBuild.exe to build any Visual Studio project by specifying the project (.VcxProj) or solutions (.Sln) file.
2. Navigate to the project directory and enter the **MSbuild** command for your target. For example, to perform a clean build of a Visual Studio driver project called *filtername*.vcxproj, navigate to the project directory and enter the following MSBuild command: **msbuild /t:clean /t:build .\\***samplename***.vcxproj**.
2. Navigate to the project directory and enter the **MSbuild** command for your target. For example, to perform a clean build of a Visual Studio driver project called *filtername*.vcxproj, navigate to the project directory and enter the following MSBuild command:
**msbuild /t:clean /t:build .\\<*samplename*>.vcxproj**.
Installation and Operation
--------------------------
@ -42,13 +44,15 @@ The installer sample only needs to be called one time with the INF/driver source
The following annotated DSM INF file illustrates the correct format for your DSM. Replace only those items that are in bold italics. Remember, you must not use "GENDSM" or "MSISCDSM" or "MSDSM" as the name of your DSM. Therefore, you must replace any instances of those strings with the proper name of your DSM.
```
;
; Copyright (c) <YOUR COMPANY NAME HERE>. All rights reserved.
;
```
In the Version section, make sure the DriverVer is correct for your DSM. Ideally it should match the version in the RC file. You must specify a different catalog file since the MPIO core drivers now come pre-signed:
```
[Version]
Signature = "$WINDOWS NT$"
Class = System
@ -66,10 +70,11 @@ DefaultDestDir = 12
[Manufacturer]
%std_mfg% = std_mfg
```
Substitute all instances of "gendsm" with the proper name for your DSM. For example, "mydsm":
```
[std_mfg]
%mydsm_devicedesc% = mydsm_install, Root\MYDSM
@ -87,7 +92,7 @@ ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\mydsm.sys
LoadOrderGroup = "System Bus Extender"
AddReg = mydsm_addreg
```
This next section contains the Hardware ID strings for your devices. You can have more than one. Sample format: "VENDOR PRODUCT " - remember to use spaces in a field (vendor, product ID) to pad this to be eight characters for the vendor name (as registered with STA) and sixteen for the product ID (unless the supported devices share a common prefix, in which case the product ID can be less than 16 characters).
@ -95,20 +100,22 @@ This next section contains the Hardware ID strings for your devices. You can hav
In this sample, there are two different strings:
```
;
; The following cannot be grouped (as above)
;
HKLM, "SYSTEM\CurrentControlSet\Control\MPDEV", "MPIOSupportedDeviceList", %REG_MULTI_SZ_APPEND%, "VENDOR1 PRODUCT1 "
HKLM, "SYSTEM\CurrentControlSet\Control\MPDEV", "MPIOSupportedDeviceList", %REG_MULTI_SZ_APPEND%, "VENDOR2 PRODUCT2 "
```
These are valid samples:
```
HKLM, "SYSTEM\CurrentControlSet\Control\MPDEV", "MPIOSupportedDeviceList", %REG_MULTI_SZ_APPEND%, "MAXTOR ATLASU320_18_WLS"
HKLM, "SYSTEM\CurrentControlSet\Control\MPDEV", "MPIOSupportedDeviceList", %REG_MULTI_SZ_APPEND%, "VENDOR3 PROD_PREFIX"
```
(to replace "VENDOR3 PROD\_PREFIX\_A ", "VENDOR3 PROD\_PREFIX\_B " and "VENDOR3 PROD\_PREFIX\_C ")
@ -118,7 +125,7 @@ It is advisable to use this format if your storage devices generate product IDs
Add one entry for each WMI GUID that you use in your DSM. This is required:
```
HKLM, "SYSTEM\CurrentControlSet\Control\WMI\Security", "04517f7e-92bb-4ebe-aed0-54339fa5f544",\%REG_BINARY_NOCLOBBER%,\
01,00,04,80,14,00,00,00,24,00,00,00,00,00,00,00,\
34,00,00,00,01,02,00,00,00,00,00,05,20,00,00,00,\
@ -148,17 +155,18 @@ HKLM, "SYSTEM\CurrentControlSet\Control\WMI\Security", "d6dc1bf0-95fa-4246-afd7-
;
; Localizable Strings
;
```
Finally, modify the following strings:
```
[Strings]
VNDR = "Your Company Name Here"
std_mfg = "(Standard system devices)"
mydsm_devicedesc = "<Your product> Multi-Path Device Specific Module"
```
The following string is displayed as the friendly name of your DSM:
```
mydsm_desc = "<Your product name> Multi-Path DSM"
;
@ -182,14 +190,14 @@ REG_MULTI_SZ_APPEND = 0x00010008
REG_EXPAND_SZ = 0x00020000
REG_DWORD = 0x00010001
REG_BINARY_NOCLOBBER = 0x00030003
```
You should be aware of the following when you install the MPIO DSM sample:
1. The install sample assumes that all necessary files have already been copied over to a vendor specific directory (preferably a folder under Program Files) and takes that path as one of the parameters. This eliminates requests for the original media when new devices appear.
2. As the port filter needs to go on top of every adapter that hosts (or might host) a path to the disk, all SCSI adapters are restarted at the end of the install
It is expected that the adapter that hosts the system volumes (boot/paging) will not restart, but that should not be problem if you are not multipathing the boot volume. However, if you are multipathing the boot volume, you will need to restart the system.
It is expected that the adapter that hosts the system volumes (boot/paging) will not restart, but that should not be problem if you are not multipathing the boot volume. However, if you are multipathing the boot volume, you will need to restart the system.
**Note**  Other filter drivers installed as port filters may interfere with the proper operation of the MPIO port filter. Microsoft does not recommend the use of such filter drivers which may be supplied by HBA miniport vendors.

Просмотреть файл

@ -23,32 +23,7 @@ If you have a different USB device, you can still use the driver by adding the d
Set the configuration and platform in Visual Studio
---------------------------------------------------
In Visual Studio, in Solution Explorer, right click **Solution usbsamp (3 projects)**, and choose **Configuration Manager**. Set the configuration and the platform. Make sure that the configuration and platform are the same for both the driver project and the package project. Do not check the **Deploy** boxes. Here are some examples of configuration and platform settings.
<table>
<colgroup>
<col width="33%" />
<col width="33%" />
<col width="33%" />
</colgroup>
<thead>
<tr class="header">
<th align="left">Configuration
Platform
Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">Win8.1 Debug
x64
The driver will run on an x64 hardware platform that is running Windows 8.1. The driver will not run on any earlier versions of Windows.</td>
<td align="left">Win7 Debug
x64
The driver will run on an x64 hardware platform that is running Windows 7 or a later version of Windows.</td>
</tr>
</tbody>
</table>
In Visual Studio, in Solution Explorer, right click **Solution usbsamp (3 projects)**, and choose **Configuration Manager**. Set the configuration and the platform. Make sure that the configuration and platform are the same for both the driver project and the package project. Do not check the **Deploy** boxes.
Build the sample using Visual Studio
------------------------------------
@ -57,33 +32,18 @@ In Visual Studio, on the **Build** menu, choose **Build Solution**.
For more information about using Visual Studio to build a driver package, see [Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644).
Locate the built driver package
-------------------------------
Locate the built driver
-----------------------
In File Explorer, navigate to the folder that contains your built driver package. The location of this folder varies depending on what you set for configuration and platform. For example, if your settings are Win7 Debug and x64, the package is in your solution folder under x64\\Win7Debug\\Package.
In File Explorer, navigate to the folder that contains your built driver package. The location of this folder varies depending on what you set for configuration and platform. For example, if your settings are Debug and x64, the driver is in your solution folder under sys\\driver\\Debug\\usbsamp.
The package contains these files:
The driver folder contains these files:
<table>
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<thead>
<tr class="header">
<th align="left">File
Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">usbsamp.sys
The driver file.</td>
<td align="left">WdfCoinstaller010<em>xx</em>.dll
The coinstaller for version 1.<em>xx</em> of KMDF.</td>
</tr>
</tbody>
</table>
File | Description
-----|------------
usbsamp.sys | The driver file.
usbsamp.inf | An information (INF) file that contains information needed to install the driver.
kmdfsamples.cat | A signed catalog file, which serves as the signature for the entire package.
Run the sample
--------------
@ -133,7 +93,7 @@ Testing the sample
The sample includes a test application, usbsamp.exe. This console application enumerates the interface registered by the driver and opens the device to send Read, Write, or DeviceIoControl requests based on the command line options. To test the sample,
1. In Visual Studio, choose **Solution Explorer** from the **View** menu. Locate the application project named **usbsamp**, under the **Exe** folder.
2. Right-click and choose **Build**. For example, if your settings are Win8.1 Debug and x64, the application executable is in your solution folder under the exe\\x64\\Win8.1Debug\\usbsamp.exe.
2. Right-click and choose **Build**. For example, if your settings are Debug and x64, the application executable is in your solution folder under the exe\\Debug\\usbsamp.exe.
3. Run the executable on the target machine.
- To view all descriptors and endpoint information, use the following command.