Difference between PathAppend and PathCombine in Win32 API

I want to understand what is the difference between these functions and which of them should I use to work with paths?

For example: I want "C: \ Temp" + ".. \ Folder" = "C: \ Folder"

thanks

+6
c ++ winapi path
source share
2 answers

For this you need to use PathCombine .

Combines two lines that represent well-formed paths into one path; also combines any relative elements of the path.

PathAppend specifically prohibits relative path qualifiers according to MSN docs:

The path specified in pszPath cannot start with ".. \" or ". \" To produce a relative path string.

+3
source share

PathCanonicalize () may be worth mentioning if the strings are already concatenated.

+3
source share

All Articles