MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / findSymbol

Method findSymbol

libs/module/DynamicLibrary.cpp:48–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48DynamicLibrary::FunctionPointer DynamicLibrary::findSymbol(const std::string& symbol) {
49 // Try to lookup the symbol address
50 FunctionPointer address = GetProcAddress(_library, symbol.c_str());
51
52 // Emit a warning if the lookup failed
53 if (address == 0) {
54 rConsoleError() << "GetProcAddress failed: '" << symbol << "'" << std::endl;
55 rConsoleError() << "GetLastError: " << FormatGetLastError();
56 }
57
58 return address;
59}
60
61std::string DynamicLibrary::getName() const
62{

Callers 3

CoreModuleMethod · 0.80
destroyMethod · 0.80
processModuleFileMethod · 0.80

Calls 3

rConsoleErrorFunction · 0.85
FormatGetLastErrorFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected