Developing Drivers Windows Driver Foundation Pdf File

Developing drivers with the windows driver foundation Download developing drivers with the windows driver foundation or read online here in PDF or EPUB. Please click button to get developing drivers with the windows driver foundation book now. All books are in clear copy here, and all files are secure so don't worry about it. This site is like a library, you could find million book here by using search box in the widget. Microsoft Windows Driver Foundation, you can download them in pdf format from our website. Driver Foundation Download Developing Drivers With.

Download Book Developing Drivers With The Windows Driver Foundation in PDF format. You can Read Online Developing Drivers With The Windows Driver Foundation here in PDF, EPUB, Mobi or Docx formats.

Developing Drivers With The Windows Driver Foundation

Author :Penny Orwick
ISBN :9780735645851
Genre :Computers
File Size : 26.42 MB
Format :PDF, Kindle
Download :732
Read :851

Start developing robust drivers with expert guidance from the teams who developed Windows Driver Foundation. This comprehensive book gets you up to speed quickly and goes beyond the fundamentals to help you extend your Windows development skills. You get best practices, technical guidance, and extensive code samples to help you master the intricacies of the next-generation driver model—and simplify driver development. Discover how to: Use the Windows Driver Foundation to develop kernel-mode or user-mode drivers Create drivers that support Plug and Play and power management—with minimal code Implement robust I/O handling code Effectively manage synchronization and concurrency in driver code Develop user-mode drivers for protocol-based and serial-bus-based devices Use USB-specific features of the frameworks to quickly develop drivers for USB devices Design and implement kernel-mode drivers for DMA devices Evaluate your drivers with source code analysis and static verification tools Apply best practices to test, debug, and install drivers PLUS—Get driver code samples on the Web

Windows Internals

Author :Mark E. Russinovich
ISBN :9780735671300
Genre :Computers
File Size : 89.14 MB
Format :PDF, Mobi
Download :878
Read :Service284

DevelopingDelve inside Windows architecture and internals—and see how core components work behind the scenes. Led by three renowned internals experts, this classic guide is fully updated for Windows 7 and Windows Server 2008 R2—and now presents its coverage in two volumes. As always, you get critical insider perspectives on how Windows operates. And through hands-on experiments, you’ll experience its internal behavior firsthand—knowledge you can apply to improve application design, debugging, system performance, and support. In Part 1, you will: Understand how core system and management mechanisms work—including the object manager, synchronization, Wow64, Hyper-V, and the registry Examine the data structures and activities behind processes, threads, and jobs Go inside the Windows security model to see how it manages access, auditing, and authorization Explore the Windows networking stack from top to bottom—including APIs, BranchCache, protocol and NDIS drivers, and layered services Dig into internals hands-on using the kernel debugger, performance monitor, and other tools

Windows Internals

Author :David A. Solomon
ISBN :9780735637962
Genre :Computers
File Size : 35.23 MB
Format :PDF, ePub, Mobi
Download :992
Read :774

See how the core components of the Windows operating system work behind the scenes—guided by a team of internationally renowned internals experts. Fully updated for Windows Server(R) 2008 and Windows Vista(R), this classic guide delivers key architectural insights on system design, debugging, performance, and support—along with hands-on experiments to experience Windows internal behavior firsthand. Delve inside Windows architecture and internals: Understand how the core system and management mechanisms work—from the object manager to services to the registry Explore internal system data structures using tools like the kernel debugger Grasp the scheduler's priority and CPU placement algorithms Go inside the Windows security model to see how it authorizes access to data Understand how Windows manages physical and virtual memory Tour the Windows networking stack from top to bottom—including APIs, protocol drivers, and network adapter drivers Troubleshoot file-system access problems and system boot problems Learn how to analyze crashes

Distributed Computing Artificial Intelligence Bioinformatics Soft Computing And Ambient Assisted Living

Author :Sigeru Omatu
ISBN :9783642024801
Genre :Computers
File Size : 85.48 MB
Format :PDF, Kindle
Download :323
Read :579

