6.3. Developing Your Driver on Windows CE Platforms

To use WinDriver to handle a Plug-and-Play device, you must first register the device with the WinDriver kernel module (windrvr6.dll).

To register the device with WinDriver, use either of the following methods:

  • Modify the registry to identify your device and link it to windrvr6.dll. The registry can be modified by adding the relevant information to your project.reg file.
    • To identify the device by its vendor ID (<VID>) and product ID (<PID>) — as decimal values — add the following:
      [HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients\<VID>_<PID>\Default\Default\WDR] 
          "DLL"="windrvr6.dll"
    • To identify the device by its USB class (<CLASS>), subclass (<SUBCLASS>), and protocol (<PROT>) — as decimal values — add the following:
      [HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients\Default\Default\<CLASS>_<SUBCLASS>_<PROT>\WDR]
          "DLL"="windrvr6.dll"
  • Call WDU_Init() to identify the device by its vendor and product IDs and register it with WinDriver, before connecting the device to the computer .

[Note]
For more information about the relevant registry settings, refer to USB Driver Registry Settings in the MSDN Library.