Syntax
_In_ LPCTSTR lpPathName,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
Creates a new directory.
| Parameter | Description |
|---|---|
lpPathName |
The path of the directory to be created. This string must specify the root and one or more directory names. Example: "C:\Temp\NewDir" The path can be a relative or absolute path. |
lpSecurityAttributes |
A pointer to a The |
| Value | Description |
|---|---|
TRUE |
The directory was created successfully. |
FALSE |
The function failed. To get extended error information, call GetLastError. |
If the directory already exists, the function succeeds and returns a nonzero value.
If the trailing backslash (\) is omitted from the specified path, the function fails and returns FALSE.
The function creates all intermediate directories in the specified path if they do not exist.
CreateDirectoryW and CreateDirectoryA respectively. The generic CreateDirectory uses the default system code page.
| Header | File |
|---|---|
Windows.h |
winbase.h |