porting driver and API from win2000 to win98

Hi everyone,

Currently I am writing a USB driver for win2000 and I need to port it to
win98. The system is designed so that up to 4 identical USB devices to be
plugged in. They will all have a the same Vid and Pid but will a specific
serial number to indicate it as board 1, 2, 3 or 4.

My API layer gets the path for the correct USB device by the following
process,

  1. get the HDEVINFO by calling SetupDiGetClassDevs(pGuid, BoardLocation,
    NULL, (DIGCF_PRESENT | DICF_INTERFACEDEVICE)) where BoardLocation is a
    string like “USB\Vid\4c46&Pid_4450\06660668” (this is basically what is
    concatenated with the GUID to make the symbolic link).
    2)get the SP_INTERFACE_DEVICE_DATA from SetupDiEnumDeviceInterfaces
    3)get the SP_INTERFACE_DEVICE_DETAIL_DATA SetupDiGetInterfaceeviceDetail
    4)I can then call CreateFile with the DevicePath of the
    SP_INTERFACE_DEVICE_DETAIL_DATA.

in win2000 if the board is not present then SetupDiGetClassDevs returns a
HDEVINFO of zero interfaces, but for win98 SetupDiGetClassDevs will return a
list of all the devices present. This causes problems as the API will be
communicating with the wrong device.

Can someone please tell me if the method I am doing something incorrectly or
do I have to use a different method for win98.

thanks,

Matthew Tse


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com