MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / print_win_error_msg

Function print_win_error_msg

extra/perror.c:191–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189
190#if defined(__WIN__)
191static my_bool print_win_error_msg(DWORD error, my_bool verbose)
192{
193 LPTSTR s;
194 if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
195 FORMAT_MESSAGE_FROM_SYSTEM,
196 NULL, error, 0, (LPTSTR)&s, 0,
197 NULL))
198 {
199 if (verbose)
200 printf("Win32 error code %d: %s", error, s);
201 else
202 puts(s);
203 LocalFree(s);
204 return 0;
205 }
206 return 1;
207}
208#endif
209
210/*

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected