next up previous contents
Next: B.3 WDC High Level Up: B. API Reference Previous: B.1 WD_DriverName()   Contents


B.2 WDC Library Overview

The "WinDriver Card" - WDC - API provides convenient user-mode wrappers to the basic WinDriver PCI/ISA/PCMCIA/CardBus WD_xxx API, which is described in the WinDriver PCI Low-Level API Reference.

The WDC wrappers are designed to simplify the usage of WinDriver for communicating with PCI/ISA/PCMCIA/CardBus devices. While you can still use the basic WD_xxx PCI/PCMCIA/ISA WinDriver API from your code, we recommend that you refrain from doing so and use the high-level WDC API instead.

NOTE: Most of the WDC API can be used both from the user mode and from the kernel mode (from a Kernel PlugIn driver [11]).

The generated DriverWizard PCI/PCMCIA/ISA diagnostics driver code, as well as the PLX sample code, and the pci_diag, Kernel PlugIn pci_diag, pcmcia_diag and pci_dump samples, for example, utilize the WDC API.

The WDC API is part of wdapi901 DLL/shared object: WinDriver \bgroup\color{NavyBlue}$\backslash$\egroupredist \bgroup\color{NavyBlue}$\backslash$\egroupWINCE \bgroup\color{NavyBlue}$\backslash$\egroup<TARGET_CPU> \bgroup\color{NavyBlue}$\backslash$\egroupwdapi901.dll (Windows CE) / WinDriver/lib/libwdapi901.so (Linux and Solaris).
The source code for the WDC API is found in the WinDriver/src/wdapi directory.

The WDC interface is provided in the wdc_lib.h and wdc_defs.h header files (both found under the WinDriver/includes directory).

wdc_lib.h
declares the "high-level" WDC API (type definitions, function declarations, etc.).
wdc_defs.h
declares the "low-level" WDC API. This file includes definitions and type information that is encapsulated by the high-level wdc_lib.h file.

The WinDriver PCI/PCMCIA/ISA samples and generated DriverWizard code that utilize the WDC API, for example, are comprised of a "library" for the specific device, and a diagnostics application that uses it. The high-level diagnostics code only utilizes the wdc_lib.h API, while the library code also uses the low-level API from the wdc_defs.h file, thus maintaining the desired level of encapsulation.

The following sections describe the WDC high-level [B.3] and low-level [B.4] API.

****************************************************************************************
  NOTES
 
  • CardBus devices are handled via WinDriver's PCI API, therefore any references to PCI in this chapter also include CardBus.

  • The PCMCIA API - both in the WDC library and in the low-level WD_xxx WinDriver API - is supported only on Windows 2000/XP/Server 2003/Vista.
****************************************************************************************