The CreateDirectory function creates a new directory. If the underlying file system supports security on files and directories, the function applies a specified security descriptor to the new directory.
To specify a template directory, use the CreateDirectoryEx function.