This book constitutes the refereed proceedings of the 10th International Work-Conference on Artificial Neural Networks, IWANN 2009, held in Salamanca, Spain in June 2009. The 167 revised full papers presented together with 3 invited lectures were carefully reviewed and selected from over 230 submissions. The papers are organized in thematic sections on theoretical foundations and models; learning and adaptation; self-organizing networks, methods and applications; fuzzy systems; evolutionary computation and genetic algoritms; pattern recognition; formal languages in linguistics; agents and multi-agent on intelligent systems; brain-computer interfaces (bci); multiobjetive optimization; robotics; bioinformatics; biomedical applications; ambient assisted living (aal) and ambient intelligence (ai); other applications.

Windows 7 Device Driver

Author :Ronald D. Reeves Ph.D.
ISBN :0321670442
Genre :Computers
File Size : 36.68 MB
Format :PDF, ePub, Mobi
Download :845
Read :788

“The chapter on programming a KMDF hardware driver provides a great example for readers to see a driver being made.” –Patrick Regan, network administrator, Pacific Coast Companies The First Authoritative Guide to Writing Robust, High-Performance Windows 7 Device Drivers Windows 7 Device Driver brings together all the information experienced programmers need to build exceptionally reliable, high-performance Windows 7 drivers. Internationally renowned driver development expert Ronald D. Reeves shows how to make the most of Microsoft’s powerful new tools and models; save time and money; and efficiently deliver stable, robust drivers. Drawing on his unsurpassed experience as both a driver developer and instructor, Reeves demystifies Kernel and User Mode Driver development, Windows Driver Foundation (WDF) architecture, driver debugging, and many other key topics. Throughout, he provides best practices for all facets of the driver development process, illuminating his insights with proven sample code. Learn how to Use WDF to reduce development time, improve system stability, and enhance serviceability Take full advantage of both the User Mode Driver Framework (UMDF) and the Kernel Mode Driver Framework (KMDF) Implement best practices for designing, developing, and debugging both User Mode and Kernel Mode Drivers Manage I/O requests and queues, self-managed I/O, synchronization, locks, plug-and-play, power management, device enumeration, and more Develop UMDF drivers with COM Secure Kernel Mode Drivers with safe defaults, parameter validation, counted UNICODE strings, and safe device naming techniques Program and troubleshoot WMI support in Kernel Mode Drivers Utilize advanced multiple I/O queuing techniques Whether you’re creating Windows 7 drivers for laboratory equipment, communications hardware, or any other device or technology, this book will help you build production code more quickly and get to market sooner!

Lateinische Kultur Im Viii Jahrhundert

Author :Ludwig Traube
ISBN :STANFORD:36105043192827
Genre :History
File Size : 38.83 MB
Format :PDF, ePub, Mobi
Developing Drivers Windows Driver Foundation Pdf FileDownload :713
Read :724

Windows 7 Device Driver

Author :Ron Reeves
ISBN :0321670213
Genre :Computers
File Size : 48.63 MB
Format :PDF, ePub, Mobi
Download :106
Read :1015

The first authoritative guide to programming Windows 7 device drivers: save time, save money, and write more reliable drivers • •Shows experienced programmers how to make the most of Microsoft's latest and most powerful models and tools for Windows 7 driver development, including C# and Visual Studio 2010. •Thoroughly covers Microsoft's Windows Driver Foundation (WDF) Architecture. •There are no other books, and little information anywhere, about Windows 7 device drivers. This is the only comprehensive, state-of-the-art guide to writing Windows 7 device drivers. Written by Ronald Reeves, one of the field's leading experts, Windows 7 Device Driver Book helps experienced developers make the most of the powerful new tools and models Microsoft has made available for driver development. Reeves provides an extensive collection of sample code on CDROM, as well as best-practice guidance for maximizing reliability and performance. Reeves shows how C# and Visual Studio 2010 can be used to develop device drivers more rapidly, and debug them more effectively. He covers a broad array of topics, including both kernel- and user-mode driver development; Windows Driver Foundation (WDF) architecture, and much more. From start to finish, this book is designed to significantly reduce the time it takes for device driver programmers to find the information they need -- and then apply that information in reliable, production code.

Pro Windows Embedded Compact 7

Author :Abraham Kcholi
ISBN :9781430241805
Genre :Computers
File Size : 39.76 MB
Format :PDF, ePub, Mobi
Download :227
Read :431

