---
name: "_chdrive"
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/_chdrive"
---

# \_chdrive(3w)

## NAME

**\_chdrive** (MSVCRT.@)

## SYNOPSIS

int CDECL  \_chdrive\
  (\
   int *newdrive*\
  )

## DESCRIPTION

Change the current drive.

## PARAMS

*newdrive* **\[In\]**  Drive number to change to (**1** = **'A'**, **2** = **'B'**, **...**).

## RETURNS

**Success:** **0.** The current drive is set to *newdrive*.

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

## NOTES

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

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