Group: File Management - Library: kernel32
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.
BOOL CreateDirectory(
LPCTSTR lpPathName, // directory name
LPSECURITY_ATTRIBUTES lpSecurityAttributes // SD
);
DECLARE INTEGER CreateDirectory IN kernel32;
STRING lpPathName,;
INTEGER lpSecurityAttributes
lpPathName [in] Pointer to a null-terminated string that specifies the path of the directory to be created
lpSecurityAttributes Windows NT/2000: [in] Pointer to a SECURITY_ATTRIBUTES structure. The lpSecurityDescriptor member of the structure specifies a security descriptor for the new directory. If lpSecurityAttributes is NULL, the directory gets a default security descriptor. The target file system must support security on files and directories for this parameter to have an effect.
If the function succeeds, the return value is nonzero
If one or more intermediate directories do not exist, no directory is created (error code 3). To create all intermediate directories on the path, use the SHCreateDirectory function.
See also: SHCreateDirectory.