2012-01-28 2 views
3

Windows 드라이버 키트에서 Visual Studio 2010으로의 헤더를 포함하여 약간의 문제가 있습니다. 제가 도와 드린 사람이 있습니까?(DDK 헤더 포함)

C1083과 같은 오류 메시지가 나타납니다. 포함 파일을 열 수 없습니다 : 'sal.h': 해당 파일이나 디렉토리가 없습니다. SDK 디렉토리를 포함하면 형식 재정의와 같은 오류 메시지가 표시됩니다. sal.h를 DDK 디렉토리에 복사하면 오류 메시지 C1083이 표시됩니다. 'include can not open file :'codeanalysis \ sourceannotations.h ': 해당 파일이나 디렉토리가 없습니다. 내가 DDK 디렉토리에 sourceannotations.h 파일을 복사하는 경우 내가 얻을 다른 오류 메시지 (아래 참조)

VC++ Directoy 설정 : 당신은 캔트 '로부터 사람과 함께 SDK의 헤더를 혼합 include directory settings

#include "stdafx.h" 


#include <Winsock2.h> 
#include <windows.h> 
#include <stdio.h> 
#include <conio.h> 
#include <strsafe.h> 
#include <fwpmu.h> 
#include <ndis.h> 

Error 1 error C1083: Cannot open include file: 'codeanalysis\sourceannotations.h': No such file or directory c:\winddk\7600.16385.1\inc\crt\sal.h 160 1 wfp 
2 IntelliSense: cannot open source file "codeanalysis\sourceannotations.h" c:\winddk\7600.16385.1\inc\crt\sal.h 160 1 
21 IntelliSense: cannot overload functions distinguished by return type alone c:\winddk\7600.16385.1\inc\ddk\ntddk.h 2895 1 
22 IntelliSense: cannot overload functions distinguished by return type alone c:\winddk\7600.16385.1\inc\ddk\ntddk.h 2907 1 
23 IntelliSense: cannot overload functions distinguished by return type alone c:\winddk\7600.16385.1\inc\ddk\ntddk.h 2917 1 
8 IntelliSense: expected a ')' c:\winddk\7600.16385.1\inc\api\fwptypes.h 345 49 
6 IntelliSense: expected a ';' c:\winddk\7600.16385.1\inc\api\fwptypes.h 281 4 
9 IntelliSense: expected a ';' c:\winddk\7600.16385.1\inc\api\fwptypes.h 364 1 
11 IntelliSense: expected a ';' c:\winddk\7600.16385.1\inc\api\iketypes.h 370 1 
16 IntelliSense: expected a ';' c:\winddk\7600.16385.1\inc\ddk\wdm.h 8838 1 
25 IntelliSense: expected a declaration c:\winddk\7600.16385.1\inc\ddk\ntddk.h 15056 5 
4 IntelliSense: expected a type specifier c:\winddk\7600.16385.1\inc\api\fwptypes.h 275 18 
3 IntelliSense: expected an identifier c:\winddk\7600.16385.1\inc\api\fwptypes.h 275 5 
7 IntelliSense: expected an identifier c:\winddk\7600.16385.1\inc\api\fwptypes.h 345 5 
10 IntelliSense: expected an identifier c:\winddk\7600.16385.1\inc\api\iketypes.h 369 2 
18 IntelliSense: expected an identifier c:\winddk\7600.16385.1\inc\ddk\wdm.h 17964 1 
19 IntelliSense: expected an identifier c:\winddk\7600.16385.1\inc\ddk\wdm.h 17970 9 
24 IntelliSense: expected an identifier c:\winddk\7600.16385.1\inc\ddk\ntddk.h 15037 3 
14 IntelliSense: identifier "FWP_FILTER_ENUM_TYPE" is undefined c:\winddk\7600.16385.1\inc\api\fwpmtypes.h 413 5 
12 IntelliSense: identifier "IKEEXT_IP_VERSION_SPECIFIC_KEYMODULE_STATISTICS0" is undefined c:\winddk\7600.16385.1\inc\api\iketypes.h 418 5 
13 IntelliSense: identifier "IKEEXT_IP_VERSION_SPECIFIC_KEYMODULE_STATISTICS0" is undefined c:\winddk\7600.16385.1\inc\api\iketypes.h 419 5 
20 IntelliSense: identifier "PCALLBACK_FUNCTION" is undefined c:\winddk\7600.16385.1\inc\ddk\wdm.h 17994 10 
17 IntelliSense: identifier "TIME_FIELDS" is undefined c:\winddk\7600.16385.1\inc\ddk\wdm.h 9012 9 
15 IntelliSense: this declaration has no storage class or type specifier c:\winddk\7600.16385.1\inc\ddk\wdm.h 8837 1 
5 IntelliSense: unexpected parenthesis after declaration of function "<error>" (malformed parameter list or invalid initializer?) c:\winddk\7600.16385.1\inc\api\fwptypes.h 278 4 
+0

포함 순서를 변경 했습니까? windows.h 상단 및 "stdafx.h"마지막? –

+0

stdafx.h를 위에 올려 놓지 않으면 흥미로운 효과가 있습니다. –

+0

@Niklas Hansson 해결책이 아닙니다 – Matt

답변

3

DDK.

상위 설정을 상속하는 확인란의 선택을 취소하십시오. DDK에서 다른 디렉토리를 추가해야 할 수도 있습니다.

또한 DDK의 라이브러리와 SDK의 라이브러리를 함께 사용할 수 없습니다. 그래서 당신은 거의 똑같이해야합니다.