阅读:1593回复:2
PFILE_NAME_INFORMATION 出错!!!
各位大牛:帮看下
代码: PFILE_NAME_INFORMATION pfn; pfn=(PFILE_NAME_INFORMATION)ExAllocatePool( NonPagedPool,sizeof(FILE_NAME_INFORMATION)+255*sizeof(WCHAR)); if(pfn) { status=ZwQueryInformationFile(irpStack->FileObject, IoStatus,pfn, sizeof(FILE_NAME_INFORMATION) + 255 * sizeof(WCHAR), FileNameInformation); KdPrint(("%s",pfn->FileName)); ExFreePool(pfn); } 编译出错: Compiling - fmon.c for i386 fmon.c(235) : error C2275: 'PFILE_NAME_INFORMATION' : illegal use of this type a s an expression fmon.c(235) : error C2146: syntax error : missing ';' before identifier 'pfn' fmon.c(235) : error C2144: syntax error : '<Unknown>' should be preceded by '<Un known>' fmon.c(235) : error C2144: syntax error : '<Unknown>' should be preceded by '<Un known>' fmon.c(235) : error C2143: syntax error : missing ';' before 'identifier' fmon.c(235) : error C2065: 'pfn' : undeclared identifier fmon.c(236) : error C4047: '=' : 'int' differs in levels of indirection from 'PF ILE_NAME_INFORMATION' fmon.c(241) : error C4022: 'ZwQueryInformationFile' : pointer mismatch for actua l parameter 3 fmon.c(244) : error C2223: left of '->FileName' must point to struct/union fmon.c(245) : error C4022: 'ExFreePoolWithTag' : pointer mismatch for actual par ameter 1 BUILD: Compile errors: not linking d:\program\filehide\fh directory BUILD: Done |
|
沙发#
发布于:2008-07-07 21:51
#include "ntifs.h"
|
|
板凳#
发布于:2008-07-08 09:00
看下函数的用法先。
|
|
|