我只有一个C++文件,我改成C后问题跟多了,如下:
1>1>Compiling - inline_obopenobjectbypointer.c for i386
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(284) : error C2275: 'NTSTATUS' : illegal use of this type as an expression
1>c:\winddk\2600\inc\wxp\ntdef.h(557) : error see declaration of 'NTSTATUS'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(284) : error C2146: syntax error : missing ';' before identifier 'ntStatus'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(284) : error C2144: syntax error : '' should be preceded by ''
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(284) : error C2144: syntax error : '' should be preceded by ''
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(284) : error C2143: syntax error : missing ';' before 'identifier'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(284) : error C2065: 'ntStatus' : undeclared identifier
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(285) : error C2143: syntax error : missing ';' before 'type'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(286) : error C2275: 'ULONG' : illegal use of this type as an expression
1>c:\winddk\2600\inc\wxp\ntdef.h(411) : error see declaration of 'ULONG'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(286) : error C2146: syntax error : missing ';' before identifier 'cbBuffer'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(286) : error C2144: syntax error : '' should be preceded by ''
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(286) : error C2144: syntax error : '' should be preceded by ''
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(286) : error C2143: syntax error : missing ';' before 'identifier'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(286) : error C2065: 'cbBuffer' : undeclared identifier
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(287) : error C2275: 'PSYSTEM_PROCESS_INFORMATION' : illegal use of this type as an expression
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.h(153) : error see declaration of 'PSYSTEM_PROCESS_INFORMATION'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(287) : error C2146: syntax error : missing ';' before identifier 'pInfo'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(287) : error C2144: syntax error : '' should be preceded by ''
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(287) : error C2144: syntax error : '' should be preceded by ''
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(287) : error C2143: syntax error : missing ';' before 'identifier'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(287) : error C2065: 'pInfo' : undeclared identifier
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(288) : error C2143: syntax error : missing ';' before 'type'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(290) : error C2065: 'pBuffer' : undeclared identifier
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(290) : error C4047: '=' : 'int' differs in levels of indirection from 'PVOID'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(291) : error C4047: '==' : 'int' differs in levels of indirection from 'void *'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(295) : error C4022: 'ZwQuerySystemInformation' : pointer mismatch for actual parameter 2
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(299) : error C4022: 'ExFreePoolWithTag' : pointer mismatch for actual parameter 1
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(303) : error C4047: '=' : 'int' differs in levels of indirection from 'PSYSTEM_PROCESS_INFORMATION'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(306) : error C2223: left of '->ProcessName' must point to struct/union
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(310) : error C2065: 'ProcessName' : undeclared identifier
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(310) : error C4047: 'function' : 'char *' differs in levels of indirection from 'int'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(312) : error C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(314) : error C2223: left of '->ProcessId' must point to struct/union
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(315) : error C2223: left of '->ProcessId' must point to struct/union
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(319) : error C2223: left of '->NextEntryDelta' must point to struct/union
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(322) : error C2223: left of '->NextEntryDelta' must point to struct/union
1>d:\projects\inline_obopenobjectbypointer\inline_obopenobjectbypointer\inline_obopenobjectbypointer.c(324) : error C4022: 'ExFreePoolWithTag' : pointer mismatch for actual parameter 1
1>BUILD: Compile errors: not linking d:\projects\inline~1\inline~1 directory
1>BUILD: Done
1> 2 files compiled - 38 Errors
1>DDKBLD: ================ Build warnings =======================
1>d:\projects\Inline_ObOpenObjectByPointer\Inline_ObOpenObjectByPointer\Inline_ObOpenObjectByPointer.c(284) : error C2275: 'NTSTATUS' : illegal use of this type as an expression
1>d:\projects\Inline_ObOpenObjectByPointer\Inline_ObOpenObjectByPointer\Inline_ObOpenObjectByPointer.c(284) : error C2146: syntax error : missing ';' before identifier 'ntStatus'
1>d:\projects\Inline_ObOpenObjectByPointer\Inline_ObOpenObjectByPointer\Inline_ObOpenObjectByPointer.c(284) : error C2144: syntax error : '' should be preceded by ''
1>d:\projects\Inline_ObOpenObjectByPointer\Inline_ObOpenObjectByPointer\Inline_ObOpenObjectByPointer.c(284) : error C2144: syntax error : '' should be preceded by ''
1>d:\projects\Inline_ObOpenObjectByPointer\Inline_ObOpenObjectByPointer\Inline_ObOpenObjectByPointer.c(284) : error C2143: syntax error : missing ';' before 'identifier'