11 |
*/ |
*/ |
12 |
char * |
char * |
13 |
map_windows32_error_to_string (DWORD ercode) { |
map_windows32_error_to_string (DWORD ercode) { |
14 |
/* __declspec (thread) necessary if you will use multiple threads */ |
/* __declspec (thread) necessary if you will use multiple threads on MSVC */ |
15 |
|
#ifdef _MSC_VER |
16 |
__declspec (thread) static char szMessageBuffer[128]; |
__declspec (thread) static char szMessageBuffer[128]; |
17 |
|
#else |
18 |
|
static char szMessageBuffer[128]; |
19 |
|
#endif |
20 |
/* Fill message buffer with a default message in |
/* Fill message buffer with a default message in |
21 |
* case FormatMessage fails |
* case FormatMessage fails |
22 |
*/ |
*/ |