mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 08:25:43 +08:00
Update win_eventlog_sink.h
This commit is contained in:
parent
573ddf8aec
commit
e278953191
@ -137,10 +137,9 @@ public:
|
||||
|
||||
// Get the required size, this is expected to fail with ERROR_INSUFFICIENT_BUFFER and return the token size
|
||||
DWORD tusize = 0;
|
||||
::GetTokenInformation(current_process_token.token_handle_, TokenUser, NULL, 0, &tusize);
|
||||
if (::GetLastError() != ERROR_INSUFFICIENT_BUFFER)
|
||||
if(::GetTokenInformation(current_process_token.token_handle_, TokenUser, NULL, 0, &tusize))
|
||||
{
|
||||
SPDLOG_THROW(win32_error("GetTokenInformation"));
|
||||
SPDLOG_THROW(win32_error("GetTokenInformation should fail"));
|
||||
}
|
||||
|
||||
// get user token
|
||||
|
Loading…
Reference in New Issue
Block a user