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

# PathFileExistsDefExtA(3w)

## NAME

**PathFileExistsDefExtA** (SHLWAPI.3)

## SYNOPSIS

BOOL PathFileExistsDefExtA\
  (\
   LPSTR *lpszPath*,\
   DWORD *dwWhich*\
  )

## DESCRIPTION

Determine if a file exists locally and is of an executable type.

## PARAMS

*lpszPath* **\[In/Out\]**  File to search for.

*dwWhich* **\[In\]**  Type of executable to search for.

## RETURNS

**TRUE** If the file was found. *lpszPath* contains the file name. **FALSE** Otherwise.

## NOTES

*lpszPath* is modified in place and must be at least **MAX\_PATH** in length. If the function returns **FALSE**, the path is modified to its original state. If the given path contains an extension or *dwWhich* is **0**, executable extensions are not checked.

Ordinals **3-6** are a classic case of Microsoft(tm) exposing limited functionality to users (here through **[PathFindOnPathA(3w)](/PathFindOnPathA/3w.md)**) and keeping advanced functionality for their own developers exclusive use. Monopoly, anyone?

## IMPLEMENTATION

Exported by ordinal only. Use **[GetProcAddress(3w)](/GetProcAddress/3w.md)** to obtain a pointer to the function.

Implemented in **"dlls/shlwapi/path.c"**.

Debug channel **"shell"**.
