성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Java - How to use the Foreign Funct...
[정성태] 제가 큰 실수를 했군요. ^^; Delegate를 통한 Bein...
[정성태] Working with Rust Libraries from C#...
[정성태] Detecting blocking calls using asyn...
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
[정성태] "props[i].GetValue(props[i])" 코드에서 ...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>error 1297: Device driver does not install on any devices, use primitive driver if this is intended.</h1> <p> <br /> ^^ 덧글을 통해 알게 되었는데,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Device driver does not install on any devices, use primitive driver if this is intended. ; <span style='color: blue; font-weight: bold'>https://www.sysnet.pe.kr/2/0/12111#14377</span> </pre> <br /> 기존 프로젝트를 Windows 10 2004 버전과 함께 나온 10.0.19041.1 버전의 WDK를 설치하고 나면 빌드 시 다음과 같은 INF 유효성 오류가 발생합니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 1>------ Rebuild All started: Project: KernelMemoryIO, Configuration: Debug x64 ------ 1>Building 'KernelMemoryIO' with toolset 'WindowsKernelModeDriver10.0' and the 'Desktop' target platform. 1>Stamping x64\Debug\KernelMemoryIO.inf 1>Stamping [Version] section with DriverVer=08/14/2020,15.53.27.530 1>D:\KernelMemoryIO\KernelMemoryIO.inf : <span style='color: blue; font-weight: bold'>error 1297: Device driver does not install on any devices, use primitive driver if this is intended.</span> 1>D:\KernelMemoryIO\KernelMemoryIO.inf(5-5): warning 1324: [Version] section should specify PnpLockdown=1. 1>Done building project "KernelMemoryIO.vcxproj" -- FAILED. ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== </pre> <br /> 검색해 보면 해결책이 나오는데요,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Error 1297 #2067 ; <a target='tab' href='https://github.com/MicrosoftDocs/windows-driver-docs/issues/2067'>https://github.com/MicrosoftDocs/windows-driver-docs/issues/2067</a> </pre> <br /> 어차피 장치를 사용하지 않는 kernel device driver라면 INF에 Manufacturer 섹션이 필요 없기 때문에 그냥 다음과 같이 주석 처리를 하고 (비어 있어도 상관없는) "DefaultInstall" 섹션만 추가하면 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > [Version] Signature="$WINDOWS NT$" Class=System ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318} Provider=%ManufacturerName% DriverVer= CatalogFile=KernelMemoryIO.cat [DestinationDirs] DefaultDestDir = 12 [SourceDisksNames] 1 = %DiskName%,,,"" [SourceDisksFiles] ; /* <span style='color: blue; font-weight: bold'>; [Manufacturer]</span> ; %ManufacturerName%=Standard,NT$ARCH$ ; <a target='tab' href='https://learn.microsoft.com/en-us/windows-hardware/drivers/develop/creating-a-primitive-driver'>https://learn.microsoft.com/en-us/windows-hardware/drivers/develop/creating-a-primitive-driver</a> ; */ <span style='color: blue; font-weight: bold'>[DefaultInstall.NT$ARCH$]</span> [Strings] ManufacturerName="<Your manufacturer name>" ;TODO: Replace with your manufacturer name ClassName="" DiskName="KernelMemoryIO Source Disk" </pre> <br /> <hr style='width: 50%' /><br /> <br /> 참고로, 위의 INF 파일에는 "<span class="tex2jax_ignore">$</span>ARCH<span class="tex2jax_ignore">$</span>"와 같은 - C/C++과 비교하면 매크로 상수들이 포함되어 있는데 빌드하고 나면 /Debug 결과물에 해당 매크로들이 최종 치환된 INF 파일이 놓이게 됩니다. 사실 비주얼 스튜디오가 보여주는 INF 오류들은 그 파일에 대해 직접 infverif.exe를 실행한 결과물이어서 다음과 같이 직접 실행해 보는 것도 가능합니다. <br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > D:\KernelMemoryIO\x64\Debug> <span style='color: blue; font-weight: bold'>"C:\Program Files (x86)\Windows Kits\10\Tools\x64\infverif.exe" /k KernelMemoryIO.inf</span> WARNING(1324) in D:\KernelMemoryIO\x64\Debug\KernelMemoryIO.inf, line 5: [Version] section should specify PnpLockdown=1. </pre> <br /> 경고가 하나 더 나오는군요. ^^ 따라서 저것도 없애려면 Version 섹션에 제안된 값을 설정하면 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > [Version] Signature="$WINDOWS NT$" Class=System ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318} Provider=%ManufacturerName% DriverVer= CatalogFile=KernelMemoryIO.cat <span style='color: blue; font-weight: bold'>PnpLockdown=1</span> </pre> <br /> <hr style='width: 50%' /><br /> <br /> 새로 나온 10.0.19041.1 버전의 WDK를 설치할 때,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Download the Windows Driver Kit (WDK) ; <a target='tab' href='https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk'>https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk</a> </pre> <br /> 다음과 같은 오류가 발생한다면,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Warning: A compatible Windows SDK for Desktop not found Setup has detected that Windows Software Development Kit (SDK) compatible with this version of the Windows Driver Kit (WDK) is not installed. The WDK requires the Windows SDK for Desktop with the same version number in order to develop and build drivers. Please visit the Windows SDK Download page to get and install the corresponding SDK version. If you want to install the WDK without installing the Windows SDK, please click Next. </pre> <br /> 동일한 버전의 SDK를 설치하지 않아서입니다. 새롭게 SDK를 설치하면 되는데,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > The Windows 10 SDK (10.0.19041.0) for Windows 10 ; <a target='tab' href='https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk/'>https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk/</a> ; <a target='tab' href='https://go.microsoft.com/fwlink/p/?linkid=2120735'>https://go.microsoft.com/fwlink/p/?linkid=2120735</a> </pre> <br /> 재미있는 것은 (2020-08-15일 기준) Visual Studio와 통합해 주는 VSIX 도구가 여전히 이전 버전(10.0.17763.1322, 10.0.18362.1)의 의존성을 갖는다는 것입니다. 따라서 기존 버전을 삭제하고 싶다면 WDK 설치 단계의 VSIX까지 완료한 다음에 하는 것이 좋습니다. (미리 삭제했더니, VSIX가 기존 SDK 버전을 새롭게 다운로드해 실행했습니다. ^^;)<br /> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
3965
(왼쪽의 숫자를 입력해야 합니다.)