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.
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.