how to change to filename format???

> hi,

How to Translate the filename’s format from

“device\HarddiskVolum1\abc.txt” to
user-mode format “c:\abc.txt” ,and vice versa.

???

It is usefull for me ,I use EXE comunicate with driver,the filename in
usermode is different from in the kernel mode,I use ObQueryNameString get
filename ,but i do not know how to translate it to user-mode format,except
build an IRP and Send ,is there some simple method??

thank you

ildee

It isn’t possible to do this in any reliable fashion. There are
heuristic approaches for converting device object’s to DOS-visible
names, but they may not work properly in all circumstances - and thus
are not adequate for a product solution.

For the heuristics, look at RtlVolumeDeviceToDosName and
IoVolumeDeviceToDosName in the IFS Kit.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of ildee263
Sent: Monday, November 15, 2004 8:40 PM
To: ntfsd redirect
Subject: [ntfsd] how to change to filename format???

hi,

How to Translate the filename’s format from

“device\HarddiskVolum1\abc.txt” to
user-mode format “c:\abc.txt” ,and vice versa.

???

It is usefull for me ,I use EXE comunicate with driver,the filename in
usermode is different from in the kernel mode,I use ObQueryNameString
get
filename ,but i do not know how to translate it to user-mode
format,except
build an IRP and Send ,is there some simple method??

thank you

ildee


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to $subst(‘List.Name’) as:
$subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to $subst(‘Email.UnSub’)

Tony,

I use IoVolumeDeviceToDosName in IRP_MJ_CREATE as follow:

{
UNICODE_STRING DosNameString;
if(IoVolumeDeviceToDosName(IrpSp->FileObject->DeviceObject,&DosNameString) == STATUS_SUCCESS)
{
ExFreePool(DosNameString.Buffer);
}
}

but the system crushed,my system is XP.what’s the problem ?
I find old mails but not have a good solution for this.

thank you

ildee

----- Original Message -----
From: “Tony Mason”
To: “Windows File Systems Devs Interest List”
Sent: Tuesday, November 16, 2004 10:04 AM
Subject: RE: [ntfsd] how to change to filename format???

It isn’t possible to do this in any reliable fashion. There are
heuristic approaches for converting device object’s to DOS-visible
names, but they may not work properly in all circumstances - and thus
are not adequate for a product solution.

For the heuristics, look at RtlVolumeDeviceToDosName and
IoVolumeDeviceToDosName in the IFS Kit.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of ildee263
Sent: Monday, November 15, 2004 8:40 PM
To: ntfsd redirect
Subject: [ntfsd] how to change to filename format???

> hi,
>
> How to Translate the filename’s format from
>
> “device\HarddiskVolum1\abc.txt” to
> user-mode format “c:\abc.txt” ,and vice versa.
>
> ???
>
> It is usefull for me ,I use EXE comunicate with driver,the filename in
> usermode is different from in the kernel mode,I use ObQueryNameString
get
> filename ,but i do not know how to translate it to user-mode
format,except
> build an IRP and Send ,is there some simple method??
>
> thank you
>
>
> ildee
>
>

Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as:
ildee@263.net
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

I am not sure, but I think you have to prepare
buffer in UNICODE_STRING first.

Where the crash occurred ? In the IoVolumeToDos ?
Or in the ExFreePool ?

L.

L,
Thanks for your advice,but whether i prepare a buffer or not ,the blue screen also occur?
I work on XP,when windows start ,the blue screen appear(at that time Ctrl + D cant call softice to debug),
the blue screen message is

TERMINAL_SERVER_DRIVER_MADE_INCORRENT_REFERENCE,

STOP : 0x000000CF(0xBEAA0251,0,0xBEAA0251,2)
(address,read,address,reserved)
I am base on sfilter,what cause such boring error occur?And,how to solve it??

thank you

ildee

----- Original Message -----
From: “Ladislav Zezula”
To: “Windows File Systems Devs Interest List”
Sent: Tuesday, November 16, 2004 2:26 PM
Subject: Re: [ntfsd] how to change to filename format???