Windows Embedded Compact 7 is the natural choice for developing sophisticated, small-footprint devices for both consumers and the enterprise. For this latest version, a number of significant enhancements have been made, most notably the ability to run multi-core processors and address more than the 512 MB of memory constraint in previous versions. Using familiar developer tools, Pro Windows Embedded Compact 7 will take you on a deep-dive into device driver development. You’ll learn how to set up your working environment, the tools that you’ll need and how to think about developing for small devices before quickly putting theory into practice and developing your own first driver from the ground up. As you delve deeper into the details of driver development, you’ll learn how to master hardware details, deal with I/O and interrupts, work with networks, and test and debug your drivers ready for deployment—all in the company of an author who's been working with Windows CE for more than a decade. Packed with code samples, Pro Windows Embedded Compact 7 contains everything you'll need to start developing for small footprint devices with confidence.

Issues In Engineering Research And Application 2011 Edition

Author :
ISBN :9781464965203
Genre :Technology & Engineering
File Size : 64.34 MB
Format :PDF, Docs
Download :798
Read :635

Issues in Engineering Research and Application: 2011 Edition is a ScholarlyEditions™ eBook that delivers timely, authoritative, and comprehensive information about Engineering Research and Application. The editors have built Issues in Engineering Research and Application: 2011 Edition on the vast information databases of ScholarlyNews.™ You can expect the information about Engineering Research and Application in this eBook to be deeper than what you can access anywhere else, as well as consistently reliable, authoritative, informed, and relevant. The content of Issues in Engineering Research and Application: 2011 Edition has been produced by the world’s leading scientists, engineers, analysts, research institutions, and companies. All of the content is from peer-reviewed sources, and all of it is written, assembled, and edited by the editors at ScholarlyEditions™ and available exclusively from us. You now have a source you can cite with authority, confidence, and credibility. More information is available at http://www.ScholarlyEditions.com/.

Top Download:

Windows Driver Foundation Service

-->

Portable Media Serial Number Service

In this topic you'll use the USB User-Mode Driver template provided with Microsoft Visual Studio 2019 to write a user-mode driver framework (UMDF)-based client driver. After building and installing the client driver, you'll view the client driver in Device Manager and view the driver output in a debugger.

UMDF (referred to as the framework in this topic) is based on the component object model (COM). Every framework object must implement IUnknown and its methods, QueryInterface, AddRef, and Release, by default. The AddRef and Release methods manage the object's lifetime, so the client driver does not need to maintain the reference count. The QueryInterface method enables the client driver to get interface pointers to other framework objects in the Windows Driver Frameworks (WDF) object model. Framework objects perform complicated driver tasks and interact with Windows. Certain framework objects expose interfaces that enable a client driver to interact with the framework.

A UMDF-based client driver is implemented as an in-process COM server (DLL), and C++ is the preferred language for writing a client driver for a USB device. Typically, the client driver implements several interfaces exposed by the framework. This topic refers to a client driver-defined class that implements framework interfaces as a callback class. After these classes are instantiated, the resulting callback objects are partnered with particular framework objects. This partnership gives the client driver the opportunity to respond to device or system-related events that are reported by the framework. Whenever Windows notifies the framework about certain events, the framework invokes the client driver's callback, if one is available. Otherwise the framework proceeds with the default processing of the event. The template code defines driver, device, and queue callback classes.

For an explanation about the source code generated by the template, see Understanding the UMDF template code for USB client driver.

Prerequisites

For developing, debugging, and installing a user-mode driver, you need two computers:

  • A host computer running Windows 7 or a later version of the Windows operating system. The host computer is your development environment, where you write and debug your driver.
  • A target computer running the version of the operating system that you want to test your driver on, for example, Windows 10, version 1903. The target computer has the user-mode driver that you want to debug and one of the debuggers.

In some cases, where the host and target computers are running the same version of Windows, you can have just one computer running Windows 7 or a later version of the Windows. This topic assumes that you are using two computers for developing, debugging, and installing your user mode driver.

Before you begin, make sure that you meet the following requirements:

