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

# LoadLibraryExA(3w)

## NAME

**LoadLibraryExA** (KERNEL32.@)

## SYNOPSIS

HMODULE LoadLibraryExA\
  (\
   LPCSTR *libname*,\
   HANDLE *hfile*,\
   DWORD  *flags*\
  )

## DESCRIPTION

Load a dll file into the process address space.

## PARAMS

*libname* **\[In\]**  Name of the file to load.

*hfile* **\[In\]**  Reserved, must be **0.**

*flags* **\[In\]**  Flags for loading the dll.

## RETURNS

**Success:** A handle to the loaded dll.

**Failure:** A **NULL** handle. Use **[GetLastError(3w)](/GetLastError/3w.md)** to determine the cause.

## NOTES

The **HFILE** parameter is not used and marked reserved in the **SDK**. I can only guess that it should force a file to be mapped, but I rather ignore the parameter because it would be extremely difficult to integrate this with different types of module representations.

## IMPLEMENTATION

Declared in **"winbase.h"**.

Implemented in **"dlls/kernel32/module.c"**.

Debug channel **"module"**.
