I wanted to got a set of API Native'm using GetProcAddressto. in the method that i use first by GetModuleHandle got the considering DLLHandle then the API address that is my desire,is taken by GetProcAddress. it works for functions in ntdll but for user32 and advapi32 GetModuleHandle function returns null value. for solving this problem, what's your suggestion?
enter code here
HANDLE Proc = GetCurrentProcess();
HMODULE hNtdll = GetModuleHandle(TEXT("ntdll.dll"));
FARPROC function_address = GetProcAddress(hNtdll, function_name);
LoadLibrary
andGetModuleHandle
.