2016-07-26 4 views
0

NDIS 6 필터 드라이버가 있습니다. 공식 ndislwf 예제를 기반으로하는 패킷 캡처 드라이버입니다. 전체 프로젝트는 오픈 소스 this GitHub repo에 있습니다. npf.slnVisual Studio 2015을 통해 열 수 있습니다.오류 MSB3073 : 코드 "-1"로 종료 된 "staticdv.exe/devenv/check"명령

제 문제는 Static Driver Verifier (SDV)이 내 프로젝트에서 작동하지 않습니다. Driver ->Launch Static Driver Verifier...Visual Studio 2015에서 클릭하면 SDV GUI가 표시되고 CleanStart을 클릭했습니다. 잠시 (3-5 분), SDV에 알려지지 않은 오류가 발생했다는 창이 나타났습니다.. 그리고 SDV UI의 Alerts 탭은 말했다 :

J:\npcap\packetWin7\npf\npf>cd /d "J:\npcap\packetWin7\npf\npf" && msbuild "npf.vcxproj" /t:sdv /p:inputs="/devenv /check" /p:configuration="Win7 Release SDV" /p:platform="x64" 
Microsoft (R) Build Engine version 14.0.25420.1 
Copyright (C) Microsoft Corporation. All rights reserved. 
Build started 7/25/2016 12:42:39 PM. 
Project "J:\npcap\packetWin7\npf\npf\npf.vcxproj" on node 1 (sdv target(s)). 
sdv: 
    staticdv.exe /devenv /check 
    --------------------------------------------------------------------- 
    Microsoft (R) Windows (R) Static Driver Verifier Version 4.0.505.8 
    Copyright (C) Microsoft Corporation. All rights reserved. 
    --------------------------------------------------------------------- 
    SDV is building for <Win7 Release SDV|x64> 
    Build  'npf' ... Done 
    Scan  'npf' ... Done 
    No reuse data to copy from previous SDV run. 
    The finalization step failed for 'npf' . 
C:\Program Files (x86)\Windows Kits\10\build\windowsdriver.Sdv.targets(65,9): error MSB3073: The command "staticdv.exe /devenv /check" exited with code -1. [J:\npcap\packetWin7\npf\npf\npf.vcxproj] 
Done Building Project "J:\npcap\packetWin7\npf\npf\npf.vcxproj" (sdv target(s)) -- FAILED. 
Build FAILED. 
"J:\npcap\packetWin7\npf\npf\npf.vcxproj" (sdv target) (1) -> 
(sdv target) -> 
    C:\Program Files (x86)\Windows Kits\10\build\windowsdriver.Sdv.targets(65,9): error MSB3073: The command "staticdv.exe /devenv /check" exited with code -1. [J:\npcap\packetWin7\npf\npf\npf.vcxproj] 
    0 Warning(s) 
    1 Error(s) 
Time Elapsed 00:01:30.61 

그런 다음 나는 StaticDVTrace.log 로그 바라 보았다. 그것은 다음과 같이 말했다 :

