64位磁盘过滤驱动的INF怎么写啊?
以下是微软的TOASTER过滤驱动,我要改成磁盘过滤驱动,怎么写啊。
我试了,把
[Version]
Signature="$WINDOWS NT$"
Class=TOASTER
ClassGuid={B85B7C50-6A01-11d2-B841-00C04FAD5171}
改为
[Version]
Signature="$WINDOWS NT$"
Class=DiskDrive
ClassGuid={4D36E967-E325-11CE-BFC1-08002BE10318}
可是加载不成功啊。
显示
“指定的文件夹没有包含设备的兼容软件驱动程序。如果该文件夹包含驱动程序”
“请确定它是为 用于基于 x64的系统的 Windows 设计的。”
;/*++
;
;Copyright (c) 1990-1999 Microsoft Corporation All rights Reserved
;
;Module Name:
;
; filter.INF
;
;Abstract:
; INF file for installing toaster device drivers
;--*/
[Version]
Signature="$WINDOWS NT$"
Class=TOASTER
ClassGuid={B85B7C50-6A01-11d2-B841-00C04FAD5171}
Provider=%MSFT%
DriverVer=09/21/2006,6.0.5736.1
CatalogFile=toaster.cat
[DestinationDirs]
DefaultDestDir = 12
;*****************************************
; Toaster Device Filter Install Section
;*****************************************
[Manufacturer]
%StdMfg%=Standard,NTamd64
[Standard.NTamd64]
; DisplayName Section DeviceId
; ----------- ------- --------
%ToasterFilter.DeviceDesc%=ToasterFilter, {b85b7c50-6a01-11d2-b841-00c04fad5171}\MsToaster
;=====================================================================
[ToasterFilter.NT]
;=============== Get the standard stuff from Toaster.inf==============
Include=toaster.inf
Needs=Toaster_Device.NT
CopyFiles=ToasterFilter.NT.Copy
AddReg=ToasterFilter.NT.AddReg
[ToasterFilter.NT.Copy]
devupper.sys
[ToasterFilter.NT.AddReg]
; Add registry entries here
[ToasterFilter.NT.HW]
;================ Add our own stuff
AddReg = ToasterFilter.NT.HW.AddReg
;================ Add in the standard stuff provided by Toaster
Include = toaster.inf
Needs = Toaster_Device.NT.HW
[ToasterFilter.NT.HW.AddReg]
HKR,,"UpperFilters",0x00010000,"DevUpper"
;*****************************************
; Toaster Device Filter Service Section
;*****************************************
[ToasterFilter.NT.Services]
;Do not specify SPSVCINST_ASSOCSERVICE on filter drivers.
AddService = DevUpper,, filter_Service_Inst
;
;=========== This will add toaster as the service and make sure =====
;=========== that toaster.sys has been installed ====================
Include=Toaster.inf
Needs=Toaster_Device.NT.Services
[filter_Service_Inst]
DisplayName = %filter.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\DevUpper.sys
;*************************
; Source file information
;*************************
[SourceDisksNames]
1 = %DiskId1%,,,""
[SourceDisksFiles]
DevUpper.sys = 1,,
[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
MSFT = "Microsoft"
StdMfg = "(Standard system devices)"
ClassName = "Toaster"
DiskId1 = "Toaster Filter Installation Disk #1"
ToasterFilter.DeviceDesc = "Microsoft Toaster With Upper Device Filter"
filter.SvcDesc = "Microsoft Toaster Filter Driver"
[解决办法]
不是光改Driver Class就可以的。相关的很多其他Section也需要更新。
建议看一下SetupAPI Log看看确切地错误信息是什么。
[ToasterFilter.NT.HW]
;================ Add our own stuff
AddReg = ToasterFilter.NT.HW.AddReg
[ToasterFilter.NT.HW.AddReg]
[ToasterFilter.NT.Services]