MCPcopy Create free account
hub / github.com/Norbyte/ositools / FindMemoryManagerEoCPlugin

Method FindMemoryManagerEoCPlugin

OsiInterface/DataLibrariesEoCPlugin.cpp:52–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50
51
52 void LibraryManager::FindMemoryManagerEoCPlugin()
53 {
54 HMODULE hCoreLib = GetModuleHandleW(L"CoreLib.dll");
55 auto allocProc = GetProcAddress(hCoreLib, "?Malloc@GlobalAllocator@ls@@QEAAPEAX_KPEBDH1@Z");
56 auto freeProc = GetProcAddress(hCoreLib, "?Free@GlobalAllocator@ls@@QEAAXPEAX@Z");
57
58 EoCAlloc = (EoCAllocFunc)allocProc;
59 EoCFree = (EoCFreeFunc)freeProc;
60
61 if (allocProc == nullptr || freeProc == nullptr) {
62 Debug("Could not find memory management functions");
63 CriticalInitFailed = true;
64 }
65 }
66
67 void LibraryManager::FindLibrariesEoCPlugin()
68 {

Callers

nothing calls this directly

Calls 1

DebugFunction · 0.85

Tested by

no test coverage detected