MCPcopy Create free account
hub / github.com/Soreepeong/XivAlexander / LoadModule

Method LoadModule

XivAlexanderCommon/Utils/Win32/Process.cpp:700–708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

698}
699
700HMODULE Utils::Win32::Process::LoadModule(const std::filesystem::path& path) const {
701 auto pathBuf = path.wstring();
702 pathBuf.resize(pathBuf.size() + 1, L'\0'); // ensure null terminated
703
704 const auto rpszDllPath = WithVirtualAlloc(nullptr, MEM_COMMIT | MEM_RESERVE, PAGE_READONLY, std::span(pathBuf));
705 CallRemoteFunction(LoadLibraryW, rpszDllPath, "LoadLibraryW");
706 OutputDebugStringW(L"LoadLibraryW\n");
707 return AddressOf(path);
708}
709
710int Utils::Win32::Process::UnloadModule(HMODULE hModule) const {
711 return CallRemoteFunction(FreeLibrary, hModule, "FreeLibrary");

Callers 2

InjectedModuleMethod · 0.80
InjectedModule.cppFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected