LoadLibrary

Maps the specified module into the address space of the calling module.

Library:LibC
Classification:Windows
Service:Library

Syntax

  #include <windows.h> 
   
  HMODULE LoadLibrary (
     LPCTSTR   lpFileName);
  

Parameters

lpFileName

(IN) Points to a null-terminated string with the filename of the library to load. The string can, optionally, contain the path to the library.

Return Values

If successful, returns a handle to the library. Otherwise, returns NULL and sets errno. Use GetLastError to obtain the value placed in errno.

Remarks

The LoadLibrary function is not a preferred interface. If possible, use dlopen from dlfcn.h.

See Also