jimstar
asked on
Normalize path name API
I'm trying to find an API to normalize a path passed as a parameter, for example:
c:\windows\system32\driver .sys --> \Device\HarddiskVolume2\wi ndows\syst em32\drive r.sys
\\server\path\file.ext --> \Device\LanmanRedirector\s erver\path \file.ext
Any pointers to a Win32 API to accomplish this would be very helpful.
c:\windows\system32\driver
\\server\path\file.ext --> \Device\LanmanRedirector\s
Any pointers to a Win32 API to accomplish this would be very helpful.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>Do you happen to know how Internal NT Device Names are assigned?
AFAIK the object manager assigns these upon boot. You can be sure that they (except for removable devices) do not change at runtime.
AFAIK the object manager assigns these upon boot. You can be sure that they (except for removable devices) do not change at runtime.
ASKER
Thanks, this is what really helped. I had been playing with QueryDosDevice but the docs on MSDN were not the best - the sample code cleared up everything.
Do you happen to know how Internal NT Device Names are assigned?
I'm wondering in what cases the \Device\HarddriveVolume2 would change... for example, whether it would change if another HDD were added, if Volume1 were deleted then perhaps Volume2 would change to be Volume1, etc etc.