This module provides utilities to handle WinAPI errors.
More...
|
const wchar_t * | Error_get_desc (DWORD error, wchar_t *buffer, size_t size) |
| Gets description of error. More...
|
|
This module provides utilities to handle WinAPI errors.
You can find out meaning of error over there
#define Error_get_last GetLastError |
Alias to GetLastError()
- Returns
- Last error code of the calling thread.
const wchar_t* Error_get_desc |
( |
DWORD |
error, |
|
|
wchar_t * |
buffer, |
|
|
size_t |
size |
|
) |
| |
Gets description of error.
- Note
- Not all error code produces valid error message. "Unknown Error" is returned in case of that.
- Warning
- Underlying FormatMessageW will set new value of Error.
- Parameters
-
[in] | error | Error code for which te get description. |
[out] | buffer | Memory for string. Cannot be NULL. |
[in] | size | Size of memory. Cannot be 0. Description is truncated in case of insufficient size. |
- Returns
- Pointer to buffer.
- Return values
-
NULL | on invalid parameters. |