我正在研究我的第一个文件系统微型过滤器。我正在使用 WDK 中的 SwapBuffers 示例项目。我已经成功地编译并将这个项目从物理笔记本电脑部署到虚拟机。但是从 INF 文件安装失败。我查看了目标机器上 C:\DriverTest\Logs 中的日志文件,并在日志文件中找到了这些行。
UserText="WDTF_TARGETS: Query("HardwareIDs='WDTF\NOEXIST'")"
UserText="WDTF_DRIVER_SETUP_SYSTEM: CreateRootEnumeratedDevicesFromPackage()"
UserText="WDTF_DRIVER_SETUP_SYSTEM:
UserText="WDTF_TEST: System has no device the driver package can be installed onto."
这是INF文件。它未对原始样本进行修改。
;;; SwapBuffers
;;; Copyright (c) 2001, Microsoft Corporation
[Version]
signature = "$Windows NT$"
Class = "Encryption" ;This is determined by the work this filter driver does
ClassGuid = {a0a701c0-a511-42ff-aa6c-06dc0395576f} ;This value is determined by the Class
Provider = %Msft%
DriverVer = 06/16/2007,1.0.0.3
CatalogFile = swapbuffers.cat
[DestinationDirs]
DefaultDestDir = 12
MiniFilter.DriverFiles = 12 ;%windir%\system32\drivers
;; Default install sections
[DefaultInstall]
OptionDesc = %ServiceDescription%
CopyFiles = MiniFilter.DriverFiles
[DefaultInstall.Services]
AddService = %ServiceName%,,MiniFilter.Service
;; Default uninstall sections
[DefaultUninstall]
DelFiles = MiniFilter.DriverFiles
[DefaultUninstall.Services]
DelService = SwapBuffers,0x200 ;Ensure service is stopped before deleting
; Services Section
[MiniFilter.Service]
DisplayName = %ServiceName%
Description = %ServiceDescription%
ServiceBinary = %12%\%DriverName%.sys ;%windir%\system32\drivers\
Dependencies = "FltMgr"
ServiceType = 2 ;SERVICE_FILE_SYSTEM_DRIVER
;StartType = 0 ;SERVICE_BOOT_START
StartType = 3 ;SERVICE_DEMAND_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
LoadOrderGroup = "FSFilter Encryption"
AddReg = MiniFilter.AddRegistry
; Registry Modifications
[MiniFilter.AddRegistry]
HKR,,"SupportedFeatures",0x00010001,0x3
HKR,"Instances","DefaultInstance",0x00000000,%Instance1.Name%
HKR,"Instances\"%Instance1.Name%,"Altitude",0x00000000,%Instance1.Altitude%
HKR,"Instances\"%Instance1.Name%,"Flags",0x00010001,%Instance1.Flags%
; Copy Files
[MiniFilter.DriverFiles]
%DriverName%.sys
[SourceDisksFiles]
swapbuffers.sys = 1,,
[SourceDisksNames]
1 = %DiskId1%,,,
;; String Section
[Strings]
Msft = "Microsoft Corporation"
ServiceDescription = "Swap Buffers Sample Mini-Filter Driver"
ServiceName = "SwapBuffers"
DriverName = "SwapBuffers"
DiskId1 = "SwapBuffers Device Installation Disk"
;Instances specific information.
Instance1.Name = "SwapBuffers Instance"
Instance1.Altitude = "141000"
Instance1.Flags = 0x0 ; allow automatic attachments
VMware 会话有一个硬盘驱动器,显示为查看 DEVCON 的 SCSI 驱动器。
谁能告诉我我在这里缺少什么?