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

# MSVCRT\_\_chdir(3w)

## NAME

**MSVCRT\_\_chdir** (MSVCRT.@)

## SYNOPSIS

int CDECL  MSVCRT\_\_chdir\
  (\
   const char\* *newdir*\
  )

## DESCRIPTION

Change the current working directory.

## PARAMS

*newdir* **\[In\]**  Directory to change to.

## RETURNS

**Success:** **0.** The current working directory is set to *newdir*.

**Failure:** **-1.** errno indicates the error.

## NOTES

See **[SetCurrentDirectoryA(3w)](/SetCurrentDirectoryA/3w.md)**.

## IMPLEMENTATION

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

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

Debug channel **"msvcrt"**.
