---
name: "SHCreateDirectoryExA"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/SHCreateDirectoryExA"
---

# SHCreateDirectoryExA(3w)

## NAME

**SHCreateDirectoryExA** (SHELL32.@)

## SYNOPSIS

int SHCreateDirectoryExA\
  (\
   HWND                  *hWnd*,\
   LPCSTR                *path*,\
   LPSECURITY\_ATTRIBUTES *sec*\
  )

## DESCRIPTION

This function creates a file system folder whose fully qualified *path* is given by *path*. If one or more of the intermediate folders do not exist, they will be created as well.

## PARAMS

*hWnd* **\[In\]**  **.**

*path* **\[In\]**  *path* of directory to create.

*sec* **\[In\]**  security attributes to use or **NULL**.

## RETURNS

**ERROR\_SUCCESS** or one of the following values: **ERROR\_BAD\_PATHNAME** or **ERROR\_PATH\_NOT\_FOUND** if the *path* is relative **ERROR\_INVALID\_NAME** if the *path* contains invalid chars **ERROR\_FILE\_EXISTS** when a file with that name exists **ERROR\_ALREADY\_EXISTS** when the directory already exists **ERROR\_FILENAME\_EXCED\_RANGE** if the filename was to long to process.

**FIXME:** Not implemented yet; SHCreateDirectoryEx also verifies that the files in the directory will be visible if the *path* is a network *path* to deal with network drivers which might have a limited but unknown maximum *path* length. If not:

If *hWnd* is set to a valid window handle, a message box is displayed warning the user that the files may not be accessible. If the user chooses not to proceed, the function returns **ERROR\_CANCELLED**.

If *hWnd* is set to **NULL**, no user interface is displayed and the function returns **ERROR\_CANCELLED**.

## IMPLEMENTATION

Declared in **"shlobj.h"**.

Implemented in **"dlls/shell32/shlfileop.c"**.

Debug channel **"shell"**.
