- DIFx Issue for Composite USB Devices
- Posted by 0xC0000008 on January 27th, 2007
We have a composite USB device. It has 2 interfaces each belonging to
a different setup class and is driven by a single driver. Following
are some details about the devices.
INTERFACE #1 :
HardwareId=USB\VID_vvvv&PID_pppp&MI_00
SetupClass=Modem
..INF File=x.inf
FunctionDriver=modem.sys (inbox)
LowerFilterDriver=mydriver.sys (installed by .INF file)
AddService Line in .INF as as follows :
AddService= mydriver, 0x00000000, Device.AddService
[Device.AddService]
DisplayName=%SERVICENAME%
ServiceType= 1
StartType = 3
ErrorControl = 0
ServiceBinary = %12%\mydriver.sys
INTERFACE #2 :
HardwareId=USB\VID_vvvv&PID_pppp&MI_01
SetupClass=Port
..INF File=y.inf
FunctionDriver=mydriver.sys (installed by .INF file)
AddService Line in .INF as as follows :
AddService=mydriver, 0x00000002, Device.AddService
[Device.AddService]
DisplayName=%SERVICENAME%
ServiceType= 1
StartType = 3
ErrorControl = 0
ServiceBinary = %12%\mydriver.sys
PROBLEM:
We are using DifXCmd.exe sample from the WDK to install and remove the
drivers and the device itself and we are having the following issue.
Installation for both these interfaces devices go through fine.
However when we attempt to remove the devices DIFxCmd always fails for
the interface #1. We have tried quite a few things but nothing seems
to work.
ERROR_NO_DRIVER_SELECTED for INTERFACE (E0000203) #1.
Is this a bug in PnP Manager or DifX APIs that manifests itself when
uninstalling drivers for composite USB devices?
- Posted by chris.aseltine@gmail.com on January 28th, 2007
On Jan 27, 1:47 pm, "0xC0000008" <invalid.han...@gmail.com> wrote:
No, it isn't a bug. In the case of your modem device, are you
explicitly adding yourself as a LowerFilter of modem.sys with an
AddReg directive? I didn't see it in your sample INF.
- Posted by 0xC0000008 on January 29th, 2007
Actually the .INF file does contain the AddReg directive, here it
is...
%DEVICENAME% = XXDataPort, USB\VID_vvvv&PID_pppp&MI_00
[XXDataPort.NT.HW]
AddReg=LowerFilterAddReg
[LowerFilterAddReg]
HKR,,"LowerFilters",0x00010000,"mydriver"
- Posted by chris.aseltine@gmail.com on January 30th, 2007
On Jan 27, 1:47 pm, "0xC0000008" <invalid.han...@gmail.com> wrote:
Well, wait a minute. Why are you calling SetupDiGetSelectedDriver()
just to remove devices?
Just call SetupDiGetClassDevs() or whatever, followed by a call to
DIF_REMOVE.