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

Function FormatGetLastError

libs/module/DynamicLibrary.cpp:17–25  ·  view source on GitHub ↗

Helper method to retrieve the error when DLL load failed.

Source from the content-addressed store, hash-verified

15
16// Helper method to retrieve the error when DLL load failed.
17std::string FormatGetLastError()
18{
19 static wchar_t buf[FORMAT_BUFSIZE];
20 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |FORMAT_MESSAGE_IGNORE_INSERTS,
21 NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
22 buf,
23 FORMAT_BUFSIZE, NULL);
24 return string::unicode_to_utf8(buf);
25}
26
27DynamicLibrary::DynamicLibrary(const std::string& filename) :
28 _name(filename.begin(), filename.end()),

Callers 2

DynamicLibraryMethod · 0.85
findSymbolMethod · 0.85

Calls 1

unicode_to_utf8Function · 0.85

Tested by

no test coverage detected