---
name: "_getdcwd"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.0.1-3.1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/_getdcwd"
---

# \_getdcwd(3w)

## NAME

**\_getdcwd** (MSVCRT.@)

## SYNOPSIS

char\* CDECL  \_getdcwd\
  (\
   int   *drive*,\
   char\* *buf*,\
   int   *size*\
  )

## DESCRIPTION

Get the current working directory on a given disk.

## PARAMS

*drive* **\[In\]**  Drive letter to get the current working directory from.

*buf* **\[Out\]**  Destination for the current working directory.

*size* **\[In\]**  Length of *drive* in characters.

## RETURNS

**Success:** If *drive* is **NULL**, returns an allocated string containing the path. Otherwise populates *drive* with the path and returns it.

**Failure:** **NULL**. errno indicates the error.

## IMPLEMENTATION

Not defined in a Wine header. The function is either undocumented, or missing from Wine.

Implemented in **"dlls/msvcrt/dir.c"**.

Debug channel **"msvcrt"**.
