geode/loader/dobby/builtin-plugin/SymbolResolver/pe/dobby_symbol_resolver.cc

26 lines
638 B
C++
Raw Normal View History

2022-07-30 12:24:03 -04:00
#include "SymbolResolver/dobby_symbol_resolver.h"
#include "common_header.h"
#include <windows.h>
#include <string>
#include <string.h>
#include "PlatformUtil/ProcessRuntimeUtility.h"
#include <vector>
#undef LOG_TAG
#define LOG_TAG "DobbySymbolResolver"
PUBLIC void *DobbySymbolResolver(const char *image_name, const char *symbol_name_pattern) {
void *result = NULL;
HMODULE hMod = LoadLibraryExA(image_name, NULL, DONT_RESOLVE_DLL_REFERENCES);
result = GetProcAddress(hMod, symbol_name_pattern);
if (result)
return result;
//result = resolve_elf_internal_symbol(image_name, symbol_name_pattern);
return result;
}