#ifndef _NTLDR_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)
/**
* The LdrGetProcedureAddress routine retrieves the address of an exported function or variable from the specified DLL.
*
* \param DllHandle A handle to the DLL module.
* \param ProcedureName An optional pointer to an ANSI_STRING structure containing the name of the function.
* \param ProcedureNumber An optional ordinal of the function.
* \param ProcedureAddress A pointer that receives the address of the exported function or variable.
* \return NTSTATUS Successful or errant status.
* \sa https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getprocaddress
*/
NTSYSAPI
NTSTATUS
NTAPI
LdrGetProcedureAddress(
_In_ PVOID DllHandle,
_In_opt_ PCANSI_STRING ProcedureName,
_In_opt_ ULONG ProcedureNumber,
_Out_ PVOID *ProcedureAddress
);
View code on GitHubNo description available.
Is optional, but you must declare one of FunctionName or Ordinal. In Microsoft concept, you should use both parameters,
for faster function implementation. But there's a bug in link.exe, and all ordinals in PE executables are wrong...