diff options
| -rw-r--r-- | general/PLX9x5x/README.md | 21 | ||||
| -rw-r--r-- | general/SimpleMediaSource/README.md | 11 | ||||
| -rw-r--r-- | general/SystemDma/wdm/README.md | 16 | ||||
| -rw-r--r-- | general/perfcounters/kcs/README.md | 15 | ||||
| -rw-r--r-- | general/registry/regfltr/README.md | 23 | ||||
| -rw-r--r-- | general/toaster/toastDrv/README.md | 94 |
6 files changed, 73 insertions, 107 deletions
diff --git a/general/PLX9x5x/README.md b/general/PLX9x5x/README.md index b72d1e01..ec998813 100644 --- a/general/PLX9x5x/README.md +++ b/general/PLX9x5x/README.md @@ -8,32 +8,21 @@ products: - windows-wdk --- - - -<!--- - name: PLX9x5x PCI Driver - platform: KMDF - language: cpp - category: General PCI WDF - description: Demonstrates how to write a driver for a generic PCI device using Windows Driver Frameworks (WDF). - samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617719 ----> - # PLX9x5x PCI Driver -This sample demonstrates how to write driver for a generic PCI device using Windows Driver Framework. The target hardware for this driver is PLX9656/9653RDK-LITE board. The product kit and the hardware specification are available at <http://www.plxtech.com>. +This sample demonstrates how to write driver for a generic PCI device using Windows Driver Framework. The target hardware for this driver is PLX9656/9653RDK-LITE board. The product kit and the hardware specification are available at the [PLX Technology](http://www.plxtech.com) website. For more information, see [Peripheral Component Interconnect (PCI) Bus Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff537451). -The device is a PCI device with port, memory, interrupt and DMA resources. Device can be stopped and started at run-time and also supports low power states. The driver is capable of doing concurrent read and write operations to the device but it can handle only one read or write request at any time. The following lists the driver framework interfaces demonstrated in this sample: +The device is a PCI device with port, memory, interrupt and DMA resources. The device can be stopped and started at run-time and also supports low power states. The driver is capable of doing concurrent read and write operations to the device but it can handle only one read or write request at any time. The following driver framework interfaces are demonstrated in this sample: -- Handling PnP & Power Events +- Handling PnP and Power Events - Registering a Device Interface -- Hardware resource mapping: Port, Memory & Interrupt +- Hardware resource mapping: Port, Memory, and Interrupt - DMA Interfaces - Serialized Default Queue for Write requests - Serialized custom Queue for Read requests -- Handling Interrupt & DPC +- Handling Interrupt and DPC To test the driver, run the PLX.EXE test application. diff --git a/general/SimpleMediaSource/README.md b/general/SimpleMediaSource/README.md index 1672441f..4467f16b 100644 --- a/general/SimpleMediaSource/README.md +++ b/general/SimpleMediaSource/README.md @@ -8,17 +8,6 @@ products: - windows-wdk --- - - -<!--- - name: SimpleMediaSource sample - platform: UMDF2 - language: cpp - category: general - description: Demonstrates how to write a custom media source and driver package. - samplefwlink: ----> - # SimpleMediaSource sample This sample demonstrates how to create a custom media source and driver package that can be installed as a camera and produce frames. diff --git a/general/SystemDma/wdm/README.md b/general/SystemDma/wdm/README.md index 3698f729..43770319 100644 --- a/general/SystemDma/wdm/README.md +++ b/general/SystemDma/wdm/README.md @@ -8,24 +8,14 @@ products: - windows-wdk --- - - -<!--- - name: System DMA sample - platform: WDM - language: cpp - category: General - description: Demonstrates how a driver could use a system DMA controller to write data to a hardware location using V3 System DMA. - samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617722 ----> - # System DMA This sample demonstrates the usage of V3 System DMA. It shows how a driver could use a system DMA controller supported by Windows to write data to a hardware location using DMA. -The sample consists of a legacy device driver and a Win32 console mode test application. The test application opens a handle to the device exposed by the driver and makes a DeviceIoControl call to initiate the example system DMA. To understand how the V3 system DMA calls are invoked please study SDmaWrite() in SDma.c. +The sample consists of a legacy device driver and a Win32 console mode test application. The test application opens a handle to the device exposed by the driver and makes a DeviceIoControl call to initiate the example system DMA. To understand how the V3 system DMA calls are invoked, see the SDmaWrite function in sdma.c. -**Note** This sample driver is not a PnP driver. This is a minimal driver meant to demonstrate an OS feature. Neither it nor its sample programs are intended for use in a production environment. Rather, they are intended for educational purposes and as a skeleton driver. +> [!NOTE] +> This sample driver is not a PnP driver. This is a minimal driver meant to demonstrate an OS feature. Neither it nor its sample programs are intended for use in a production environment. Rather, they are intended for educational purposes and as a skeleton driver. ## Run the sample diff --git a/general/perfcounters/kcs/README.md b/general/perfcounters/kcs/README.md index 0178fb8e..10316133 100644 --- a/general/perfcounters/kcs/README.md +++ b/general/perfcounters/kcs/README.md @@ -8,23 +8,12 @@ products: - windows-wdk --- - - -<!--- - name: Kernel Counter Sample (Kcs) - platform: WDM - language: cpp - category: General - description: Demonstrates the use of the kernel-mode performance library. - samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617718 ----> - # Kernel Counter Sample (Kcs) -The Kcs sample driver demonstrates the use of the [kernel-mode performance library](http://msdn.microsoft.com/en-us/library/windows/hardware/ff548159). The sample driver does not control any hardware; it simply provides example code that demonstrates how to provide counter data from a kernel-mode driver. The code contains comments to explain what each function does. The sample creates geometric wave and trigonometric wave counter sets. +The Kcs sample driver demonstrates the use of the [kernel-mode performance library](https://docs.microsoft.com/windows-hardware/drivers/devtest/kernel-mode-performance-monitoring). The sample driver does not control any hardware; it simply provides example code that demonstrates how to provide counter data from a kernel-mode driver. The code contains comments to explain what each function does. The sample creates geometric wave and trigonometric wave counter sets. This module contains sample code to demonstrate how to provide counter data from a kernel driver. This sample driver should not be used in a production environment. -The Microsoft Windows operating system allows system components and third parties to expose performance metrics in a standard way by using [Performance Counters](http://msdn.microsoft.com/en-us/library/windows/hardware/aa373083). Kernel-mode PCW providers are installed in the system as Performance Counter Library (PERFLIB) (Version 2 providers), which allows their counters to be browsed, and allows for data collection and instance enumeration. Consumers can query KM PCW providers by using PDH and PERFLIB Version 1 without any modification to the consumer code. +The Microsoft Windows operating system allows system components and third parties to expose performance metrics in a standard way by using [Performance Counters](https://docs.microsoft.com/windows/win32/perfctrs/performance-counters-portal). Kernel-mode PCW providers are installed in the system as Performance Counter Library (PERFLIB) (Version 2 providers), which allows their counters to be browsed, and allows for data collection and instance enumeration. Consumers can query KM PCW providers by using PDH and PERFLIB Version 1 without any modification to the consumer code. diff --git a/general/registry/regfltr/README.md b/general/registry/regfltr/README.md index c940c2c9..b16d92eb 100644 --- a/general/registry/regfltr/README.md +++ b/general/registry/regfltr/README.md @@ -8,33 +8,30 @@ products: - windows-wdk --- - - -<!--- - name: RegFltr Sample Driver - platform: WDM - language: cpp - category: General - description: Demonstrates how to write a registry filter driver. - samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617720 ----> - # RegFltr Sample Driver -The RegFltr sample shows how to write a [registry filter driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff545879).In addition to providing some basic examples, this sample demonstrates the following: +The RegFltr sample shows how to write a [registry filter driver](hhttps://docs.microsoft.com/windows-hardware/drivers/kernel/filtering-registry-calls).In addition to providing some basic examples, this sample demonstrates the following: - How to handle transactional registry operations. + - How and when to capture input parameters. + - Issues and workarounds for version 1.0 of registry filtering. + - Changes in version 1.1 of registry filtering. -- How to use version 1 of the [**REG\_CREATE\_KEY\_INFORMATION**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff560920) and [**REG\_OPEN\_KEY\_INFORMATION**](http://msdn.microsoft.com/en-us/library/windows/hardware/ff560957) data structures. + +- How to use version 1 of the [**REG\_CREATE\_KEY\_INFORMATION**](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/wdm/ns-wdm-_reg_create_key_information) and [**REG\_OPEN\_KEY\_INFORMATION**](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/wdm/ns-wdm-_reg_create_key_information) data structures. The RegFltr sample contains several examples of user-mode and kernel-mode registry-filtering operations. Each example comes with its own corresponding registry callback routine, and performs the following steps: 1. Does some setup work. + 1. Registers the callback routine. + 1. Performs one or more registry operations. + 1. Unregisters the callback routine. + 1. Verifies that the sample completed correctly. The sample driver is a minimal driver that is not intended to be used on production systems. To keep the samples simple, the registry callback routines provided do not check for all possible situations and error conditions. This sample is designed to demonstrate typical scenarios and no other registry filtering driver is expected to be active. diff --git a/general/toaster/toastDrv/README.md b/general/toaster/toastDrv/README.md index c53b11c3..fc84c39d 100644 --- a/general/toaster/toastDrv/README.md +++ b/general/toaster/toastDrv/README.md @@ -8,17 +8,6 @@ products: - windows-wdk --- - - -<!--- - name: Toaster Sample Driver - platform: KMDF UMDF1 - language: cpp - category: General WDF - description: An iterative series of samples that demonstrate KDMF and UDMF1 driver development. - samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620309 ----> - # Toaster Sample Driver The Toaster collection is an iterative series of samples that demonstrate fundamental aspects of Windows driver development for both Kernel-Mode Driver Framework (KMDF) and User-Mode Driver Framework (UMDF) version 1. @@ -29,9 +18,9 @@ The Toaster sample collection comprises driver projects (.vcxproj files) that ar ## Related technologies -[Windows Driver Frameworks](http://msdn.microsoft.com/en-us/library/windows/hardware/ff557565) +[Windows Driver Frameworks](https://docs.microsoft.com/windows-hardware/drivers/wdf/) -For detailed descriptions and code walkthroughs of each project, see [Sample Toaster Driver Programming Tour](http://msdn.microsoft.com/en-us/library/windows/hardware/dn569312). To learn how to build and run the samples, read on. +For detailed descriptions and code walkthroughs of each project, see [Sample Toaster Driver Programming Tour](https://docs.microsoft.com/windows-hardware/drivers/wdf/sample-toaster-driver-programming-tour). To learn how to build and run the samples, read on. ## Run the sample @@ -44,26 +33,32 @@ The process of moving the driver package to the target computer and installing t Before doing this, you should back up your package.vcxproj file, located in your sample directory, for example C:\\Toaster\\C++\\Package. 1. In the Properties for the package project, navigate to **Common Properties \> References**. + 1. Remove all references except WdfSimple. (Use the **Remove Reference** button at the bottom.) ### Automatic deployment (root enumerated) -Before you automatically deploy a driver, you must provision the target computer. For instructions, see [Configuring a Computer for Driver Deployment, Testing, and Debugging](http://msdn.microsoft.com/en-us/library/windows/hardware/). +Before you automatically deploy a driver, you must provision the target computer. For instructions, see [Provision a computer for driver deployment and testing](https://docs.microsoft.com/windows-hardware/drivers/gettingstarted/provision-a-target-computer-wdk-8-1). 1. On the host computer, in Visual Studio, in Solution Explorer, right click the **package** project (within the package folder), and choose **Properties**. Navigate to **Configuration Properties \> Driver Install \> Deployment**. + 1. Check **Enable deployment**, and check **Remove previous driver versions before deployment**. For **Target Computer Name**, use the drop down to select the name of a target computer that you provisioned previously. Select **Hardware ID Driver Update**, and enter **{b85b7c50-6a01-11d2-b841-00c04fad5171}\\MsToaster** for the hardware ID. (You can find this value in the WdfSimple.inx file.) Click **Apply** and **OK**. + 1. Because this solution contains many projects, you may find it easier to remove some of them before you build and deploy a driver package. To do so, right click **package** (lower case), and choose **Properties**. Navigate to **Common Properties-\>References** and click **Remove Reference** to remove projects you don't want. (You can add them back later by using **Add New Reference**.) Click **OK**. + 1. On the **Build** menu, choose **Build Solution** or **Rebuild Solution** (if you removed references). + 1. If you removed references and deployment does not succeed, try deleting the contents of the c:\\DriverTest\\Drivers folder on the target machine, and then retry deployment. ### Manual deployment (root enumerated) -Before you manually deploy a driver, you must turn on test signing and install a certificate on the target computer. You also need to copy the [DevCon](http://msdn.microsoft.com/en-us/library/windows/hardware/ff544707) tool to the target computer. For instructions, see [Preparing a Computer for Manual Driver Deployment](https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/preparing-a-computer-for-manual-driver-deployment). +Before you manually deploy a driver, you must turn on test signing and install a certificate on the target computer. You also need to copy the [DevCon](https://docs.microsoft.com/windows-hardware/drivers/devtest/devcon) tool to the target computer. For instructions, see [Preparing a Computer for Manual Driver Deployment](https://docs.microsoft.com/windows-hardware/drivers/develop/preparing-a-computer-for-manual-driver-deployment). 1. Copy all of the files in your driver package to a folder on the target computer (for example, c:\\WdfSimplePackage). + 1. On the target computer, open a Command Prompt window as Administrator. Navigate to your driver package folder, and enter the following command: - **devcon install WdfSimple.inf {b85b7c50-6a01-11d2-b841-00c04fad5171}\\MsToaster** + `devcon install WdfSimple.inf {b85b7c50-6a01-11d2-b841-00c04fad5171}\\MsToaster` ### View the root enumerated driver in Device Manager @@ -75,78 +70,95 @@ In Device Manager, on the **View** menu, choose **Devices by connection**. Locat As an alternative to building the Toaster sample in Visual Studio, you can build it in a Visual Studio Command Prompt window. In Visual Studio, on the **Tools** menu, choose **Visual Studio Command Prompt**. In the Visual Studio Command Prompt window, navigate to the folder that has the solution file, Toaster.sln. Use the MSBuild command to build the solution. Here are some examples: -**msbuild /p:configuration="Debug" /p:platform="x64" Toaster.sln** +`msbuild /p:configuration="Debug" /p:platform="x64" Toaster.sln` -**msbuild /p:configuration="Release" /p:platform="Win32" Toaster.sln** +`msbuild /p:configuration="Release" /p:platform="Win32" Toaster.sln` -For more information about using MSBuild to build a driver package, see [Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644). +For more information about using MSBuild to build a driver package, see [Building a Driver with Visual Studio and the WDK](https://docs.microsoft.com/windows-hardware/drivers/develop/building-a-driver). ## UMDF Toaster File Manifest -#### WUDFToaster.idl +### WUDFToaster.idl + Component Interface file -#### WUDFToaster.cpp +### WUDFToaster.cpp + DLL Support code - provides the DLL's entry point as well as the DllGetClassObject export. -#### WUDFToaster.def +### WUDFToaster.def + This file lists the functions that the driver DLL exports. -#### stdafx.h +### stdafx.h + This is the main header file for the sample driver. -#### driver.cpp & driver.h +### driver.cpp and driver.h (WUDFToaster) + Definition and implementation of the IDriverEntry callbacks in CDriver class. -#### device.cpp & device.h +### device.cpp and device.h (WUDFToaster) + Definition and implementation of various interfaces and their callbacks in CDevice class. Add your PnP and Power interfaces specific for your hardware. -#### queue.cpp & queue.h +### queue.cpp and queue.h + Definition and implementation of the base queue callback class (CQueue). IQueueCallbackDevicekIoControl, IQueueCallbackRead and IQueueCallBackWrite callbacks are implemented to handle I/O control requests. -#### WUDFToaster.rc +### WUDFToaster.rc + This file defines resource information for the WUDF Toaster sample driver. -#### WUDFToaster.inf +### WUDFToaster.inf + Sample INF for installing the sample WUDF Toaster driver under the Toaster class of devices. -#### WUDFtoaster.ctl, internal.h +### WUDFtoaster.ctl, internal.h + This file lists the WPP trace control GUID(s) for the sample driver. This file can be used with the tracelog command's -guid flag to enable the collection of these trace events within an established trace session. These GUIDs must remain in sync with the trace control guids defined in internal.h. ## Toastmon File Manifest -#### comsup.cpp & comsup.h +### comsup.cpp and comsup.h + Boilerplate COM Support code - specifically base classes which provide implementations for the standard COM interfaces IUnknown and IClassFactory which are used throughout the sample. The implementation of IClassFactory is designed to create instances of the CMyDriver class. If you should change the name of your base driver class, you would also need to modify this file. -#### dllsup.cpp +### dllsup.cpp + Boilerplate DLL Support code - provides the DLL's entry point as well as the single required export (DllGetClassObject). These depend on comsup.cpp to perform the necessary class creation. -#### exports.def +### exports.def + This file lists the functions that the driver DLL exports. -#### makefile -This file redirects to the real makefile, which is shared by all the driver components of the Windows Driver Kit. +### internal.h -#### internal.h This is the main header file for the ToastMon driver -#### driver.cpp & driver.h +### driver.cpp and driver.h (Toastmon) + Definition and implementation of the driver callback class for the ToastMon sample. -#### device.cpp & device.h +### device.cpp and device.h (Toastmon) + Definition and implementation of the device callback class for the ToastMon sample. This is mostly boilerplate, but also registers for RemoteInterface Arrival notifications. When a RemoteInterface arrival callback occurs, it calls CreateRemoteInterface and creates a CMyRemoteTarget callback object to handle I/O on that RemoteInterface. -#### RemoteTarget.cpp & RemoteTarget.h +### RemoteTarget.cpp and RemoteTarget.h + Definition and implementation of the remote target callback class for the ToastMon sample. -#### list.h +### list.h + Doubly-linked-list code -#### ToastMon.rc +### ToastMon.rc + This file defines resource information for the ToastMon sample driver. -#### UMDFToastMon.inf +### UMDFToastMon.inf + Sample INF for installing the Skeleton driver to control a root enumerated device with a hardware ID of UMDFSamples\\ToastMon |
