파일 작업을 기록하고 특정 파일 작업을 차단하기 위해 Windows 7에 MTP 장치 용 필터 드라이버를 쓰려고합니다. Windows에서 MTP를 처리하는 드라이버는 WpdMtpDr.dll 인 UMDF 드라이버이며, WpdMtpDr.dll
을 함수 드라이버로 처리 할 때이 example (UMDF 함수 드라이버 위의 샘플 UMDF 필터 드라이버)에 따라 UMDF 필터 드라이버를 작성했습니다. 또한 드라이버가 위 또는 아래 필터로 설치되었는지 확인하기 위해 참조로 this을 사용했습니다. dpinst.exe를 사용하여 드라이버를 설치했습니다. 아래는 나의 INF 파일입니다.MTP 장치 용 UMDF 필터 드라이버
설치에 오류가 없었지만 MTP 장치 (삼성 Galaxy S3)를 연결할 때 필터 드라이버가 드라이버 목록 (장치 관리자를 통해 보임)에 없었으며 해당 DllMain이 호출되지 않았습니다.
나는 아래쪽과 위쪽 필터 사이를 전환하려고 시도했지만 어느 쪽도 도움이되지 못했습니다.
내가 뭘 잘못하고 있니?
;
; umdffilter.inf
;
[Version]
Signature="$Windows NT$"
Class=WPD
ClassGuid={EEC5AD98-8080-425f-922A-DABF3DE3F69A}
Provider=%ManufacturerName%
CatalogFile=umdffilter.cat
DriverVer=01/02/2013,18.8.52.851`
[Manufacturer]
%ManufacturerName%=Standard,NTamd64
[Standard.NTamd64]
%DeviceName%=MyDevice_Install, usb\vid_04e8&pid_6860
[SourceDisksFiles]
umdffilter.dll=1
WudfUpdate_01011.dll=1
WdfCoInstaller01011.dll=1
WinUsbCoinstaller2.dll=1
[SourceDisksNames]
1 = %DiskName%
; =================== UMDF Filter Driver ==================================
[MyDevice_Install.NT]
CopyFiles=UMDriverCopy
Include=wpdmtp.inf, WINUSB.INF ; Import sections from wpdmtp.inf and WINUSB.INF
Needs=WPD.MTP, WINUSB.NT ; Run the CopyFiles & AddReg directives for wpdmtp.inf and WINUSB.INF
[MyDevice_Install.NT.hw]
Include = wpdmtp.inf
Needs = WPD.MTP.Registration
AddReg = MyDevice_AddReg
[MyDevice_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall ; flag 0x2 sets this as the service for the device
AddService=WinUsb,0x000001f8,WinUsb_ServiceInstall ; this service is installed because its a filter.
[MyDevice_Install.NT.CoInstallers]
CopyFiles=CoInstallers_CopyFiles
AddReg=CoInstallers_AddReg
[MyDevice_Install.NT.Wdf]
Include = wpdmtp.inf
Needs = WPD.MTP.Wdf
KmdfService=WINUSB, WinUsb_Install
UmdfService=umdffilter,umdffilter_Install
UmdfServiceOrder=umdffilter,WpdMtpDriver ; upper filter
[WinUsb_Install]
KmdfLibraryVersion=1.11
[WpdMtpDriver_Install]
UmdfLibraryVersion=1.11.0
[umdffilter_Install]
UmdfLibraryVersion=1.11.0
ServiceBinary=%12%\UMDF\umdffilter.dll
DriverCLSID={8cec927c-219a-4777-baea-8626d6a0ce50}
[MyDevice_AddReg]
HKR,,"LowerFilters",0x00010008,"WinUsb" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND
[WUDFRD_ServiceInstall]
DisplayName = %WudfRdDisplayName%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WUDFRd.sys
LoadOrderGroup = Base
[WinUsb_ServiceInstall]
DisplayName = %WinUsb_SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys
[CoInstallers_CopyFiles]
WdfCoInstaller01011.dll
WudfUpdate_01011.dll
WinUsbCoinstaller2.dll
[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WudfUpdate_01011.dll", "WinUsbCoinstaller2.dll", "WdfCoInstaller01011.dll,WdfCoInstaller"
[DestinationDirs]
UMDriverCopy=12,UMDF ; copy to drivers\umdf
CoInstallers_CopyFiles=11 ; copy to system32
[UMDriverCopy]
umdffilter.dll
; =================== Generic ==================================
[Strings]
ManufacturerName="Me"
ClassName="Samples" ; TODO: edit ClassName
DiskName = "umdffilter Installation Disk"
WinUsb_SvcDesc="WinUSB Driver"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
DeviceName="umdffilter Device"`
분명히 UMDF 필터는 타사 드라이버로 설치할 수 없습니다. 이는 공급 업체 패키지의 일부로 설치하기위한 것입니다. 특히 Samsung Galaxy S3에서 장치가 시작되지 않게했습니다 (코드 10). – oren671