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

# MIME\_GetExtensionA(3w)

## NAME

**MIME\_GetExtensionA** (SHLWAPI.330)

## SYNOPSIS

BOOL MIME\_GetExtensionA\
  (\
   LPCSTR *lpszType*,\
   LPSTR  *lpExt*,\
   INT    *iLen*\
  )

## DESCRIPTION

Get the file extension for a given Mime type.

## PARAMS

*lpszType* **\[In\]**  Mime type to get the file extension for.

*lpExt* **\[Out\]**  Destination for the resulting extension.

*iLen* **\[In\]**  Length of *lpExt* in characters.

## RETURNS

**Success:** **TRUE**. *lpExt* contains the file extension.

**Failure:** **FALSE**, if any parameter is invalid or the extension cannot be retrieved. If *iLen* \> **0**, *lpExt* is set to an empty string.

## NOTES

**-** The extension returned in *lpExt* always has a leading **'.'** character, even if the registry Mime database entry does not.

**-** *iLen* must be long enough for the file extension for this function to succeed.

## IMPLEMENTATION

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

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

Debug channel **"shell"**.
