Re: Problem of calling named NT device in user-mode
- From: Tim Roberts <timr@xxxxxxxxx>
- Date: Tue, 03 Jul 2007 20:57:32 -0700
"Fudan Boy" <asfa> wrote:
I am creating a trivial driver to experience the feature of user-mode
calling kernel mode driver:
...
However, I always failed with error 53. If I change the device name to
\\Device\\UserCallKernel, I will get error 3.
By using winobj, I can see my device name "UserCallKernel" under the
"Device" node.
Questions:
1. How to get this work without using symbolic link?
You can't. The \Device namespace can only be used from kernel-mode.
User-mode aliases exist in \DosDevices (also called \?? in kernel mode, or
\\. in user mode).
2. What is the difference between "\\\\" and "\\"
Maxim already summarized this. The name you would want in user mode is
\\.\YourDeviceName, but because backslashes have a special meaning in C,
you must write that as "\\\\.\\YourDeviceName".
You could also use "//./YourDeviceName", if you want.
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.
- Prev by Date: Re: Desktop Capture (Vista)
- Next by Date: Re: Is it OK to use a 32 bit machile to debug 64 bit?
- Previous by thread: Re: Problem of calling named NT device in user-mode
- Next by thread: Re: ZwMapViewOfSection returning a user mode address
- Index(es):
Relevant Pages
|