MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / GetWin32ErrorString

Function GetWin32ErrorString

SampleFramework12/v1.00/Exceptions.h:20–34  ·  view source on GitHub ↗

Error string functions

Source from the content-addressed store, hash-verified

18
19// Error string functions
20inline std::wstring GetWin32ErrorString(DWORD errorCode)
21{
22 wchar errorString[MAX_PATH];
23 ::FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
24 0,
25 errorCode,
26 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
27 errorString,
28 MAX_PATH,
29 NULL );
30
31 std::wstring message = L"Win32 Error: ";
32 message += errorString;
33 return message;
34}
35
36inline std::string GetWin32ErrorStringAnsi(DWORD errorCode)
37{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected