If you have a path like "C:\foo\.\bar\.." is there an easy way using the Win32 API to remove the directory qualifiers in order to simplify it to "C:\foo" ?
Update: It seems to be a more complicated issue. On this simple example of "C:\foo\.\bar\..", it works with both PathCanonicalize() and GetFullPathName() to get "C:\foo" as a result.
However, the path I'm passing has a symbolic link. So let's say I'm passing in "C:\NaNa\Boo\Bin\.." and "C:\NaNa" is a link to "D:\Apple". Then I get "C:\NaNa\Boo\Bin\.." back ratener than "C:\NaNa\Boo"
I would assume the functions work with just the strings but there seems to be a difference when using the symbolic link :-(
Update #2: It appears I had a line break character (0x0d) in the string that was passed in and this kept the function from working properly!
Take a look at shlwapi's PathCanonicalize()