file i/o in drivers

My driver opens a config file in the form

??\drive:\dir.…

That is, it prepends ??\ to the drive letter. Now if I want to open network drives that are not mapped to a drive letter, is this ??\ prefix still needed?

thanks,

I wrote a product that did it like this:

\Device\Mup<machine name><share><path>

example:
\Device\Mup\MYSERVER\C$\temp\myfile.txt

Note that when you try to open a file on another machine, if the thread that you’re running in is in the context of the system process, the remote machine won’t let you do it. The thread has to have the context of a user that has the right to actually access that file…

Can InitializeObjectAttributes provide the rights to open a file on a remote machine?

No, you have to do the open and the I/O in the context of a process with a
user not system.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

wrote in message news:xxxxx@ntdev…
> Can InitializeObjectAttributes provide the rights to open a file on a
> remote machine?
>
>
> Information from ESET NOD32 Antivirus, version of virus
> signature database 4601 (20091112)

>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>

Information from ESET NOD32 Antivirus, version of virus signature database 4601 (20091112)

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com