Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
barrygolden committed Aug 8, 2015
1 parent 7c089b4 commit 9321701
Show file tree
Hide file tree
Showing 35 changed files with 219 additions and 434 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Use Visual Studio 2015 and Windows Driver Kit (WDK) 10 to build, test, and deplo
### Windows 10 Driver Kit (WDK)
Take a look at the compilation of the new and changed driver-related content for Windows 10. Areas of improvement include camera, print, display, Near Field Communication (NFC), WLAN, Bluetooth, and more.

[Find out whats new in the WDK](http://go.microsoft.com/fwlink/p/?LinkId=528349 "Find out what's new in the WDK")
[Find out what's new in the WDK](http://go.microsoft.com/fwlink/p/?LinkId=528349 "Find out what's new in the WDK")

### Universal Windows drivers
Write one driver that runs on both Windows 10 for desktop editions and Windows 10 Mobile devices, as well as other Windows 10 editions that share a common set of interfaces.
Expand All @@ -22,7 +22,7 @@ The Windows Driver Frameworks (WDF) are a set of libraries that make it simple t
[WDF driver development guide](http://go.microsoft.com/fwlink/p/?LinkId=524489 "WDF driver development guide")

### Samples
Use the samples in this repo to guide your Windows driver development. Whether youre just getting started or porting an older driver to the newest version of Windows, code samples are valuable guides on how to write drivers.
Use the samples in this repo to guide your Windows driver development. Whether you're just getting started or porting an older driver to the newest version of Windows, code samples are valuable guides on how to write drivers.

### Build your first driver
If you're writing your first driver, use these exercises to get started. Each exercise is independent of the others, so you can do them in any order.
Expand Down
2 changes: 1 addition & 1 deletion audio/sysvad/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ On the target computer, perform the steps in the **Test the sample** section to

### Manual deployment

Before you manually deploy a driver, you must prepare the target computer by turning on test signing and by installing a certificate. You also need to locate the DevCon tool in your WDK installation. After that youre ready to run the built driver sample.
Before you manually deploy a driver, you must prepare the target computer by turning on test signing and by installing a certificate. You also need to locate the DevCon tool in your WDK installation. After that you're ready to run the built driver sample.

**1. Prepare the target computer**

Expand Down
10 changes: 5 additions & 5 deletions avstream/avshws/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ This sample features enhanced parameter validation and overflow detection.
Provision a target computer
---------------------------

After you've installed the sample on your host computer, run Visual Studio, and from the **File** menu, select **Open**, then **Project/Solution**, navigate to the directory where youve copied the Avshws sample, then to the C++ folder, and select **avshws.vcxproj** (the VC++ Project).
After you've installed the sample on your host computer, run Visual Studio, and from the **File** menu, select **Open**, then **Project/Solution...**, navigate to the directory where you've copied the Avshws sample, then to the C++ folder, and select **avshws.vcxproj** (the VC++ Project).

In the **Solution Explorer** pane in Visual Studio, at the top is **Solution avshws**. Right-click this and select **Configuration Manager**. Follow the instructions in [Building a Driver with the WDK](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644) to set the platform, operating system, and debug configuration you want to use, and to build the sample. This sample project will automatically sign the driver package.
In the **Solution Explorer** pane in Visual Studio, at the top is **Solution 'avshws'**. Right-click this and select **Configuration Manager**. Follow the instructions in [Building a Driver with the WDK](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644) to set the platform, operating system, and debug configuration you want to use, and to build the sample. This sample project will automatically sign the driver package.

Provision your target computer using instructions in, for example, [Preparing a Computer for Provisioning](http://msdn.microsoft.com/en-us/library/windows/hardware/dn265573). Ensure that in the **Network and Sharing Center** control panel your target computer has **Network Discovery** and **File and Printer Sharing** enabled.

Deploy the driver to the target computer
----------------------------------------

Now you can deploy the Avshws driver that you've just built to the target computer, using guidance in [Deploying a Driver to a Test Computer](http://msdn.microsoft.com/en-us/library/windows/hardware/hh454834). Specifically, find the package file under the **Package** folder in the Avshws solution. Right-click **package** and select **Properties**. Under Configuration Properties, click **Driver install** and then **Deployment**. Here you must click the check box for **Enable deployment**, and then click the button to the right of **\<Configure Computer\>**. In the next dialog you enter the **Target Computer Name** and can let the host computer automatically provision the target computer and set up debugger options.
Now you can deploy the Avshws driver that you've just built to the target computer, using guidance in [Deploying a Driver to a Test Computer](http://msdn.microsoft.com/en-us/library/windows/hardware/hh454834). Specifically, find the package file under the **Package** folder in the Avshws solution. Right-click **package** and select **Properties**. Under Configuration Properties, click **Driver install** and then **Deployment**. Here you must click the check box for **Enable deployment**, and then click the button to the right of **\<Configure Computer...\>**. In the next dialog you enter the **Target Computer Name** and can let the host computer automatically provision the target computer and set up debugger options.

Finally, in Visual Studio, from the **Build** menu select **Deploy Solution** to deploy the sample to the target computer. On the target computer, you can see the deployed package in the **%Systemdrive%\\drivertest\\drivers** folder.

Expand All @@ -32,7 +32,7 @@ On the target computer, open Device Manager, and follow these steps:
4. You should see the **AVStream Simulated Hardware Sample** in the **Model** pane on the right. Click this and then click **Next**.
5. Click **Next** again to install the driver, and then click **Finish** to exit the wizard.

The sample driver now appears in the Device Manager console tree under **Sound, video and game controllers**. The Avshws INF file will be on the system drive at, for example, **windows\\System32\\DriverStore\\FileRepository\\**.
The sample driver now appears in the Device Manager console tree under **Sound, video and game controllers**. The Avshws INF file will be on the system drive at, for example, **...windows\\System32\\DriverStore\\FileRepository\\**.

Sample code hierarchy
---------------------
Expand All @@ -56,7 +56,7 @@ Follow these steps to see how the sample driver functions:

1. After installation has completed, access the driver through the Graphedt tool. Graphedt.exe is available in the *tools* directory of the WDK.
2. Before running GraphEdit, use the regsvr32 utility to register the proppage.dll DLL and to enable GraphEdit to display property pages for some of the built-in Microsoft DirectShow filters. Open an elevated command window with Administrator privileges, and navigate to the WDK or SDK *tools* directory that contains proppage.dll.
3. On the command line, type regsvr32 proppage.dll. If the registration succeeds, youll get a message, DllRegisterServer in proppage.dll succeeded. Click OK.
3. On the command line, type regsvr32 proppage.dll. If the registration succeeds, you'll get a message, "DllRegisterServer in proppage.dll succeeded." Click OK.
4. In the Graphedt tool, click the **Graph** menu and click **Insert Filters**. The sample appears under "WDM Streaming Capture Devices" as "avshws Source."
5. Click **Insert Filter**. The sample appears in the graph as a single filter labeled, "avshws Source." There is one output pin, which is the video capture pin. This pin emits video in YUY2 format.
6. Attach this filter to either a DirectShow Video Renderer or to the VMR default video renderer. Then click **Play**.
Expand Down
47 changes: 21 additions & 26 deletions avstream/avssamp/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,25 @@ Audio.cpp lays out a [**KSPIN\_DISPATCH**](http://msdn.microsoft.com/en-us/libra

For more information, see the comments in all .cpp files.

Code tour
---------

**File manifest**

<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">Audio.cpp
<p>Audio capture pin implementation</p></td>
<td align="left">Audio.h
<p>Header file for Audio.cpp</p></td>
</tr>
</tbody>
</table>

File Manifest
-------------

File | Description
-----|----------
Audio.cpp | Audio capture pin implementation.
Audio.h | Header file for Audio.cpp.
Avssamp.cpp | Main file for the AVStream filter-centric sample.
Avssamp.h | Main header for the AVStream filter-centric sample.
Avssamp.inf | Installation information for the AVStream sample driver (avssamp.sys).
Capture.cpp | Capture pin implementation for all capture pins on the sample filter.
Capture .h | Capture pin level header for all capture pins on the sample filter.
Filter.cpp | Capture filter implementation (including frame synthesis) for the fake capture filter.
Filter.h | Filter level header for the filter-centric capture filter.
Image.cpp | Image synthesis and overlay code. These objects provide image synthesis (pixel, color-bar, etc) onto RGB24 and UYVY buffers as well as software string overlay into these buffers.
Image.h | Image synthesis and overlay header.
Purecall.h | _purecall stub necessary for virtual function usage in drivers.
Video.cpp | Video capture pin implementation.
Video.h | Video capture pin header.
Wave.cpp | Wave object implementation
Wave.h | Wave object header

24 changes: 12 additions & 12 deletions bluetooth/bthecho/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Bluetooth Echo L2CAP Profile Driver
===================================

This sample demonstrates developing [Bluetooth L2CAP profile drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff536598) using [Bluetooth L2CAP DDIs](http://msdn.microsoft.com/en-us/library/windows/hardware/ff536585).The sample includes two drivers. One for a device that acts as an L2CAP server and another for a device that acts as an L2CAP client. The server simply echoes back any data that it receives from client on the same L2CA channel. These drivers can be used with devices that can be installed with bth.inf. Such devices get installed as Generic Bluetooth Radio. Examples of such devices are Bluetooth USB dongles such as (but not limited to):
This sample demonstrates developing [Bluetooth L2CAP profile drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff536598) using [Bluetooth L2CAP DDIs](http://msdn.microsoft.com/en-us/library/windows/hardware/ff536585).The sample includes two drivers. One for a device that acts as an L2CAP server and another for a device that acts as an L2CAP client. The server simply echoes back any data that it receives from client on the same L2CA channel. These drivers can be used with devices that can be installed with bth.inf. Such devices get installed as 'Generic Bluetooth Radio'. Examples of such devices are Bluetooth USB dongles such as (but not limited to):

```
Generic Bluetooth Radio=\
Expand Down Expand Up @@ -63,7 +63,7 @@ Run the sample

If errorlevel is 1, you need to reboot the machine for KMDF update to take effect. If errorlevel is 2, please make sure that you have the driver files described in \#1 available in the current directory. For more information on installation failure please check setup logs.

4. Upon successful installation you will see Bluetooth Echo Sample Server in Device Manager under Bluetooth devices.
4. Upon successful installation you will see 'Bluetooth Echo Sample Server' in Device Manager under Bluetooth devices.

**Device tree for Echo Server device**

Expand Down Expand Up @@ -103,13 +103,13 @@ Run the sample

2. Copy KMDF coinstaller (wdfcoinstallerMMmmm.dll, from redist\\wdf\\), BthEchoSampleCli.Sys, BthEchoSampleCli.inf and bthecho.exe on a temporary directory on the target machine.

3. Run bthprops.cpl from a command line or right click on the Bluetooth icon in the system tray and select Show Devices' to bring up a list of installed Bluetooth devices.
3. Run bthprops.cpl from a command line or right click on the Bluetooth icon in the system tray and select 'Show Devices' to bring up a list of installed Bluetooth devices.

4. In the **Bluetooth Devices** window, click the **Add a device** button.

5. In the Add a Device wizard select the server machine (the machine where you installed the echo server) as a Bluetooth device. If the server machine does not appear, please check the echo server installation and make sure that you have enabled Allow Bluetooth device to find this computer on the server machine as explained above. When the server machine is correctly displayed, select it and pick Next.
5. In the Add a Device wizard select the server machine (the machine where you installed the echo server) as a Bluetooth device. If the server machine does not appear, please check the echo server installation and make sure that you have enabled 'Allow Bluetooth device to find this computer' on the server machine as explained above. When the server machine is correctly displayed, select it and pick 'Next'.

6. The wizard should default to a numeric compare ceremony for pairing the machines. When this happens, ensure the numbers match on both the client and the server, select Yes on both machines to indicate they match, and click Next on both machines to complete the pairing.
6. The wizard should default to a numeric compare ceremony for pairing the machines. When this happens, ensure the numbers match on both the client and the server, select 'Yes' on both machines to indicate they match, and click 'Next' on both machines to complete the pairing.

7. Go through Device Manager and update driver software for it. Either point the wizard to the temporary directory created in step \#2, or use devcon.exe from the tools\\devcon folder to install the client device:

Expand All @@ -119,20 +119,20 @@ Run the sample

Check for any error from devcon.exe as described in server installation.

If the installation is successful, you will see Bluetooth Echo Sample Client in Device Manager under Bluetooth devices.
If the installation is successful, you will see 'Bluetooth Echo Sample Client' in Device Manager under Bluetooth devices.

The device tree for echo client device is similar to the one shown for the echo server device, since both client and server are enumerated by BthEnum.sys (although the installation mechanism and properties of client and server are different).

**Uninstalling Server**

1. Uninstall the device and delete driver software using the Bluetooth Devices window by running bthprops.cpl, right clicking on the device, and selecting Remove Device
1. Uninstall the device and delete driver software using the Bluetooth Devices window by running bthprops.cpl, right clicking on the device, and selecting 'Remove Device'

2. Run bthsrvinst.exe /u to uninstall the echo server. This would make bthenum.sys stop enumerating the echo server. Without this step Found New Hardware wizard will be launched again when you reconnect the device.
2. Run bthsrvinst.exe /u to uninstall the echo server. This would make bthenum.sys stop enumerating the echo server. Without this step 'Found New Hardware' wizard will be launched again when you reconnect the device.

**Uninstalling Client**


- Uninstall the device and delete driver software using the Bluetooth Devices window by running bthprops.cpl, right clicking on the device, and selecting Remove Device
- Uninstall the device and delete driver software using the Bluetooth Devices window by running bthprops.cpl, right clicking on the device, and selecting 'Remove Device'.

**TESTING**

Expand Down Expand Up @@ -202,12 +202,12 @@ One transition to note here is that if disconnect is received in the connecting

**Client**

**Startup**: Client retrieves local and server Bluetooth address in BthEchoSrvEvtDeviceSelfManagedIoInit (this callback is invoked by WDF during device start). Please note that server Bluetooth address would be available regardless of presence of the server. Thus echo client device start doesnt fail even if echo server is not available.
**Startup**: Client retrieves local and server Bluetooth address in BthEchoSrvEvtDeviceSelfManagedIoInit (this callback is invoked by WDF during device start). Please note that server Bluetooth address would be available regardless of presence of the server. Thus echo client device start doesn't fail even if echo server is not available.

**Connecting to server**: Client connects to echo server when application opens a handle to it (BthEchoCliEvtDeviceFileCreate) and closes the connection on file close (BthEchoCliEvtFileClose).

**Sending and receiving data from server**: When application writes data to the client, client sends this data to server on the connection opened for the given handle. Server would echo back this data. This data is retrieved by the application using a read operation. Echo Sample Client doesnt do any draining of echoed data on its own. Application read/write are handled using a parallel WDF I/O queue.
**Sending and receiving data from server**: When application writes data to the client, client sends this data to server on the connection opened for the given handle. Server would echo back this data. This data is retrieved by the application using a read operation. Echo Sample Client doesn't do any draining of echoed data on its own. Application read/write are handled using a parallel WDF I/O queue.

**Shutdown**: Client doesnt need any specific shutdown code as connection open/close and read/write are done within the context of applications handle open.
**Shutdown**: Client doesn't need any specific shutdown code as connection open/close and read/write are done within the context of application's handle open.


Loading

0 comments on commit 9321701

Please sign in to comment.