Convert Kernel Device Path to Regular Path (Just string parsing)
Posted on 2007-09-28
I call GetProcessImageFileName and it returns a string like:
"\Device\HarddiskVolume1\Program Files\Internet Explorer\iexplore.exe"
I need the regular path, so it should be c:\Program Files\..." etc.
I have a function that will call QueryDosDevice and convert "\Device\HarddiskVolume1" to "C:". However, my function won't accept the full path, just the "\Device\HarddiskVolume1" portion. My string is a LPTSTR, if someone could write something simple to conver this that would be great.
Also, I know about the GetModuleFileNathEx and it doesn't really work properly, so I need to use this method.