From: Odomae on 13 Dec 2009 12:55 Given a normalized name like \Device\HarddiskVolume1\Documents and Settings\My Documents\test.txt, how do I get the DOS path name like C:\Documents and Settings\My Documents\test.txt?
From: Kerem Gümrükcü on 13 Dec 2009 22:13 Hi Odomae, [QueryDosDevice Function] http://msdn.microsoft.com/en-us/library/aa365461(VS.85).aspx Thats good enough, but when you go deeper, then you are going to use these: NtOpenDirectoryObject NtQueryDirectoryObject NtOpenSymbolicLinkObject NtQuerySymbolicLinkObject NtClose Hope this helps,... Regards Kerem -- ----------------------- Beste Grüsse / Best regards / Votre bien devoue Kerem Gümrükcü Latest Project: http://www.pro-it-education.de/software/deviceremover Latest Open-Source Projects: http://entwicklung.junetz.de ----------------------- "Odomae" <Odomae(a)discussions.microsoft.com> schrieb im Newsbeitrag news:F755018D-9F32-4720-BFAD-5C33FF705736(a)microsoft.com... > Given a normalized name like \Device\HarddiskVolume1\Documents and > Settings\My Documents\test.txt, how do I get the DOS path name like > C:\Documents and Settings\My Documents\test.txt?
From: Maxim S. Shatskih on 13 Dec 2009 23:08 > Given a normalized name like \Device\HarddiskVolume1\Documents and > Settings\My Documents\test.txt, how do I get the DOS path name like > C:\Documents and Settings\My Documents\test.txt? FltParseFileNameInformation will crack the normalized name to "\Device\HarddiskVolume1" and "\Documents and Settings\My Documents\test.txt". As about the drive letter - I would never use them in kernel mode at all. Convert the drive letters to kernel device names in user mode using QueryDosDevice. Also, you can try using IoVolumeDeviceToDosName - convert \Device\HarddiskVolume1 to the device object pointer and then call IoVolumeDeviceToDosName. -- Maxim S. Shatskih Windows DDK MVP maxim(a)storagecraft.com http://www.storagecraft.com
|
Pages: 1 Prev: Windows media center auto service with PBDA driver Next: Wince 5.0 Sdio |