MCPcopy Create free account
hub / github.com/ariccio/altWinDirStat / verror

Function verror

Reference code/osImageTool/debug.cpp:118–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118void verror(DWORD dwErrorCode, const char *msg, va_list ap)
119{
120 debug("ERROR: ");
121
122 vdebug(msg, ap);
123
124 char *msgbuf;
125 int rc= FormatMessage(
126 FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
127 NULL, dwErrorCode, 0, (char*) &msgbuf, 0, NULL);
128 if (rc)
129 debug(" - %s\n", msgbuf);
130 else
131 debug(" - UNKNOWNERROR: 0x%08lx\n", dwErrorCode);
132 LocalFree(msgbuf);
133}
134void error(DWORD dwErrorCode, const char *msg, ...)
135{
136 va_list ap;

Callers 2

errorFunction · 0.85
ceerrorFunction · 0.85

Calls 2

debugFunction · 0.85
vdebugFunction · 0.85

Tested by

no test coverage detected