LdrGetDllHandle - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTLDR_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)

/**
 * The LdrGetDllHandle routine retrieves a handle to a module that is already loaded in the calling process.
 *
 * \param DllPath A pointer to a Unicode string specifying the search path for the DLL or a combination of LDR_PATH_* flags. If NULL, the default search order is used.
 * \param DllCharacteristics A pointer to a variable specifying DLL characteristics. Can be NULL.
 * \param DllName A pointer to a UNICODE_STRING structure containing the name of the DLL to find.
 * \param DllHandle A pointer that receives the handle to the loaded DLL module on success.
 * \return NTSTATUS Successful or errant status.
 * \sa https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulehandleexw
 */
NTSYSAPI
NTSTATUS
NTAPI
LdrGetDllHandle(
    _In_opt_ PCWSTR DllPath,
    _In_opt_ PULONG DllCharacteristics,
    _In_ PCUNICODE_STRING DllName,
    _Out_ PVOID *DllHandle
    );

#endif
#endif

View code on GitHub

NtDoc

No description available.

NTinternals.net (undocumented.ntinternals.net)

pwPath

???

Unused

???

ModuleFileName

Path to file + Dll name, in NT directory format.

pHModule

Pointer to received HMODULE. See LdrLoadDll for more info.

See also