40楼#
发布于:2004-02-11 14:21
yyouking:谢谢你的回答,可能是我没说清楚。
我希望在不卸载驱动1的情况下安装驱动2,两个驱动其实一模一样,只是inf文件不一样,区别在于pid,vid不同,还有设备名的字符串不同。最终目的是在机器上安装两个以上的驱动程序,只通过改变固件的pid,vid,使固件接入usb总线时被认作不同设备,且都通信正常。 我在不同的机器上(2k,xp系统)试了很多次,都实现不了,会不会在第一次安装完驱动以后(单独安装驱动1和驱动2都能用),还有什么信息保存在什么地方,由于两个驱动(sys文件)除了名字其他都一样,而造成冲突。。。猜想中:) 你能试试这样行么?或者有别的实现办法?兄弟这里先谢谢了。 |
|
|
41楼#
发布于:2004-02-11 15:19
可以的,一个驱动可以适应多个设备
以你的情况,只要固件和INF中的PID,VID一致就可以了 安装一次后, 同时修改固件和INF中的PID就可以了 |
|
|
42楼#
发布于:2004-02-16 09:53
不行中。。。
能不能帮我看看下面两个inf文件 ;; FLX_USB_CCtrl.inf ;; ********* PLEASE READ *********** ;; The wizard cannot create exact INF files for all buses and device types. ;; You may have to make changes to this file in order to get your device to ;; install. In particular, hardware IDs and logical configurations require ;; intervention. ;; ;; The Windows DDK documentation contains an excellent INF reference. ;--------- Version Section --------------------------------------------------- [Version] Signature="$Windows 95$" ; If device fits one of the standard classes, use the name and GUID here, ; otherwise create your own device class and GUID as this example shows. Class=USB ClassGUID={36FC9E60-C465-11CF-8056-444553540000} Provider=%ProviderName% ;--------- SourceDiskNames and SourceDiskFiles Section ----------------------- ; These sections identify source disks and files for installation. They are ; shown here as an example, but commented out. ;[SourceDisksNames] ;1 = "Install Disk",Disk1,, ;[SourceDisksFiles] ;FLX_USB_CCtrl.sys = 1,, ;--------- ClassInstall/ClassInstall32 Section ------------------------------- ; Not necessary if using a standard class ; 9X Style [ClassInstall] Addreg=Class_AddReg ; NT Style [ClassInstall32] Addreg=Class_AddReg [Class_AddReg] HKR,,,,%DeviceClassName% HKR,,Icon,,"1" ;--------- DestinationDirs Section ------------------------------------------- [DestinationDirs] FLX_USB_CCtrl_Files_Driver = 10,System32\Drivers ;--------- Manufacturer and Models Sections ---------------------------------- [Manufacturer] %MfgName%=Mfg0 [Mfg0] %DeviceDesc%=FLX_USB_CCtrl_DDI, USB\VID_5680&PID_010c ;---------- DDInstall Sections ----------------------------------------------- ; --------- Windows 9X ----------------- ; Experimentation has shown that DDInstall root names greater than 19 characters ; cause problems in Windows 98 [FLX_USB_CCtrl_DDI] CopyFiles=FLX_USB_CCtrl_Files_Driver AddReg=FLX_USB_CCtrl_9X_AddReg [FLX_USB_CCtrl_9X_AddReg] HKR,,DevLoader,,*ntkern HKR,,NTMPDriver,,FLX_USB_CCtrl.sys HKR, "Parameters", "BreakOnEntry", 0x00010001, 0 ; --------- Windows NT ----------------- [FLX_USB_CCtrl_DDI.NT] CopyFiles=FLX_USB_CCtrl_Files_Driver AddReg=FLX_USB_CCtrl_NT_AddReg [FLX_USB_CCtrl_DDI.NT.Services] Addservice = FLX_USB_CCtrl, 0x00000002, FLX_USB_CCtrl_AddService [FLX_USB_CCtrl_AddService] DisplayName = %SvcDesc% ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %10%\System32\Drivers\FLX_USB_CCtrl.sys [FLX_USB_CCtrl_NT_AddReg] HKLM, "System\CurrentControlSet\Services\FLX_USB_CCtrl\Parameters",\ "BreakOnEntry", 0x00010001, 0 ; --------- Files (common) ------------- [FLX_USB_CCtrl_Files_Driver] FLX_USB_CCtrl.sys ;--------- Strings Section --------------------------------------------------- [Strings] ProviderName="Your Company Name here" MfgName="Name of HW Manufacturer here" DeviceDesc="FLX_USB_CCtrl" ;"Description of Device here" DeviceClassName="FLX_production" ;"Description of FLX_USB_TEST Device class here" SvcDesc="Description of FLX_USB_TEST NT service here" |
|
|
43楼#
发布于:2004-02-16 09:59
;; FLX_USB_DOG.inf
;; ********* PLEASE READ *********** ;; The wizard cannot create exact INF files for all buses and device types. ;; You may have to make changes to this file in order to get your device to ;; install. In particular, hardware IDs and logical configurations require ;; intervention. ;; ;; The Windows DDK documentation contains an excellent INF reference. ;--------- Version Section --------------------------------------------------- [Version] Signature="$Windows 95$" ; If device fits one of the standard classes, use the name and GUID here, ; otherwise create your own device class and GUID as this example shows. Class=USB ClassGUID={36FC9E60-C465-11CF-8056-444553540000} Provider=%ProviderName% ;--------- SourceDiskNames and SourceDiskFiles Section ----------------------- ; These sections identify source disks and files for installation. They are ; shown here as an example, but commented out. ;[SourceDisksNames] ;1 = "Install Disk",Disk1,, ;[SourceDisksFiles] ;FLX_USB_DOG.sys = 1,, ;--------- ClassInstall/ClassInstall32 Section ------------------------------- ; Not necessary if using a standard class ; 9X Style [ClassInstall] Addreg=Class_AddReg ; NT Style [ClassInstall32] Addreg=Class_AddReg [Class_AddReg] HKR,,,,%DeviceClassName% HKR,,Icon,,"1" ;--------- DestinationDirs Section ------------------------------------------- [DestinationDirs] FLX_USB_DOG_Files_Driver = 10,System32\Drivers ;--------- Manufacturer and Models Sections ---------------------------------- [Manufacturer] %MfgName%=Mfg0 [Mfg0] %DeviceDesc%=FLX_USB_DOG_DDI, USB\VID_5680&PID_010c ;---------- DDInstall Sections ----------------------------------------------- ; --------- Windows 9X ----------------- ; Experimentation has shown that DDInstall root names greater than 19 characters ; cause problems in Windows 98 [FLX_USB_DOG_DDI] CopyFiles=FLX_USB_DOG_Files_Driver AddReg=FLX_USB_DOG_9X_AddReg [FLX_USB_DOG_9X_AddReg] HKR,,DevLoader,,*ntkern HKR,,NTMPDriver,,FLX_USB_DOG.sys HKR, "Parameters", "BreakOnEntry", 0x00010001, 0 ; --------- Windows NT ----------------- [FLX_USB_DOG_DDI.NT] CopyFiles=FLX_USB_DOG_Files_Driver AddReg=FLX_USB_DOG_NT_AddReg [FLX_USB_DOG_DDI.NT.Services] Addservice = FLX_USB_DOG, 0x00000002, FLX_USB_DOG_AddService [FLX_USB_DOG_AddService] DisplayName = %SvcDesc% ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %10%\System32\Drivers\FLX_USB_DOG.sys [FLX_USB_DOG_NT_AddReg] HKLM, "System\CurrentControlSet\Services\FLX_USB_DOG\Parameters",\ "BreakOnEntry", 0x00010001, 0 ; --------- Files (common) ------------- [FLX_USB_DOG_Files_Driver] FLX_USB_DOG.sys ;--------- Strings Section --------------------------------------------------- [Strings] ProviderName="Your Company Name here" MfgName="Name of HW Manufacturer here" DeviceDesc="FLX_USB_DOG" ;"Description of Device here" DeviceClassName="FLX_production" ;"Description of FLX_USB_TEST Device class here" SvcDesc="Description of FLX_USB_TEST NT service here" |
|
|
44楼#
发布于:2004-02-16 10:40
Signature="$CHICAGO$" 表示是WDM类型的驱动
|
|
|
45楼#
发布于:2004-02-16 10:42
USB的驱动肯定要修改为Signature="$CHICAGO$"
|
|
|
46楼#
发布于:2004-02-16 19:37
可以了,是SvcDesc串重复了,谢谢yyouking的回答:)
|
|
|
47楼#
发布于:2004-02-17 10:46
我的问题不是重新安装驱动的问题,
我的问题是这样的:我用ds向导生成了一个usb驱动,Pid,vid都对,endpoint1--interrupt--in ,endpoint2--interrupt--out,我并没有加入任何代码,我把我的inf文件也修改成了usb的inf文件,然后我就安装驱动,安装后,该设备无法启用,我用monitor跟踪发现问题出现在startdevice中,我觉得很奇怪,按理说向导生成的框架应该能够启动设备,只是无法传输数据而已。谁能够帮忙告诉为什么? |
|
48楼#
发布于:2004-02-17 11:07
说的没有错,是INF问题
|
|
|
49楼#
发布于:2004-02-17 11:26
可是inf文件是照你的修改过的,不会错的,我用monitor跟踪时,case AC_COULD_NOT_LOCATE_INTERFACE:
t << "Could not locate interface\n"; 但是我觉得我用向导生成框架时,endpoint没有错啊, 这个问题郁闷了我好久! |
|
50楼#
发布于:2004-02-17 11:54
安装后,该设备无法启用 就是安装没有完成啊
|
|
|
上一页
下一页