Technical Document #127

Technical Document #127        [Product Version: 6.2.X–7.X and above]
WinDriver Upgrade: Version 6.2.x -> Version 7.x and above

This document outlines the steps for upgrading from version 6.2.x to version 7.x or above of WinDriver.

The following documents describe the upgrade steps for other versions of WinDriver:


Upgrade Steps:

  1. Preliminary Step: Verify that the New Version Supports Your Target Platform(s)
  2. Acquire a New WinDriver License (Registered Users)
  3. Upgrade Your Driver Project
  4. Upgrade Your Device INF File (Windows)
  5. Upgrade Your Driver Distribution / Installation

  1. Preliminary Step: Verify that the New Version Supports Your Target Platform(s)
  2. Before upgrading to a newer version of WinDriver, verify that the newer version supports the operating system and CPU configurations for the target platforms on which you intend the driver to be used.
    For a list of configurations supported in the latest version of WinDriver, refer to Technical Document #4.
    For an historic overview, which lists configurations supported in earlier versions of WinDriver, refer to Technical Document #50.




  3. Acquire a New WinDriver License (Registered Users)
  4. If you are using a registered version of WinDriver, contact Jungo's sales department to acquire a WinDriver license registration string for the new version. Then register the new license from DriverWizard (File | Register WinDriver) and (if you select to rebuild your code).

    Note that if you have a valid Support & Upgrade Subscription you are entitled to receive a new license free of charge.




  5. Upgrade Your Driver Project
  6. WinDriver is backwards compatible, therefore code developed with version 6.2.x should generally work, without modification, with the driver module(s) from version 7.x or above, provided the code is not rebuilt with the files and license from the newer version. However, in order to fully utilize the new driver module and enjoy all bug fixes and enhancements provided by the new version, it is recommended to also upgrade your driver project to use the new driver files.

    To upgrade your driver code, follow these steps:

    • Update your project's files search paths: Beginning with version 7.0.1 of WinDriver, the include path in the WinDriver project/make files contains the path to the WinDriver/ and WinDriver/include/ directories, and the #include statements in the WinDriver source files and generated DriverWizard code were consequently modified to indicate only the name of the header file to include, instead of the full/relative path to the file (as done in earlier versions).

      In light of these changes, when rebuilding a driver project from version 7.0.0 or earlier of WinDriver with the source files from version 7.0.1 or above, you may need to modify your project/make file and add the path to the WinDriver/ and WinDriver/include/ directories to the project's include path in order to successfully build the project.


    • WinDriver API DLL / Shared Object Upgrade:
      Linking your projects with the high-level WinDriver API DLL / shared object — wdapi<version> (v8.x+) / wd_utils (v7.x) — frees you of the need to include the source files from the WinDriver/src/wdapi directory (v8.x+) / WinDriver/src directory (v7.x) in your project (see also note below).

      In version 8.0.0 the name of the DLL/shared object module was changed from wd_utils to wdapi<version> (e.g., wdapi800 in v8.0.0) as part of the addition of versioning support to this module. This enables you to upgrade your driver, including the DLL/shared object, without worrying about the possible effects on other drivers, developed with earlier versions of WinDriver, which may be using the same module.

      On Windows and Windows CE:
      In version 8.x and above you can use the WDAPI DLL — wdapi<version>.dll (found in the WinDriver\redist directory) by linking your project with the WinDriver\lib\<CPU>\wdapi<version>.lib library (e.g., WinDriver\lib\x86\wdapi800.lib) — for MS Visual Studio (Visual C++) projects; or with the WinDriver\lib\<CPU>\wdapi_borland<version>.lib library (e.g., WinDriver\lib\x86\wdapi_borland800.lib) — for Windows Borland C++ Builder projects (in v11.1.0 and below).

      In version 7.x you can use wd_utils.dll (found in the WinDriver\redist directory) by linking your project with WinDriver\lib\wd_utils.lib (available for Windows beginning with v6.2.0 and for Windows CE beginning with v7.0.1) — for MS Visual Studio projects; or with WinDriver\lib\wd_utils_borland.lib (available beginning with v7.0.0 of WinDriver) — for Windows Borland C++ Builder projects (in v11.1.0 and below).

      On Linux and Solaris (Solaris was supported until 9.0.1):
      In version 8.x and above you can use libwdapi<version>.so by linking your driver project with WinDriver/lib/libwdapi<version>.so (e.g., libwdapi800.so in version 8.0.0 of WinDriver).
      To link your Linux project with this shared object, add wdapi<version> to the makefile's link flag (LFLAGS += -l wdapi<version>; e.g., LFLAGS += -l wdap800), instead of listing all the source files from the WinDriver/src/wdapi directory (previously WinDriver/src/ — see below) in the makefile (under the SRCS flag).

      In version 7.x you can use libwd_utils.so by linking your project with WinDriver/lib/wdapi<version>.so (available for Linux from v7.0.0 and for Solaris from v7.0.1).

      On all platforms:
      The sample and generated DriverWizard projects demonstrate how to correctly link the project with the relevant DLL/shared object for your WinDriver version and target OS.

      Note that if your code uses the high-level WinDriver API DLL / shared object, you will need to distribute wdapi<version>.dll (v8.x+) / wd_utils.dll (v7.x) — for Windows and Windows CE, or wdapi<version>.so (v8.x+) / libwd_utils.so (v7.x) — for Linux and Solaris, with your driver, as explained in the driver distribution instructions of the new WinDriver User's Manual.


    • WinDriver Source Files Location:
      In version 8.0.0 the WinDriver C source files were moved from the WinDriver/src directory to the WinDriver/src/wdapi/ directory. The .NET source files were moved from the WinDriver/wdapi.net/ directory to the WinDriver/src/wdapi.net/ directory.
      If you have selected to upgrade your v6.2.x project to use the wdapi (v8.x+) or wd_utils (v7.x) DLL/shared object (see above), this should not normally affect you. However, if your project directly includes WinDriver source files, you may need to modify your project/make file to point to the new source files location.

    • For USB, beginning with version 7.0.0 of WinDriver, if you have created a console driver application/DLL/shared object that calls functions implemented in WinDriver/samples/shared/usb_diag_lib.c (as is the case for the sample and generated WinDriver USB diagnostic driver projects): in order to build your project with the usb_diag_lib.c file from the new version, you must add the new WinDriver/samples/shared/diag_lib.c file to your project.

    • For PCI/ISA drivers, beginning with version 7.0.0 WinDriver features the new WDC library, which provides convenient wrapper APIs to the standard WinDriver PCI/ISA APIs. (This library is part of the wdapi<version> (v8.x+) / wd_utils (v7.x) DLL / shared object (see above; the source files are found under the WinDriver/src/wdapi directory (v8.x+) / WinDriver/src directory (v7.x) (see note above).

      The WDC APIs are documented in the v7.x+ WinDriver PCI User's Manual. The generated DriverWizard v7.x+ projects use the WDC APIs instead of the low-level WD_xxx APIs. The WDC APIs are also used from the v7.x+ pci_diag, pcmcia_diag, pci_dump and PLX samples.

      Since WDC mainly provides wrappers to the standard WinDriver APIs, which are still supported, you do not need to modify your old code to use the new WDC library. Should you select to upgrade your code to use the WDC APIs, you can examine the new samples and generated code and compare them to those from your old WinDriver version for a better understanding of how to use the new APIs.

      Note that to use the WDC APIs you will need to either include the relevant wdc_xxx.c source files from the WinDriver/src/wdapi directory (v8.x+) / WinDriver/src directory (v7.x) in your project/makefile; or link your project with the wdapi<version> (v8.x+) / wd_utils (v7.x) WinDriver high-level API DLL/shared object.


    • To upgrade a PCI/ISA Kernel PlugIn project to v10.3.0 or above of WinDriver, follow the instructions in Technical Document #112.

    • Register Your New License (Registered Users):
      Modify the driver code to register your new license — i.e., replace the license string in the call to WDU_Init() (USB) / WDC_DriverOpen() (PCI/ISA/PCMCIA — WDC API) / WD_License() (low-level API) from your code.

    • Rebuild your driver project with the source files from the new version.




  7. Upgrade Your Device INF File (Windows)
  8. On Windows 2000 and higher (and Windows 98/Me — in v9.2.0 and below): If you have created a driver for a Plug-and-Play device (USB/PCI/CardBus/PCMCIA), it is recommended to create and install a new INF file for your device, which registers it with the driver module from the new version — windrvr6.sys (or your renamed version of this driver — in v9.x and above). You can use DriverWizard from the new version to generate the new INF file, or modify the driver version in your existing INF file.




  9. Upgrade Your Driver Distribution / Installation
  10. Create a new driver installation package, which contains the following items from the new WinDriver distribution:

    • The WinDriver driver module — windrvr6.sys/.dll/.o/.ko or WinDriver.kext, depending on the OS and the WinDriver version — or a renamed version of this driver.
    • On Linux, beginning with version 10.0.0 of WinDriver USB:
      The WinDriver USB Linux GPL driver — windrvr6_usb.o/.ko, or a renamed version of this driver.
    • Any other files required for installing or using your driver (e.g., Windows INF files).
    • An installation program that installs the new driver.

    For Windows 2000 and higher, for example, you would normally distribute the new windrvr6.sys, windrvr6.inf, and wd<new_version>.cat (v8.1.0+) files, the wdreg.exe or wdreg_gui.exe utility, difxapi.dll (v8.1.1+), your device INF file (if created), wdapi<new_version>.dll (v8.x+) / wd_util.dll (v7.x) (if used from your driver project), and your Kernel PlugIn driver (if you have created such a driver).

    Specific driver distribution instructions can be found in the Distributing Your Driver chapter of the new manual. The instructions for Windows are also summarized in Technical Document #132 (version 8.1.x and above) / Technical Document #130 (version 8.0.x) / Technical Document #117 (version 7.x).

    Version-Specific Installation Upgrade Notes:

    • Version 7.x- to Version 8.1.0+ Windows Upgrade
      The wd<version>.cat WinDriver Catalog File:
      Beginning with version 8.1.0, the windrvr6.sys driver has an Authenticode digital signature. In order to enjoy the advantages of this signature the wd<version>.cat catalog file, provided under the WinDriver\redist directory, needs to be distributed together with the windrvr6.inf file, which is used to install the driver. For more information, refer to the of the new WinDriver version and to Technical Document #132.

    • Version 8.1.0- to Version 8.1.1+ Windows Upgrade
      WDREG difxapi.dll Dependency:
      Beginning with version 8.1.1, the wdreg installation utility uses the Driver Install Frameworks API (DIFxAPI) to perform driver installation and uninstallation. As a result, the wdreg utility in version 8.1.1 and above is dependent on the difxapi.dll DLL, which is provided under the WinDriver\util directory. This DLL must therefore be in wdreg's search path when using the utility to install / uninstall INF files.

    • Version 9.2.1- to Version 10.0.0 Linux USB Upgrade
      The windrvr6_usb WinDriver USB Linux GPL Driver:
      Beginning with version 10.0.0, the WinDriver Linux USB driver was split into two modules, which are used together to provide the full driver functionality:
      • windrvr6.o/.ko — the traditional WinDriver driver module, which includes the Jungo license.
      • windrvr6_usb.o/.ko — this driver implements Linux-specific USB driver functionality, and contains a GNU General Public License (GPL).