Software requirements

  • Your host computer has Visual Studio 2019.

  • Your host computer has the latest Windows Driver Kit (WDK) for Windows 10, version 1903.

    The kit include headers, libraries, tools, documentation, and the debugging tools required to develop, build, and debug a USB client driver. You can get the latest version of the WDK from How to Get the WDK.

  • Your host computer has the latest version of debugging tools for Windows. You can get the latest version from the WDK or you can Download and Install Debugging Tools for Windows.

  • If you are using two computers, you must configure the host and target computers for user-mode debugging. For more information, see Setting Up User-Mode Debugging in Visual Studio.

Hardware requirements

Get a USB device for which you will be writing the client driver. In most cases, you are provided with a USB device and its hardware specification. The specification describes device capabilities and the supported vendor commands. Use the specification to determine the functionality of the USB driver and the related design decisions.

If you are new to USB driver development, use the OSR USB FX2 learning kit to study USB samples included with the WDK. You can get the learning kit from OSR Online. It contains the USB FX2 device and all the required hardware specifications to implement a client driver.

Recommended reading

  • Developing Drivers with Windows Driver Foundation, written by Penny Orwick and Guy Smith. For more information, see Developing Drivers with WDF.

Instructions

Step 1: Generate the UMDF driver code by using the Visual Studio 2019 USB driver template

For instructions about generating UMDF driver code, see Writing a UMDF driver based on a template.

For USB-specific code, select the following options in Visual Studio 2019

  1. In the New Project dialog box, in the search box at the top, type USB.
  2. In the middle pane, select User Mode Driver, USB (UMDF V2).
  3. Click Next.
  4. Enter a project name, choose a save location, and click Create.

The following screen shots show the New Project dialog box for the USB User-Mode Driver template.

This topic assumes that the name of the project is 'MyUSBDriver_UMDF_'. It contains the following files:

FilesDescription
Driver.h; Driver.cDeclares and defines a callback class that implements the IDriverEntry interface. The class defines methods that are invoked by the framework driver object. The main purpose of this class is to create a device object for the client driver.
Device.h; Device.cDeclares and defines a callback class that implements the IPnpCallbackHardware interface. The class defines methods that are invoked by the framework device object. The main purpose of this class is to handle events occurring as a result of Plug and Play (PnP) state changes. The class also allocates and initializes resources required by the client driver as long as it is loaded in the system.
IoQueue.h; IoQueue.cDeclares and defines a callback class that implements the IQueueCallbackDeviceIoControl interface. The class defines methods that are invoked by the framework queue object. The purpose of this class is to retrieve I/O requests that are queued in the framework.
Internal.hProvides common declarations shared by the client driver and user applications that communicate with the USB device. It also declares tracing functions and macros.
Dllsup.cppContains the implementation of the driver module's entry point.
<Project name>.infINF file that is required to install the client driver on the target computer.
Exports.defDEF file that exports the entry point function name of the driver module.

Step 2: Modify the INF file to add information about your device

Before you build the driver, you must modify the template INF file with information about your device, specifically the hardware ID string.

To provide the hardware ID string

  1. Attach your USB device to your host computer and let Windows enumerate the device.

  2. Open Device Manager and open properties for your device.

  3. On the Details tab, select Hardward Ids under Property.

    The hardware ID for the device is displayed in the list box. Right-click and copy the hardware ID string.

  4. In Solution Explorer, expand Driver Files, and open the INF.

  5. Replace the following your hardware ID string.

    [Standard.NT$ARCH$]

    %DeviceName%=MyDevice_Install, USBVID_vvvv&PID_pppp

Notice the AddReg entries in the driver's information (INF) file.

[CoInstallers_AddReg] ;

HKR,CoInstallers32,0x00010008,'WudfCoinstaller.dll'

HKR,CoInstallers32,0x00010008,'WudfUpdate_01011.dll'

HKR,CoInstallers32,0x00010008,'WdfCoInstaller01011.dll,WdfCoInstaller'

