The samples include code in C, Delphi (Pascal), Visual Basic ("VB"), C# and VB.NET.
Each sample also has project/workspace/solution/make files for the prominent compilers and development environments used for the sample code language, such as MSDEV (Visual C++), MSDEV .NET, Borland C++ Builder, Borland Delphi, Microsoft eMbedded C++, Microsoft Platform Builder C++ and GCC.
Most of the samples are implemented as user-mode applications but there are also kernel-mode samples that demonstrate the use of WinDriver's Kernel PlugIn feature.
All samples are available from the WinDriver installation directory after you install the toolkit.
NOTE: The samples are also included as part of the full featured evaluation version of WinDriver. To try the samples, simply download and install WinDriver and then build and run the desired sample.
The C samples can be found under the WinDriver samples/ directory and under the vendor-specific WinDriver directories (e.g. cypress/, plx/, etc.).
The VB and Delphi samples can be found under the vb/ and Delphi/ WinDriver directories, respectively.
The .NET samples can be found under the vb.net/ (Visual Basic .NET) and csharp.net/ (C#) directories, as well as under the plx/dotnet directory.
The samples can be built using any compatible 32-bit or 64-bit compiler (depending on the sample and target OS).
The sample directories include readme.txt and/or files.txt files that describe each sample and explain how to build the sample code.
In addition to the generic WinDriver samples, you can also use WinDriver's DriverWizard utility to generate skeletal diagnostics driver code that demonstrates the use of WinDriver's API to communicate with your specific device, as explained in the WinDriver documentation.
Following are brief descriptions of some of the WinDriver C samples:
- The following samples are available from the WinDriver samples/ directory,
which includes a relevant sub-directory for each sample.
Each sample directory includes a pre-compiled version of the sample driver application as well as source code, which you can build using any 32-bit or 64-bit C compiler.
The sample directory also includes project or make files for building the sample using common C compilers such as MSDEV (Visual C++), Borland C++ Builder, or GCC (depending on your target OS).
- USB_DIAG.C -
Sample skeleton WinDriver USB driver.
The driver implements detection of insertion and removal of USB devices and communication with such devices using WinDriver's API, including: Performing data transfers on the device's pipes; issuing standard requests on the control pipe (Pipe 0); resetting the pipes; and changing the device's active alternate setting.
The sample utilizes the shared USB_DIAG_LIB WinDriver USB diagnostic library. The library source files can be found under the WinDriver samples/shared/ directory. - PCI_DIAG.C -
Sample skeleton driver for a PCI card.
The driver implements detection of PCI devices, access to the PCI configuration space, access to I/O and memory mapped ranges on the card, and interrupt handling.
The sample also demonstrates how to communicate with a Kernel PlugIn driver, which accesses the hardware directly in the kernel.
The source code of the sample Kernel PlugIn driver with which the program communicates (KP_PCI), as well as the source code of the sample WinDriver PCI library used by the sample program (PCI_LIB), can be found under the WinDriver samples/pci_diag/ directory. - PCMCIA_DIAG.C -
Sample skeleton driver for a PCMCIA card.
The driver implements detection of PCMCIA devices, access to the PCMCIA attribute space, access to I/O and memory mapped ranges on the card, and interrupt handling.
The source code of the sample WinDriver PCMCIA library used by the sample program (PCMCIA_LIB), can be found under the WinDriver samples/pcmcia_diag/ directory.
(Note: WinDriver supports the PCMCIA bus only on Windows). - PCI_DUMP.C -
A utility for getting a dump of all the PCI configuration registers of the PCI cards installed.
- PCI_SCAN.C -
A utility that scans the PCI bus and displays a list of all connected PCI cards and the resources allocated for each card (memory ranges, I/O ranges and interrupts).
- PCMCIA_SCAN.C -
A utility that scans the PCMCIA bus and displays a list of all connected PCMCIA cards and the resources allocated for each card (memory ranges, I/O ranges and interrupts).
(Note: WinDriver supports the PCMCIA bus only on Windows). - BASIC_IO.C -
Sample skeleton driver for a simple ISA card.
The driver demonstrates how to define and access I/O ports on an ISA card. - INT_IO.C -
Sample skeleton driver for an ISA card.
The driver implements I/O port access and interrupt handling. - SPEAKER.C -
Demonstrates access to I/O ports via WinDriver. This sample programs the motherboard's timer, which is connected to the speaker, to generate tones.
The source code of the SPEAKER_LIB library, used by this sample program, can be found under the WinDriver samples/speaker/ directory. - SPEAKER_GUI.C -
Accesses the speaker in the same way that SPEAKER.C does (using the same library files), but with an MFC (Windows) user interface.
- USB_DIAG.C -
Sample skeleton WinDriver USB driver.
- The following samples are available from the WinDriver plx/ directory,
which contains sample drivers for the PLX 9030, 9050, 9052, 9054, 9056, 9080 and 9656 PCI chipsets, as well as a generic WinDriver PLX library (PLX_LIB) and a diagnostics console-mode library (PLX_DIAG_LIB) for these chipsets, which are used from the sample driver applications.
Each chip directory contains, in addition to the driver source code, a pre-compiled version of the diagnostic driver application, and project or make files for building the sample using common C compilers, such as MSDEV (Visual C++), Borland C++ Builder, or GCC (depending on your target OS). The source code can also be built using any other 32-bit or 64-bit C compiler.
- PLX_LIB.C -
WinDriver PLX library for simplifying the communication with major PLX chipsets.
The compliant plx_lib.h header file is available from the WinDriver plx/plx_lib/ directory. - PLX_DIAG_LIB.C -
WinDriver PLX diagnostics library, which demonstrates how to use the PLX_LIB library from a diagnostics console-mode application.
The compliant plx_diag_lib.h header file is available from the WinDriver plx/plx_diag_lib/ directory. - P9030_DIAG.C -
Diagnostics program for communicating with the PLX 9030 PCI chip, using WinDriver's API and PLX libraries.
- P9054_DIAG.C -
Diagnostics program for communicating with the PLX 9054 PCI chip, using WinDriver's API and PLX libraries.
- PLX_LIB.C -
WinDriver PLX library for simplifying the communication with major PLX chipsets.