阅读:1799回复:7
内核中读写文件的例子谁有?
通过zwcreatefile zwreadfile zwwritefile实现的读写文件的例子。
谢谢 |
|
最新喜欢:![]() |
沙发#
发布于:2005-06-09 13:10
错误码C000003A 是STATUS_OBJECT_PATH_NOT_FOUND,是不是在调用ZwCreateFile前调用InitializeObjectAttributes的时候,没有指定OBJ_CASE_INSENSITIVE 导致找不到文件或者路径
|
|
板凳#
发布于:2005-06-09 11:20
\\??\\表示dosDevice
一般这下面的都是符号链接 |
|
|
地板#
发布于:2005-06-08 09:46
为什么路径是类似这样的? 看我在你那个帖子的回复,??代表GLOBAL全局名称空间 |
|
|
地下室#
发布于:2005-06-07 22:41
\"\\??\" is related to Windows Named Object. Windows access its resources by named objects through Object Manager.. Object names are kept in a directory format. The directory \"\\??\" is for MS-DOS device names. It\'s symbolic link name is \"\\DosDevices\". You can also try to use this symbolic link. The book \"Microsoft Windows Internals\" has a very good chapter about it.
The error C000003A means file name is not correct. Maybe your ObjectAttribute is not constructed correctly. Here\'s a sample to construct it: OBJECT_ATTRIBUTES ObjAttrs; UNICODE_STRING Name; RtlInitUnicodeString(&Name, L\"\\\\??\\\\C:\\\\tmp\\\\parallel.log\"); InitializeObjectAttributes(&ObjAttrs, &Name, OBJ_CASE_INSENSITIVE, NULL, NULL); Also like the guy above said you have to be careful where you call ZwCreateFile(). It can only be called under PASSIVE_LEVEL. [编辑 - 6/7/05 by michaelgz] |
|
5楼#
发布于:2005-06-07 20:39
你在什么地方调用的这些函数,这个比较关键,否则不好回答.
|
|
6楼#
发布于:2005-06-07 20:20
我也想知道,
哈哈哈我问了数天都没人知道, |
|
7楼#
发布于:2005-06-07 18:45
为什么路径是类似这样的?
#define DEFAULT_LOG_FILE_NAME L\"\\\\??\\\\C:\\\\tmp\\\\parallel.log\" \\\\??\\\\是什么意思?要求的格式? 我zwcreatefile之后返回的status是c000003a, 大家帮我分析一下 [编辑 - 6/7/05 by zhjie374] |
|