mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-30 02:26:28 +00:00
[host] windows: use DEBUG_WINERROR for CallNtPowerInformation
We need to use the function RtlNtStatusToDosError to convert NTSTATUS to Windows error codes.
This commit is contained in:
parent
9246e00163
commit
87a21f5f5e
@ -5,3 +5,4 @@ LIBRARY "ntdll.dll"
|
|||||||
EXPORTS
|
EXPORTS
|
||||||
NtDelayExecution
|
NtDelayExecution
|
||||||
NtSetTimerResolution
|
NtSetTimerResolution
|
||||||
|
RtlNtStatusToDosError
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include <ntstatus.h>
|
#include <ntstatus.h>
|
||||||
#include <wtsapi32.h>
|
#include <wtsapi32.h>
|
||||||
#include <userenv.h>
|
#include <userenv.h>
|
||||||
|
#include <winternl.h>
|
||||||
|
|
||||||
#include "interface/platform.h"
|
#include "interface/platform.h"
|
||||||
#include "common/debug.h"
|
#include "common/debug.h"
|
||||||
@ -566,7 +567,8 @@ bool os_blockScreensaver()
|
|||||||
if (status == STATUS_SUCCESS)
|
if (status == STATUS_SUCCESS)
|
||||||
lastResult = executionState & ES_DISPLAY_REQUIRED;
|
lastResult = executionState & ES_DISPLAY_REQUIRED;
|
||||||
else
|
else
|
||||||
DEBUG_ERROR("Failed to call CallNtPowerInformation(SystemExecutionState): %ld", status);
|
DEBUG_WINERROR("Failed to call CallNtPowerInformation(SystemExecutionState)",
|
||||||
|
RtlNtStatusToDosError(status));
|
||||||
lastCheck = now;
|
lastCheck = now;
|
||||||
}
|
}
|
||||||
return lastResult;
|
return lastResult;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user