> I am not sure, but I think you have to prepare
> buffer in UNICODE_STRING first.
>
> Where the crash occurred ? In the IoVolumeToDos ?
> Or in the ExFreePool ?
>
> L.
>
> —
> Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@sagetech.com.cn
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Hm, I think you will have to debug.
Or at least create a crash dump and sent
the output from !analyze -v
(don’t forget to configure the proper symbols)

L.

Tony,
I found that,when I call IoVolumeDeviceToDosName or RtlVolumeDeviceToDosName in IRP_MJ_CREATE Before filesystem has loaded,windows will crash.
When all volumes were mounted,I call IoVolumeDeviceToDosName or RtlVolumeDeviceToDosName is ok,could you tell me how to judge the volumes had been mounted?that means when can i call IoVolumeDeviceToDosName or RtlVolumeDeviceToDosName ?

thank you

ildee

----- Original Message -----
From: “Tony Mason”
To: “Windows File Systems Devs Interest List”
Sent: Tuesday, November 16, 2004 10:04 AM
Subject: RE: [ntfsd] how to change to filename format???

It isn’t possible to do this in any reliable fashion. There are
heuristic approaches for converting device object’s to DOS-visible
names, but they may not work properly in all circumstances - and thus
are not adequate for a product solution.

For the heuristics, look at RtlVolumeDeviceToDosName and
IoVolumeDeviceToDosName in the IFS Kit.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of ildee263
Sent: Monday, November 15, 2004 8:40 PM
To: ntfsd redirect
Subject: [ntfsd] how to change to filename format???

> hi,
>
> How to Translate the filename’s format from
>
> “device\HarddiskVolum1\abc.txt” to
> user-mode format “c:\abc.txt” ,and vice versa.
>
> ???
>
> It is usefull for me ,I use EXE comunicate with driver,the filename in
> usermode is different from in the kernel mode,I use ObQueryNameString
get
> filename ,but i do not know how to translate it to user-mode
format,except
> build an IRP and Send ,is there some simple method??
>
> thank you
>
>
> ildee
>
>

Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as:
xxxxx@sagetech.com.cn
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Ildee,

If you will call the API while processing the post-create operation, if
the file was successfully opened, then you know the volume has mounted.
I would synchronize back to your create dispatch routine. If you don’t
know how to do this look at the sfilter and filespy samples in the
IFSKIT.

Note that these APIs require you to pass in the STORAGE STACK device
object, not the file system device object.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of ildee263
Sent: Wednesday, November 17, 2004 2:10 AM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] how to change to filename format???

Tony,
I found that,when I call IoVolumeDeviceToDosName or
RtlVolumeDeviceToDosName in IRP_MJ_CREATE Before filesystem has
loaded,windows will crash.
When all volumes were mounted,I call IoVolumeDeviceToDosName or
RtlVolumeDeviceToDosName is ok,could you tell me how to judge the
volumes had been mounted?that means when can i call
IoVolumeDeviceToDosName or RtlVolumeDeviceToDosName ?

thank you

ildee

----- Original Message -----
From: “Tony Mason”
To: “Windows File Systems Devs Interest List”
Sent: Tuesday, November 16, 2004 10:04 AM
Subject: RE: [ntfsd] how to change to filename format???

It isn’t possible to do this in any reliable fashion. There are
heuristic approaches for converting device object’s to DOS-visible
names, but they may not work properly in all circumstances - and thus
are not adequate for a product solution.

For the heuristics, look at RtlVolumeDeviceToDosName and
IoVolumeDeviceToDosName in the IFS Kit.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of ildee263
Sent: Monday, November 15, 2004 8:40 PM
To: ntfsd redirect
Subject: [ntfsd] how to change to filename format???

> hi,
>
> How to Translate the filename’s format from
>
> “device\HarddiskVolum1\abc.txt” to
> user-mode format “c:\abc.txt” ,and vice versa.
>
> ???
>
> It is usefull for me ,I use EXE comunicate with driver,the filename in
> usermode is different from in the kernel mode,I use ObQueryNameString
get
> filename ,but i do not know how to translate it to user-mode
format,except
> build an IRP and Send ,is there some simple method??
>
> thank you
>
>
> ildee
>
>

Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as:
xxxxx@sagetech.com.cn
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to $subst(‘List.Name’) as:
$subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to $subst(‘Email.UnSub’)