Full path name  
Author Message
Mannequin666





PostPosted: Visual C++ General, Full path name Top

I need to get full path of file which is will be user independent and computer independet. I already solved problem with computer independent path by using WNetGetUniversalName which returns UNC path. So mapped disks drives are nomore terrible.
The problem appears with virtual drives on my local PC. I created virtual drive V:\ with subst command. And now when i get path of file i get: V:\temp.txt No i need to unwrap virtual drive to "C:\MyStuff\Projects\temp.txt".

The question is: Is there any function similar to WNetGetUniversalName which will do this whole work for me and returns me path without virtual drives

Thanks in advance for any help



Visual C++3  
 
 
Viorel.





PostPosted: Visual C++ General, Full path name Top

Maybe QueryDosDevice can help you

TCHAR path[MAX_PATH];

QueryDosDevice(_T("V:"), path, MAX_PATH);

For more information, see http://msdn.microsoft.com/library/en-us/fileio/fs/querydosdevice.asp frame=true.