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

# MSVCRT\_\_findfirst(3w)

## NAME

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

## SYNOPSIS

MSVCRT\_intptr\_t CDECL  MSVCRT\_\_findfirst\
  (\
   const char\*                *fspec*,\
   struct MSVCRT\_\_finddata\_t\* *ft*\
  )

## DESCRIPTION

Open a handle for iterating through a directory.

## PARAMS

*fspec* **\[In\]**  File specification of files to iterate.

*ft* **\[Out\]**  Information for the first file found.

## RETURNS

**Success:** A handle suitable for passing to **\_findnext(3w)** and **\_findclose(3w)**. *ft* is populated with the details of the found file.

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

## NOTES

See **[FindFirstFileA(3w)](/FindFirstFileA/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"**.
