I've observed that when an open related to a network drive pass through
the file system, the format is as follows:
\K:\SERVER1\VOL1\DIRECT1\FILE1.XXX
(being K: the drive mapped as SERVER1\VOL1)
In order to open it from my driver, using ZwCreateFile, I've used the
following formats:
\DosDevices\K:\SERVER1\VOL1\DIRECT1\FILE1.XXX
\DosDevices\\K:\SERVER1\VOL1\DIRECT1\FILE1.XXX
\DosDevices\K:\DIRECT1\FILE1.XXX
\\SERVER1\VOL1\DIRECT1\FILE.XXX
\K:\SERVER1\VOL1\DIRECT1\FILE1.XXX
The error in eqch case is different, in the first case it is:
NO_SUCH_USER (C0000064)
In the remaining cases it is:
INVALID_PATH
I suspect this could be due to a permisions related problem.
I load the driver dinamically from a Win32 standard application.
Should I open the driver in a different way ?
On the other hand, I've observed that not symbolic name exits for any
networked mapped drive. Why is it?.
Any help appreciated.
> I suspect this could be due to a permisions related problem.
> I load the driver dinamically from a Win32 standard application.
> Should I open the driver in a different way ?
You must to impersonate your thread that call ZwCreateFile (undocumented)
..
or simple create service that will call your driver and
your driver will use this service security context and
not system context (as in System or working threads)
--
Roman Rutman
First software package to provide on the fly encryption for Windows NT
http://softwinter.bitbucket.co.il/shade.html
rom...@mailhost.net
Return address altered to avoid automated collection for junk email
[snip]
Without using the mapped drive letter K:, it is
\??\UNC\SERVER1\SHARE1\PATH1\FILE1
Hope that helps.
Gregor Glawitsch | Tel: ++43 (0)732 655 755 - 33
Utimaco Safe Concept GmbH | Fax: ++43 (0)732 655 755 - 5
Europaplatz 6 | email (office): Gregor.G...@utimaco.co.at
A-4020 Linz, Austria | email (home) : Gregor.G...@magnet.at
Gregor Glawitsch <gregor.g...@utimaco.co.at> явткхвпр ю хжвжыб
<5fe6qt$15...@alijku04.edvz.uni-linz.ac.at>...
> In article <5f9q35$mcm$1...@lince.lander.es>, Ignacio Castillo Arteta
<cast...@lander.es> says:
> >Wich is the best way to use ZwCreateFile to open a file in a network
> >mapped drive ?.
>
> Without using the mapped drive letter K:, it is
>
> \??\UNC\SERVER1\SHARE1\PATH1\FILE1
>
or you can use
\Device\mup\server\share\path\file
--
Sincerely,
Alex
-----------------------------------------------------
E-mail: t...@crec.mipt.ru, http://www.crec.mipt.ru/~tor