Information:Calling DriverCleanup. 
Information:Creating a new SDV object. 
Information:Loading cache data. 
Information:Calling cleanup routine. 
Information:Creating a new SDV object. 
Information:SetBase this.DdkPath=C:\Program Files (x86)\Windows Kits\10\ 
Information:SetBase this.Path=J:\npcap\packetWin7\npf\npf 
Information:SetBase creating the DriverCollection via constructor. 
Information:Driver Constructor:Calling RuleCollection constructor with rule list and rule path 
Information:SetBase this.Environment=WDK 
Information:SetBase Calling InitBaseEnvironment. 
Information:Check that we have driver folder. 
Information:Calling build to get cl and link flags. 
Information:GenerateBuildLogNewCall build.exe. 
Information:GenerateBuildLogNewCall to build.exe worked. 
Information:Build  'npf' ... Done 
Information:Found Sdv links file and attempting to serialize the data into our object model. 
Information:Found Sdv source file and attempting to serialize the data into our object model. 
Information:Found cflags in Sdv source file. 
Information:Slam model equals 
Information:Slam rules equals 
Information:Slam Data equals 
Information:Calling OpenNewConfiguration 
Information:SetBase this.DdkPath=C:\Program Files (x86)\Windows Kits\10\ 
Information:SetBase this.Path=J:\npcap\packetWin7\npf\npf 
Information:SetBase Opening All.sdv to load active rule list. 
Information:OpenMsft Opening All.sdv from:C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\data\ndis\All.sdv 
Information:OpenMsft Reading :C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\data\ndis\All.sdv 
Information:OpenMsft Adding :DDIUSAGE.SDV.fsm to the list of rules. 
Information:OpenMsft Adding :IRQL.SDV.fsm to the list of rules. 
Information:OpenMsft Adding :IRQL_SHARED.SDV.fsm to the list of rules. 
Information:OpenMsft Adding :LOCKING.SDV.fsm to the list of rules. 
Information:OpenMsft Adding :MEMORYUSAGE.SDV.fsm to the list of rules. 
Information:OpenMsft Adding :MISCELLANEOUS.SDV.fsm to the list of rules. 
Information:OpenMsft Adding :OIDPROCESSING.SDV.fsm to the list of rules. 
Information:OpenMsft Adding :WARNING.SDV.fsm to the list of rules. 
Information:OpenMsft Adding :.fsm to the list of rules. 
Information:SetBase Calling driver constructor. 
Information:RuleCollection Constructor:Calling Rule Constructor. 
Information:RuleCollection Constructor:add rule object to collection. 
... 
Information:RuleCollection Constructor:Calling Rule Constructor. 
Information:RuleCollection Constructor:add rule object to collection. 
Information:SetBase this.Environment=WDK 
Information:SetBase Calling InitBaseEnvironment. 
Information:this.NumberOfChecks=0100 
Information:this.NumberOfNotStarted=100 
Information:Opening sdv-default.xml from:C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\data\ndis 
Information:SdvScan:Local sdv-default.xml found. 
Information:Calling build to get cl and link flags. 
Information:Loading library data from cache at:C:\Program Files (x86)\Windows Kits\10\ 
Information:Loading build data. 
Information:Counting the LOC in the driver. 
Information:Loading WDM entry points from :C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\data\ndis\DdkEntryPoints.xml 
Information:Calling CheckScan to validate we have a valid SDV-map.h file. 
Information:CheckScan:Generating SDV-map.h file via call to SdvMap. 
Information:SdvMap:Iterate over each driver in the collection. 
Information:BuildLib:Create sdv folder. 
Information:BuildLib:Create sdv\scan folder. 
7/25/2016 11:00:08 PM:The SDV-map.h file at: J:\npcap\packetWin7\npf\npf. 
Information:The SDV-map.h file at:J:\npcap\packetWin7\npf\npf does not have the "Approved" flag set to "true." 
Information:Scan  'npf' ... Done 
Information:CheckScan:Calling LoadSdvMap. 
Information:Check if debug flags are set. 
Information:Start sdv scan step via call to SdvScan. 
Information:SdvScan:Calling SetupSdvScanFolders 
Information:SdvScan:Checking if we have a local version of sdv-default.xml 
Information:BuildLib:Create sdv folder. 
Information:BuildLib:Create sdv\scan folder. 
Information:Copying old reuse data for this run...J:\npcap\packetWin7\npf\npf 
Information:No reuse data to copy from previous SDV run. 
Information:Calling the SdvCheck stage. 
Information:SdvCheck:Calling CleanupCflags. 
Information:SdvCheck:Calling SetupSdvCheckFolders. 
Information:SdvCheck:Calling RuleSpec. 
Information:RuleSpec:. 
Information:RuleSpec:Calling CompileStage for 
Information:RuleSpec:Calling CompileStage for pre_isminiport.fsm 
7/25/2016 11:00:16 PM:The SDV compile step failed. 

나는 오류 메시지에서 아무것도 말할 수 없다. 아무도 나를 도울 수 있습니까? 감사!

답변

0

approve the sdv-map.h file해야합니다. SDV가 원본 디렉토리에서 생성 한 sdv-map.h 파일을 열고 모든 것이 올바른지 확인한 다음 //Approved=false//Approved=true으로 변경하십시오.