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

# StgCreateDocfile(3w)

## NAME

**StgCreateDocfile** (OLE32.@)

## SYNOPSIS

HRESULT StgCreateDocfile\
  (\
   LPCOLESTR  *pwcsName*,\
   DWORD      *grfMode*,\
   DWORD      *reserved*,\
   IStorage\*\* *ppstgOpen*\
  )

## DESCRIPTION

Creates a new compound file storage object.

## PARAMS

*pwcsName* **\[ I\]**  Unicode string with filename (can be relative or **NULL**)

*grfMode* **\[ I\]**  Access mode for opening the new storage object (see **STGM\_** constants)

*reserved* **\[ ?\]**  unused?, usually **0**

*ppstgOpen* **\[IO\]**  A pointer to IStorage pointer to the new onject.

## RETURNS

**S\_OK** if the file was successfully created some **STG\_E\_** value if error.

## NOTES

if *pwcsName* is **NULL**, create file with new unique name the function can returns **STG\_S\_CONVERTED** if the specified file was successfully converted to storage format (unrealized now)

## IMPLEMENTATION

Declared in **"objbase.h"**.

Implemented in **"dlls/ole32/storage32.c"**.

Debug channel **"storage"**.
