阅读:1160回复:1
zwcreatefile,zwreadfile
代码如下:
RtlInitUnicodeString( &namestring, L\"\\\\??\\\\D:\\\\thesis.zip\"); InitializeObjectAttributes(&objectattributes, &namestring, OBJ_CASE_INSENSITIVE, NULL, NULL); status=ZwCreateFile( &filehandle, SYNCHRONIZE|FILE_ANY_ACCESS, &objectattributes, &iostatus, NULL, FILE_ATTRIBUTE_NORMAL, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 ); dataofst.QuadPart=0; if(NT_SUCCESS(status)) { if(KeGetCurrentIrql()<DISPATCH_LEVEL) //分批读文件 ////////////////////////////////// ////////////////////////////////// {do{ status=ZwReadFile( &filehandle, NULL, NULL, NULL, &iostatus, databuffer, DATABUFFER_SIZE, &dataofst, NULL); dataofst.QuadPart+=DATABUFFER_SIZE; if(!NT_SUCCESS(status)) DbgPrint(\"error %L\",status); }while(NT_SUCCESS(status)); } } 用softice跟踪,filehandle有的,0x000001c4;但数据一次都读不到 是什么问题啊?救命啊!都4天了! :mad: :( 还有一个小问题,就是,dbgprint的输出值在哪里看啊???? |
|
沙发#
发布于:2002-10-25 08:45
怎么又发两个啊?!
|
|
|