Update for FormatMessageW best practice
This commit is contained in:
Родитель
be1050bce2
Коммит
fb220387c4
|
@ -604,8 +604,8 @@ namespace
|
|||
|
||||
LPWSTR errorText = nullptr;
|
||||
|
||||
DWORD result = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, nullptr,
|
||||
static_cast<DWORD>(hr),
|
||||
DWORD result = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER,
|
||||
nullptr, static_cast<DWORD>(hr),
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), reinterpret_cast<LPWSTR>(&errorText), 0, nullptr);
|
||||
|
||||
*desc = 0;
|
||||
|
|
|
@ -900,8 +900,8 @@ namespace
|
|||
|
||||
LPWSTR errorText = nullptr;
|
||||
|
||||
DWORD result = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, nullptr,
|
||||
static_cast<DWORD>(hr),
|
||||
DWORD result = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER,
|
||||
nullptr, static_cast<DWORD>(hr),
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), reinterpret_cast<LPWSTR>(&errorText), 0, nullptr);
|
||||
|
||||
*desc = 0;
|
||||
|
|
|
@ -604,8 +604,8 @@ namespace
|
|||
|
||||
LPWSTR errorText = nullptr;
|
||||
|
||||
DWORD result = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, nullptr,
|
||||
static_cast<DWORD>(hr),
|
||||
DWORD result = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER,
|
||||
nullptr, static_cast<DWORD>(hr),
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), reinterpret_cast<LPWSTR>(&errorText), 0, nullptr);
|
||||
|
||||
*desc = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче