Post by Tina
I create files based on SHCreateDirectory results, but when the pszPath
happens to be the root drive, the function fails (i.e. pszPath
parameter = "C:\" will fail but pszPath parameter = "C:\Files\Images"
will not). Is there a reason for this? Should I simply used a different
function if pszPath happens to be a root drive? Advice needed. Thanks.
This function creates a file system folder whose fully-qualified path is
given by pszPath. (MSDN)
The main reason seems to be that you don't specifiy something to be created.
Also, logically you *can't* create a root dir since there wouldn't be
anything to create it *in*.
If pszPath is the directory you want to create, first test if there is
anything to create. For a root dir, either pszPath is empty or it consists
of only a single backslash.