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

# SHCreateDirectory(3w)

## NAME

**SHCreateDirectory** (SHELL32.165)

## SYNOPSIS

DWORD SHCreateDirectory\
  (\
   HWND    *hWnd*,\
   LPCVOID *path*\
  )

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

## RETURNS

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

## NOTES

exported by ordinal Win9x exports **ANSI** WinNT/2000 exports Unicode

## IMPLEMENTATION

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

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

Debug channel **"shell"**.
