CreateDirectoryw not working properly

Hello Friends

I am using Unicode version of function CreateDirectoryW.

but I am in serious problem, by the behavior of CreateDirectoryW function.

Because this function get crashes sometimes and application get terminated.

I think OS is not recognizing the return value of the function.

I am trying CreateDirectoryEXW function also but I think the template directory

format(First parameter) I am not specifying properly and not getting MSDN help

for the same.
1. The maximum name of a directory CANNOT exceed MAX_PATH -12 characters, according to MSDN, even for CreateDirectoryW():
2. You MUST use FULL path of the directory and prepend "\\?\" in the first argument.
3. All parent directories must already exists.

See MSDN documentation:
http://msdn.microsoft.com/en-us/library/aa365247(v=VS.85).aspx
Last edited on
There is not issue of path name exceed. The function is creating the directory but as a result cause application to abnormal termination. I am calling this function in a thread. Is any thread issue present here.
post your code..
Topic archived. No new replies allowed.