Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > How do I convert this physical string into logical string?

Reply
Thread Tools Display Modes

How do I convert this physical string into logical string?

 
 
keandi
Guest
Posts: n/a

 
      10-30-2006
Hi.

I got my directory path by ObQueryNameString.
But the path is not logical.. like this:

>@??\Device\HarddiskVolume1\MyDir


Originally, the path is C:\MyDir.

Could I convert the string into "C:\MyDir"?

 
Reply With Quote
 
 
 
 
David J. Craig
Guest
Posts: n/a

 
      10-30-2006
Read about the Mount Manager.

"keandi" <> wrote in message
news: oups.com...
> Hi.
>
> I got my directory path by ObQueryNameString.
> But the path is not logical.. like this:
>
>>@??\Device\HarddiskVolume1\MyDir

>
> Originally, the path is C:\MyDir.
>
> Could I convert the string into "C:\MyDir"?
>



 
Reply With Quote
 
soviet_bloke@hotmail.com
Guest
Posts: n/a

 
      10-30-2006
>@??\Device\HarddiskVolume1\MyDir

> Could I convert the string into "C:\MyDir"?


Of course - this is what IoVolumeDeviceToDosName() and
RtlVolumeDeviceToDosName() are for.

Please check the NG thoroughly - as far as I remember, couple of
months ago I explained how to do things like that on some thread.....


Anton Bassov

keandi wrote:
> Hi.
>
> I got my directory path by ObQueryNameString.
> But the path is not logical.. like this:
>
> >@??\Device\HarddiskVolume1\MyDir

>
> Originally, the path is C:\MyDir.
>
> Could I convert the string into "C:\MyDir"?


 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      10-30-2006
> Of course - this is what IoVolumeDeviceToDosName() and
> RtlVolumeDeviceToDosName() are for.


I would suggest the OP to rethink the design to never ever use drive letters in
the kernel part, and use the volume GUIDs or even mountdev IDs instead.

The user part will do the necessary conversions from the UI-level drive letters
to the IDs, and then the user/kernel interface speaks in terms of IDs only.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation

http://www.storagecraft.com

 
Reply With Quote
 
Gianluca Varenni
Guest
Posts: n/a

 
      10-30-2006
Sorry for my ignorance but...

why using drive letters in the kernel is a no-no?

Have a nice day
GV

"Maxim S. Shatskih" <> wrote in message
news:O0h4rEF$...
>> Of course - this is what IoVolumeDeviceToDosName() and
>> RtlVolumeDeviceToDosName() are for.

>
> I would suggest the OP to rethink the design to never ever use drive
> letters in
> the kernel part, and use the volume GUIDs or even mountdev IDs instead.
>
> The user part will do the necessary conversions from the UI-level drive
> letters
> to the IDs, and then the user/kernel interface speaks in terms of IDs
> only.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
>
> http://www.storagecraft.com
>



 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      10-31-2006
> why using drive letters in the kernel is a no-no?

It is just more complex I think, and does not handle the directory mount
points.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation

http://www.storagecraft.com

 
Reply With Quote
 
soviet_bloke@hotmail.com
Guest
Posts: n/a

 
      10-31-2006
Maxim,

> I would suggest the OP to rethink the design to never ever use drive letters in
> the kernel part, and use the volume GUIDs or even mountdev IDs instead.


Well, probably the OP does not use it extensively, so that, for a quick
and simple solution
IoVolumeDeviceToDosName() should work just fine....

Anton Bassov

Maxim S. Shatskih wrote:
> > Of course - this is what IoVolumeDeviceToDosName() and
> > RtlVolumeDeviceToDosName() are for.

>
> I would suggest the OP to rethink the design to never ever use drive letters in
> the kernel part, and use the volume GUIDs or even mountdev IDs instead.
>
> The user part will do the necessary conversions from the UI-level drive letters
> to the IDs, and then the user/kernel interface speaks in terms of IDs only.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
>
> http://www.storagecraft.com


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"string STR_ERR_OS was not found in string table" demian Windows Vista Installation 1 03-30-2007 01:26 AM
String PRODUCT_NAME was not found in string table Extracampine Windows Vista General Discussion 3 02-12-2007 11:15 AM
Using std::string Lucas Pleß Windows Vista Drivers 10 06-23-2005 09:13 PM
CreateFile and String \\.\\ Skybuck Flying Windows Vista Drivers 5 01-20-2005 12:31 AM
version string Brian Stark Windows Vista Drivers 5 09-23-2003 07:41 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59