Hi all,
I am facing a strange condition while attempting to pre-install on Win2K my
new usb driver with fastinst.exe.
At the end of the installation process my driver is unexpectely loaded and
started.
StartDevice procedure of course fails with code 0xC0000010 when requesting
USB_DEVICE_SESCRIPTOR_TYPE
I presume because there is no real device attached.
As result I have in device manager an instance of my device with a great
yellow !
When I manually uninstall this instance everything works fine, driver is
loaded as soon any device is attached.
The problem seems to be related to UpdateDriverForPlugAndPlayDevices(), I
have the error
with both fastinst.exe and a custom setup program which uses
UpdateDriverForPlugAndPlayDevices().
Using SetupCopyOEMInf() everything works fine, but I would like to
understand why I am loaded without any
real device attached.
Any suggestion will be very appreciated
in the meanwhile an merry Christmas and happy new year to everybody in the
list,
PaoloC
Hereafter the INF file I am using:
[Version]
Signature="$CHICAGO$"
Class=UsbPrintGrabber
ClassGuid={E6496114-C970-499d-9730-CD0BC051D3D8}
provider=%MSFT%
DriverVer=14/Dec/2003,1.00.00.0005
LayoutFile=layout.inf
[SourceDisksNames]
1="UsbPrintGrab Installation Disk",,,
[SourceDisksFiles]
UpgLoad.sys = 1
UpgFirmware.hex = 1
[Manufacturer]
%MfgName%=DeviceList
[DeviceList]
;
; The following PIDs are for all of the devices in the EZ-USB family.
; These are the hardcoded PIDs that will be reported by an EZ-USB
; device with no external EEPROM. Bound to the general purpose driver.
;
%USB\VID_0547&PID_2131.DeviceDesc%=UPG.Load, USB\VID_0547&PID_2131
;---------------------------------------------------------------------------
; UPG CLASS Sections
;---------------------------------------------------------------------------
[ClassInstall32]
AddReg=UpgClassAddreg
[UpgClassAddreg]
HKR,,,,%UpgClassName%
HKR,,Icon,,"-23"
;[PreCopySection]
;HKR,,NoSetupUI,,1
[DestinationDirs]
UPG.Files.Sys = 10,System32\Drivers
;---------------------------------------------------------------------------
; UPG LOADER
;---------------------------------------------------------------------------
[UPG.Load]
CopyFiles=UPG.Files.Sys
AddReg=UPG.Load.AddReg
[UPG.Load.NT]
CopyFiles=UPG.Files.Sys
AddReg=UPG.Load.AddReg
[UPG.Load.NT.Services]
AddService = UpgLoad, 0x00000002, UPG.Load.AddService
[UPG.Load.AddService]
DisplayName = %UPG.Load.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\System32\Drivers\UpgLoad.sys
[UPG.Load.AddReg]
;HKR,,DevLoader,,*ntkern
;HKR,,NTMPDriver,,UpgLoad.sys
HKLM,"System\Currentcontrolset\Services\UpgLoad\Parameters","TriggerVid",0x1
0001,0x0547
HKLM,"System\Currentcontrolset\Services\UpgLoad\Parameters","TriggerPid",0x1
0001,0x2131
HKLM,"System\Currentcontrolset\Services\UpgLoad\Parameters","LoadFirmware",0
x10001,0x00
HKLM,"System\Currentcontrolset\Services\UpgLoad\Parameters","LoadDelaySec",0
x10001,5
HKLM,"System\Currentcontrolset\Services\UpgLoad\Parameters","Firmware",0x00,
"UpgFirmware.hex"
;destination-file-name[,source-file-name][,temporary-file-name][,flag]
[UPG.Files.Sys]
UpgLoad.sys
UpgFirmware.hex
;---------------------------------------------------------------------------
; UPG string
;---------------------------------------------------------------------------
[Strings]
MSFT="Omnilab srl"
MfgName="Omnilab"
USB\VID_0547&PID_2131.DeviceDesc="UPG loader 2131xx no f/w"
UPG.Load.SvcDesc="Usb Print Grabber f/w loader"
UpgClassName="Usb Printer Grabber"