Re: What is the main difference between the symbolic link and "device object Name".

a symbolic link could point to any other named object. You can make
symbolic links to object directories (different from file-system
directories, though you could do those too), registry keys, device
objects, named events, etc… As Mat says, it’s just another way to
refer to an object which already has a name.

drivers use these for a few things. they make symbolic links in
\DosDevices so that Win32 apps can open the device using CreateFile.
They also use them to create “well-known names” which some older drivers
and applications look for. For example, the disk driver creates device
objects with names that contain an increasing count value so they will
never collide with another instance of the driver. This same driver
also attempts to create the well-known name
\Device\HarddiskN\PartitionM" for its device objects using symbolic
links.

one point of caution - a user-mode application can try to open your
device if it has a name, regardless of whether you create a symbolic
link in \DosDevices or not. Only the Win32 API looks in \DosDevices,
the NT API allows a user-mode app/service to open any named device,
though it needs to meet the requirements of the ACL on the device
object. Don’t think your device doesn’t have to worry about user-mode
opening it just because you didn’t make a symbolic link.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mathieu Routhier
Sent: Tuesday, June 17, 2003 5:49 AM
To: NT Developers Interest List
Subject: [ntdev] Re: What is the main difference between the symbolic
link and “device object Name”.

I think some clarification is necessary.

The majority of device objects will have a name (some will have it
auto-generated by PNP Manager). Be warned: a device may be unnamed.

A symbolic link is just like a file “shortcut”. It is an alias for
another device object. Also, if the symbolic link is created in the
\DosDevices path, it will be visible from user-mode.

A device which is unnamed cannot have a symbolic link on it because
IoCreateSymbolicLink() takes the device name as a parameter.

Mat

-----Original Message-----
From: Shiva Prasad T. S. [mailto:xxxxx@rassit.com]
Sent: Monday, June 16, 2003 11:47 PM
To: NT Developers Interest List
Subject: [ntdev] Re: What is the main difference between the symbolic
link and “device object Name”.

Symbolic Link is a representative of the object name , which can used in
user mode to get the handle for a particular driver with a device obj
name…

Shiva P

----- Original Message -----
From: “Govindaraju P”
To: “NT Developers Interest List”
Sent: Tuesday, June 17, 2003 9:12 AM
Subject: [ntdev] What is the main difference between the symbolic link
and “device object Name”.

Hi,
What is the main difference between the symbolic link and “device
object Name”.

is there any disadvantage of having a symbolic link.

Thanks
Govinda


You are currently subscribed to ntdev as: xxxxx@rassit.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information. If
the reader of this message is not the intended recipient, you are
notified that any dissemination, distribution or copy of this
communication is strictly Prohibited.If you have received this message
by error, please notify the sender immediately, return the original mail
to the sender and delete the message from your system.

THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information. If
the reader of this message is not the intended recipient, you are
notified that any dissemination, distribution or copy of this
communication is strictly Prohibited.If you have received this message
by error, please notify the sender immediately, return the original mail
to the sender and delete the message from your system.


You are currently subscribed to ntdev as: xxxxx@guillemot.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com