但是如果把NTSTATUS st这一行的注释符去掉,就会报错。
错误信息是这样的
c:\DDK\test\Test.c(18) : error C2275: 'NTSTATUS' : illegal use of this type as an expression
c:\DDK\inc\wxp\ntdef.h(560) : see declaration of 'NTSTATUS'
c:\DDK\test\Test.c(18) : error C2146: syntax error : missing ';' before identifier 'st'
c:\DDK\test\Test.c(18) : error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>'
c:\DDK\test\Test.c(18) : error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>'
c:\DDK\test\Test.c(18) : error C2143: syntax error : missing ';' before 'identifier'
c:\DDK\test\Test.c(18) : error C2065: 'st' : undeclared identifier
如果把UNICODE_STRING spath;这一行的注释符也去掉的话,错误又变成了
c:\DDK\test\Test.c(17) : error C2275: 'UNICODE_STRING' : illegal use of this type as an expression
c:\DDK\inc\wxp\ntdef.h(1095) : see declaration of 'UNICODE_STRING'
c:\DDK\test\Test.c(17) : error C2146: syntax error : missing ';' before identifier 'spath'
c:\DDK\test\Test.c(17) : error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>'
c:\DDK\test\Test.c(17) : error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>'
c:\DDK\test\Test.c(17) : error C2143: syntax error : missing ';' before 'identifier'
c:\DDK\test\Test.c(17) : error C2065: 'spath' : undeclared identifier