The other issue is that this is cached information; the usual fix is to
send a WM_DEVICECHANGE message (have fun finding an example - the easy
to find examples are what to do when you RECEIVE one, not when you send
one.) That message tells the recipient the drive map has changed so it
will refresh it.
We’ve had this problem for years over in file systems (where we
sometimes make drive letter just magically appear for pseudo file
systems.)
In general, this is one reason why folks recommend that you play with
the mount manager - it’s all tied into this sort of plumbing and it
“just happens” without any special interaction.
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Martin O’Brien
Sent: Thursday, September 07, 2006 7:33 PM
To: ntdev redirect
Subject: Re:[ntdev] STATUS_OBJECT_PATH_NOT_FOUND being returned from
WdfDeviceCreate…
JEREMY:
I can’t say that I really know the answer to this question. However,
as it is late and you might not hear from anyone else tonight, I think
that the basic problem is that their is both a local and global DOS
namespace. If you create define a dos device, whether in user or kernel
mode, in the context of the LocalSystem account/System process, then it
will be a member of the global namespace, and otherwise will end up in
the local. In user mode, unless you go out of your way, there is no
chance that you will happen to be running under LocalSystem; in the
kernel this is also the case if you define in response to an IOCTL. If,
however, you do the definition in DriverEntry or somewhere else that
runs in the System context, it will be global. In the kernel, you can
also specify explicitly by using “\DosDevices\Global” as the path.
I realize that this is not much of an answer, but I thought it might be
worth at least looking at until you can get some better ideas from
others. Although my work is entirely kernel mode, I pretty much never
get involved with actual devices, so I can’t be of much help here.
MM
>> xxxxx@telestream.net 2006-09-07 20:02 >>>
In my driver. By following Beverly’s advice and calling
WdfControlFinishInitializing CreateFile now succeeds.
It may be premature to ask this question (I still have a few more
things
to look at before I can honestly declare that I’ve checked everything)
but as long as I’m already submitting a post, I might as well…
In my user mode app, I call DefineDosDevice to map my device to ‘f:’
and
it succeeds. I then call CreateFile on ‘\.\f:’ and that succeeds.
Nothing shows up in explorer, though, and if I try to switch to the
‘f:’
drive at the command prompt I get a “The system cannot find the drive
specified” error. I thought that once I successfully called
DefineDosDevice, my virtual drive would show up?
Thanks,
–Jeremy
xxxxx@Microsoft.com wrote:
KMDF does nothing with the name other then pass it to
IoCreateDeviceSecurity. Perhaps IoCreateDeviceSecure has some
additional checks in it that cause this error to occur.
are you creating the symbolic link in your driver or in UM?
d
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer