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

# PathAddExtensionA(3w)

## NAME

**PathAddExtensionA** (SHLWAPI.@)

## SYNOPSIS

BOOL PathAddExtensionA\
  (\
   LPSTR  *lpszPath*,\
   LPCSTR *lpszExtension*\
  )

## DESCRIPTION

Add a file extension to a path.

## PARAMS

*lpszPath* **\[In/Out\]**  Path to add extension to.

*lpszExtension* **\[In\]**  Extension to add to *lpszPath*.

## RETURNS

**TRUE** If the path was modified, **FALSE** If *lpszPath* or *lpszExtension* are invalid, *lpszPath* has an extension already, or the new path length is too big.

## FIXME

What version of shlwapi.dll adds **"exe"** if *lpszExtension* is **NULL**? Win2k does not do this, so the behaviour was removed.

## IMPLEMENTATION

Declared in **"shlwapi.h"**.

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

Debug channel **"shell"**.