HKR,CoInstallers32,0x00010008,'WinUsbCoinstaller2.dll'

  • WudfCoinstaller.dll (configuration co-installer)
  • WUDFUpdate_<version>.dll (redistributable co-installer)
  • Wdfcoinstaller<version>.dll (co-installers for KMDF)
  • Winusbcoinstaller2.dll ((co-installers for Winusb.sys)
  • MyUSBDriver_UMDF_.dll (client driver module)

If your INF AddReg directive references the UMDF redistributable co-installer (WUDFUpdate_<version>.dll ), you must not make a reference to the configuration co-installer (WUDFCoInstaller.dll). Referencing both co-installers in the INF will lead to installation errors.

All UMDF-based USB client drivers require two Microsoft-provided drivers: the reflector and WinUSB.

  • Reflector—If your driver gets loaded successfully, the reflector is loaded as the top-most driver in the kernel-mode stack. The reflector must be the top driver in the kernel mode stack. To meet this requirement, the template's INF file specifies the reflector as a service and WinUSB as a lower-filter driver in the INF:

    [MyDevice_Install.NT.Services]

    AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall ; flag 0x2 sets this as the service for the device

    AddService=WinUsb,0x000001f8,WinUsb_ServiceInstall ; this service is installed because its a filter.

  • WinUSB—The installation package must contain coinstallers for Winusb.sys because for the client driver, WinUSB is the gateway to the kernel-mode USB driver stack. Another component that gets loaded is a user-mode DLL, named WinUsb.dll, in the client driver's host process (Wudfhost.exe). Winusb.dll exposes WinUSB Functions that simplify the communication process between the client driver and WinUSB.

Step 3: Build the USB client driver code

To build your driver

  1. Open the driver project or solution in Visual Studio 2019.
  2. Right-click the solution in the Solution Explorer and select Configuration Manager.
  3. From the Configuration Manager, select your Active Solution Configuration (for example, Debug or Release) and your Active Solution Platform (for example, Win32) that correspond to the type of build you are interested in.
  4. Verify that your device interface GUID is accurate throughout the project.
    • The device interface GUID is defined in Trace.h and is referenced from MyUSBDriverUMDFCreateDevice in Device.c. When you create your project with the name 'MyUSBDriver_UMDF_', Visual Studio 2019 defines the device interface GUID with the name GUID_DEVINTERFACE_MyUSBDriver_UMDF_ but calls WdfDeviceCreateDeviceInterface with the incorrect parameter 'GUID_DEVINTERFACE_MyUSBDriverUMDF'. Replace the incorrect parameter with the name defined in Trace.h to ensure that the driver builds properly.
  5. From the Build menu, click Build Solution.

For more information, see Building a Driver.

Step 4: Configure a computer for testing and debugging

To test and debug a driver, you run the debugger on the host computer and the driver on the target computer. So far, you have used Visual Studio on the host computer to build a driver. Next you need to configure a target computer. To configure a target computer, follow the instructions in Provision a computer for driver deployment and testing.

Step 5: Enable tracing for kernel debugging

The template code contains several trace messages (TraceEvents) that can help you track function calls. All functions in the source code contain trace messages that mark the entry and exit of a routine. For errors, the trace message contains the error code and a meaningful string. Because WPP tracing is enabled for your driver project, the PDB symbol file created during the build process contains trace message formatting instructions. If you configure the host and target computers for WPP tracing, your driver can send trace messages to a file or the debugger.

To configure your host computer for WPP tracing

  1. Create trace message format (TMF) files by extracting trace message formatting instructions from the PDB symbol file.

    You can use Tracepdb.exe to create TMF files. The tool is located in the <install folder>Windows Kits10bin<architecture> folder of the WDK. The following command creates TMF files for the driver project.

    tracepdb -f [PDBFiles] -p [TMFDirectory]

    The -f option specifies the location and the name of the PDB symbol file. The -p option specifies the location for the TMF files that are created by Tracepdb. For more information, see Tracepdb Commands.

    At the specified location you'll see three files (one per .c file in the project). They are given GUID file names.

  2. In the debugger, type the following commands:

    1. .load Wmitrace

      Loads the Wmitrace.dll extension.

    2. .chain

      Verify that the debugger extension is loaded.

    3. !wmitrace.searchpath +<TMF file location>

      Add the location of the TMF files to the debugger extension's search path.

      The output resembles this:

      Trace Format search path is: 'C:Program Files (x86)Microsoft Visual Studio 14.0Common7IDE;c:driverstmf'

To configure your target computer for WPP tracing

  1. Make sure you have the Tracelog tool on your target computer. The tool is located in the <install_folder>Windows Kits10Tools<arch> folder of the WDK. For more information, see Tracelog Command Syntax.

  2. Open a Command Window and run as administrator.

  3. Type the following command:

    tracelog -start MyTrace -guid #c918ee71-68c7-4140-8f7d-c907abbcb05d -flag 0xFFFF -level 7-rt -kd

    The command starts a trace session named MyTrace.

    The guid argument specifies the GUID of the trace provider, which is the client driver. You can get the GUID from Trace.h in the Visual Studio 2019 project. As another option, you can type the following command and specify the GUID in a .guid file. The file contains the GUID in hyphen format:

    tracelog -start MyTrace -guid c:driversProvider.guid -flag 0xFFFF -level 7-rt -kd

    You can stop the trace session by typing the following command:

    tracelog -stop MyTrace

Step 6: Deploy the driver on the target computer

  1. In the Solution Explorer window, right click the <project name>Package , and choose Properties.
  2. In the left pane, navigate to Configuration Properties > Driver Install > Deployment.
  3. Check Enable deployment, and check Import into driver store.
  4. For Remote Computer Name, specify the name of the target computer.
  5. Select Install and Verify.
  6. Click Ok.
  7. On the Debug menu, choose Start Debugging, or press F5 on the keyboard.

Note Do not specify the hardware ID of your device under Hardware ID Driver Update. The hardware ID must be specified only in your driver's information (INF) file.

Driver Files Windows 10

Step 7: View the driver in Device Manager

  1. Enter the following command to open Device Manager.

    devmgmt

  2. Verify that Device Manager shows the following node.

    USB Device

    MyUSBDriver_UMDF_Device

Step 8: View the output in the debugger

Verify that trace messages appear in the Debugger Immediate Window on the host computer.

Wudfhost.exe

The output should be similar to the following.

Remarks

Let’s take a look at how the framework and the client driver work together to interact with Windows and handle requests sent to the USB device. This illustration shows the modules loaded in the system for a UMDF -based USB client driver.

The purpose of each module is described here:

Developing Drivers Windows Driver Foundation Pdf Files

  • Application—a user-mode process that issues I/O requests to communicate with the USB device.
  • I/O Manager—a Windows component that creates I/O request packets (IRPs) to represent the received application requests, and forwards them to the top of the kernel-mode device stack for the target device.
  • Reflector—a Microsoft-provided kernel-mode driver installed at the top of the kernel-mode device stack (WUDFRd.sys). The reflector redirects IRPs received from the I/O manager to the client driver host process. Upon receiving the request, the framework and the client driver handle the request.
  • Host process —the process in which the user-mode driver runs (Wudfhost.exe). It also hosts the framework and the I/O dispatcher.
  • Client driver—the user-mode function driver for the USB device.
  • UMDF—the framework module that handles most interactions with Windows on the behalf of the client driver. It exposes the user-mode device driver interfaces (DDIs) that the client driver can use to perform common driver tasks.
  • Dispatcher—mechanism that runs in the host process; determines how to forward a request to the kernel mode after it has been processed by user-mode drivers and has reached the bottom of the user-mode stack. In the illustration, the dispatcher forwards the request to the user-mode DLL, Winusb.dll.
  • Winusb.dll—a Microsoft-provided user-mode DLL that exposes WinUSB Functions that simplify the communication process between the client driver and WinUSB (Winusb.sys, loaded in kernel mode).
  • Winusb.sys—a Microsoft-provided driver that is required by all UMDF client drivers for USB devices. The driver must be installed below the reflector and acts as the gateway to the USB driver stack in the kernel-mode. For more information, see WinUSB.
  • USB driver stack—a set of drivers, provided by Microsoft, that handle protocol-level communication with the USB device. For more information, see USB host-side drivers in Windows.

Whenever an application makes a request for the USB driver stack, the Windows I/O manager sends the request to the reflector, which directs it to client driver in user mode. The client driver handles the request by calling specific UMDF methods, which internally call WinUSB Functions to send the request to WinUSB. Upon receiving the request, WinUSB either processes the request or forwards it to the USB driver stack.

Related topics

Windows Driver Foundation Service

Understanding the UMDF template code for USB client driver
How to enable USB selective suspend and system wake in the UMDF driver for a USB device
Getting started with USB client driver development