Local and Global MS-DOS Device Names

Hi folks,

The DDK documentation states:

“A driver that must create its MS-DOS device names in the global
\DosDevices directory can do so by creating its symbolic links in a
standard driver routine that is guaranteed to run in the system process
context, such as DriverEntry. ==> Alternatively, <== the global
\DosDevices directory is available as \DosDevices\Global; drivers can use
a name of the \DosDevices\Global\DosDeviceName to specify a name in the
global directory.”

As I read this, one should be able to field an IOCTL to create a device,
use IoCreateSymbolicLink using \DosDevices\Global\F: and have the name
appear in the global namespace. My expericence says otherwise…

It works fine from DriverEntry, but not from my IOCTL service routine. I
know I can use DefineDosDevice in the application, but I’d like to
understand what I’m missing.

-bob

Works for me the other way too, the IOCTL way.
Sincerely;
William Michael Jones “Mike”

wrote in message news:xxxxx@ntdev…
> Hi folks,
>
> The DDK documentation states:
>
> “A driver that must create its MS-DOS device names in the global
> \DosDevices directory can do so by creating its symbolic links in a
> standard driver routine that is guaranteed to run in the system process
> context, such as DriverEntry. ==> Alternatively, <== the global
> \DosDevices directory is available as \DosDevices\Global; drivers can use
> a name of the \DosDevices\Global\DosDeviceName to specify a name in the
> global directory.”
>
> As I read this, one should be able to field an IOCTL to create a device,
> use IoCreateSymbolicLink using \DosDevices\Global\F: and have the name
> appear in the global namespace. My expericence says otherwise…
>
> It works fine from DriverEntry, but not from my IOCTL service routine. I
> know I can use DefineDosDevice in the application, but I’d like to
> understand what I’m missing.
>
> -bob
>

Hi Mike,

What type of device are you mapping the symbolic link to? Is it a DISK?
Can you see the link via “My Computer”?

When I use IoCreateSymbolicLink in the IOCTL code, I see the link via
WINOBJ (in Global??), but not via “My Computer”… When I use
DefineDosDevice in the application, I see the link via “My Computer”, but
not via Winobj.

-bob

Works for me the other way too, the IOCTL way.
Sincerely;
William Michael Jones “Mike”

wrote in message news:xxxxx@ntdev…
>> Hi folks,
>>
>> The DDK documentation states:
>>
>> “A driver that must create its MS-DOS device names in the global
>> \DosDevices directory can do so by creating its symbolic links in a
>> standard driver routine that is guaranteed to run in the system process
>> context, such as DriverEntry. ==> Alternatively, <== the global
>> \DosDevices directory is available as \DosDevices\Global; drivers can
>> use
>> a name of the \DosDevices\Global\DosDeviceName to specify a name in the
>> global directory.”
>>
>> As I read this, one should be able to field an IOCTL to create a device,
>> use IoCreateSymbolicLink using \DosDevices\Global\F: and have the name
>> appear in the global namespace. My expericence says otherwise…
>>
>> It works fine from DriverEntry, but not from my IOCTL service routine.
>> I
>> know I can use DefineDosDevice in the application, but I’d like to
>> understand what I’m missing.
>>
>> -bob
>>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@dunstable.org
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

I am mapping the COM names as I am a MultiportSerial Driver. Note that the
COM names like
COM7 are mapped in the Global??. What shows in Device Manager are the
friendly names. Maybe this might help.

Mike Jones

wrote in message news:xxxxx@ntdev…
> Hi Mike,
>
> What type of device are you mapping the symbolic link to? Is it a DISK?
> Can you see the link via “My Computer”?
>
> When I use IoCreateSymbolicLink in the IOCTL code, I see the link via
> WINOBJ (in Global??), but not via “My Computer”… When I use
> DefineDosDevice in the application, I see the link via “My Computer”, but
> not via Winobj.
>
> -bob
>
>
> > Works for me the other way too, the IOCTL way.
> > Sincerely;
> > William Michael Jones “Mike”
> >
> > wrote in message news:xxxxx@ntdev…
> >> Hi folks,
> >>
> >> The DDK documentation states:
> >>
> >> “A driver that must create its MS-DOS device names in the global
> >> \DosDevices directory can do so by creating its symbolic links in a
> >> standard driver routine that is guaranteed to run in the system process
> >> context, such as DriverEntry. ==> Alternatively, <== the global
> >> \DosDevices directory is available as \DosDevices\Global; drivers can
> >> use
> >> a name of the \DosDevices\Global\DosDeviceName to specify a name in the
> >> global directory.”
> >>
> >> As I read this, one should be able to field an IOCTL to create a
device,
> >> use IoCreateSymbolicLink using \DosDevices\Global\F: and have the name
> >> appear in the global namespace. My expericence says otherwise…
> >>
> >> It works fine from DriverEntry, but not from my IOCTL service routine.
> >> I
> >> know I can use DefineDosDevice in the application, but I’d like to
> >> understand what I’m missing.
> >>
> >> -bob
> >>
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@dunstable.org
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>

Symbolic links probably work, try to open them directly (explorer f: or f: in command window). Visibility in exploder is different thing and it was discussed several times in the past, try to search archives. Basically, DefineDosDevice() sends a broadcast which informs exploder about new disk arrival and removal.

Symbolic links created in the driver IOCTL handler work well for me. Once created, app sends the broadcast to make exploder happy. However, I create session wide (local) drives this way and I’m not sure about global ones. Please note also DefineDosDevice() creates local drives until it is running in local system context.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of xxxxx@dunstable.org[SMTP:xxxxx@dunstable.org]
Reply To: Windows System Software Devs Interest List
Sent: Wednesday, October 05, 2005 9:46 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Local and Global MS-DOS Device Names

Hi Mike,

What type of device are you mapping the symbolic link to? Is it a DISK?
Can you see the link via “My Computer”?

When I use IoCreateSymbolicLink in the IOCTL code, I see the link via
WINOBJ (in Global??), but not via “My Computer”… When I use
DefineDosDevice in the application, I see the link via “My Computer”, but
not via Winobj.

-bob

> Works for me the other way too, the IOCTL way.
> Sincerely;
> William Michael Jones “Mike”
>
> wrote in message news:xxxxx@ntdev…
> >> Hi folks,
> >>
> >> The DDK documentation states:
> >>
> >> “A driver that must create its MS-DOS device names in the global
> >> \DosDevices directory can do so by creating its symbolic links in a
> >> standard driver routine that is guaranteed to run in the system process
> >> context, such as DriverEntry. ==> Alternatively, <== the global
> >> \DosDevices directory is available as \DosDevices\Global; drivers can
> >> use
> >> a name of the \DosDevices\Global\DosDeviceName to specify a name in the
> >> global directory.”
> >>
> >> As I read this, one should be able to field an IOCTL to create a device,
> >> use IoCreateSymbolicLink using \DosDevices\Global\F: and have the name
> >> appear in the global namespace. My expericence says otherwise…
> >>
> >> It works fine from DriverEntry, but not from my IOCTL service routine.
> >> I
> >> know I can use DefineDosDevice in the application, but I’d like to
> >> understand what I’m missing.
> >>
> >> -bob
> >>
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@dunstable.org
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@upek.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>