Support of USB hardware tokens

Alexander Morozov amorozov at
Mon Jul 7 03:10:17 CDT 2008

Hello All,

I created a patch which adds support of USB hardware tokens with native 
Windows drivers (.sys):
Now SafeNet UltraPro (driver sntnlusb.sys, vid/pid 04b9:0300) and Eutron 
SmartKey 3 (driver eusk3usb.sys, vid/pid 073d:0025) are supported. These 
devices are used by some Windows applications for piracy defense.

This patch adds dlls/usbd.sys, dlls/wineusbhub and programs/wineusb. Usbd.sys 
is exist also in Windows. This is a kernel level DLL exporting some functions 
required for USB drivers. Wineusbhub plays a role of a lower driver in device 
stack (under USB token driver). Wineusb is a service calling driver`s 
AddDevice routine if there is a registry key corresponding to device and 
device is plugged. Now this check is executed only when wineusb is starting.

USB driver is loaded by programs/winedevice. Now AddDevice and some PNP 
functions are called in addition to DriverEntry. Calling DriverEntry is 
realized by means of wineserver requests. Some required ntoskrnl.exe 
functions are added.

For using native USB driver should copy 
HKLM\System\CurrentControlSet\Enum\USB\Vid_<vid>&Pid_<pid> and 
HKLM\System\CurrentControlSet\Services\<driver_name> from Windows registry. 
HKLM\System\CurrentControlSet\Services\<driver_name>\Start should be setted 
to 2.

I`d like to add this patch to Wine. What about this? I think should split my 
patch into many little commits. Should also add some tests or make some 

Alexander Morozov

More information about the wine-devel mailing list