Device Link Name

Hi all, my driver after loading it call IoCreateSymbolicLink and receives the SymbolicLinkName and DeviceName chosen by the user, can i recreate the links with the new names?
I tried with IoDeleteSymbolicLink and IoCreateSymbolicLink but from user mode i can’t open the new link with CreateFile.
Thanks for help.

What exact string are you specifying? If you make the calls in the context of an app, iirc, it is made in the current session’s namespace, but that would still work…

d

Bent from my phone


From: xxxxx@libero.itmailto:xxxxx
Sent: ?8/?15/?2013 7:51 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Device Link Name

Hi all, my driver after loading it call IoCreateSymbolicLink and receives the SymbolicLinkName and DeviceName chosen by the user, can i recreate the links with the new names?
I tried with IoDeleteSymbolicLink and IoCreateSymbolicLink but from user mode i can’t open the new link with CreateFile.
Thanks for help.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

Thank you for answer.
the string is “\Device\MyDriver” and the functions are called in a DRIVER_DISPATCH routine
(all the functions called by the driver returns STATUS_SUCCESS) but from the process i still can’t communicate with the driver with new link)
I might be wrong sequence of calls…
form app: from driver:
OpenSCManagerA
OpenServiceA
IoCreateDevice
IoCreateSymbolicLink
CreateFile
DeviceIoControl
IoDeleteSymbolicLink
IoCreateSymbolicLink
CloseHandle
CreateFile //this fail