阅读:1163回复:3
UNICODE_STRING怎么用?
UNICODE_STRING FileName;
我想比较一下 if(filename=="d:\abc\test.txt") 怎么比较?谢谢 |
|
沙发#
发布于:2004-07-15 12:28
如果在PASSIVE_LEVEL级别,应该用这个
RtlCompareString(registryPath->Buffer,L("d:abctest.txt"),0); |
|
|
板凳#
发布于:2004-07-15 12:52
不行啊
我修改filespy 想在spycreate函数里判断如果是我要监视的文件就.... pIrpStack = IoGetCurrentIrpStackLocation(Irp); RtlCompareString(pIrpStack->FileObject->FileName.Buffer,L("d:\\back\\1.txt"),0); 编译在rtlcpmparestring这里出现错误 filespy.c(703) : error C2220: warning treated as error - no object file generated filespy.c(703) : error C4047: 'function' : 'const char *' differs in levels of indirection from 'unsigned short ** ' filespy.c(703) : error C4024: 'RtlInitString' : different types for formal and actual parameter 2 filespy.c(704) : error C4133: 'function' : incompatible types - from 'unsigned short *' to 'struct _STRING *' filespy.c(704) : error C4013: 'L' undefined; assuming extern returning int filespy.c(704) : error C4047: 'function' : 'struct _STRING *' differs in levels of indirection from 'int ' filespy.c(704) : error C4024: 'RtlCompareString' : different types for formal and actual parameter 2 |
|
地板#
发布于:2004-07-15 13:05
搞定了
不过挺土 UNICODE_STRING temp; RtlInitUnicodeString(&temp,L"d:\\back\\1.txt"); RtlCompareUnicodeString(&temp,&(pIrpStack->FileObject->FileName),TRUE); |
|