MCPcopy Create free account
hub / github.com/HoShiMin/Kernel-Bridge / GetKernelProcAddress

Function GetKernelProcAddress

User-Bridge/API/Rtl-Bridge.cpp:17–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace KbRtl {
16
17 static PVOID GetKernelProcAddress(LPCSTR FunctionName)
18 {
19 // Converting ANSI-name to Unicode-name:
20 ULONG SymbolsCount = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, FunctionName, -1, NULL, 0);
21 std::wstring WideName(SymbolsCount, static_cast<WCHAR>(0x0000));
22 MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, FunctionName, -1, const_cast<LPWSTR>(WideName.c_str()), SymbolsCount - 1);
23
24 // Getting the actual kernel address:
25 WdkTypes::PVOID KernelAddress = NULL;
26 BOOL Status = Stuff::KbGetKernelProcAddress(WideName.c_str(), &KernelAddress);
27 return Status ? reinterpret_cast<PVOID>(KernelAddress) : NULL;
28 }
29
30 class FileReader {
31 private:

Callers 2

KbRtlMapDriverMemoryFunction · 0.70
KbRtlLoadModuleMemoryFunction · 0.70

Calls 1

KbGetKernelProcAddressFunction · 0.70

Tested by

no test coverage detected