Tech Support > Microsoft Windows > Drivers > Rules for using symbolic link?
Rules for using symbolic link?
Posted by wilhelm.lundgren@gmail.com on July 12th, 2006


Hi,

I am having some problems i cant understand. In my driver, i have
registered an IOCTL that the application sends to the driver to change
the name of the symbolic the driverobject is connectet to. This all
works fine, and within the IOCTL handler in the driver i can delete and
create new symbolic links.

But when i try to delete the symbolic link in the unload routine, i
get:
STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034L)

This is wierd to me, since the names i am using right now are harcoded
UNICODE_STRING's. That is, its impossible that the names used in IOCTL
handler is different from the ones in unlink.

I have also checked the IRQL and its passive in both places.

Does anyone have a clue in whats going on? I am guessing it has
something to do with that i create the symbolic links in IOCTL handler,
cause if i create them in driverentry everything works fine in unload
routine. But more than that i dont know.

Cheers,

/Wille

Posted by Doron Holan [MS] on July 12th, 2006


most likely the issue is that when you create the symlink in an IOCTL
handler, you are manipulating the current session's object namespace. When
DriverUnload() is run, it runs in the system process which is most likely in
another session so the link does not appear in it. you can use !object to
traverse the namespace inthe debugger, see
http://blogs.msdn.com/doronh/archive...21/557387.aspx

you can manipulate the symlinks entirely in UM via DefineDosDevice w/out
going to the driver

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


<wilhelm.lundgren@gmail.com> wrote in message
news:1152684606.870356.35330@s13g2000cwa.googlegro ups.com...