mirror of
https://github.com/decompals/wibo.git
synced 2025-12-12 14:46:09 +00:00
Refactor to use TIB LastErrorValue
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "common.h"
|
||||
#include "context.h"
|
||||
#include "errors.h"
|
||||
#include "internal.h"
|
||||
|
||||
namespace kernel32 {
|
||||
|
||||
@@ -10,7 +11,7 @@ BOOL WIN_FUNC QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount) {
|
||||
HOST_CONTEXT_GUARD();
|
||||
VERBOSE_LOG("STUB: QueryPerformanceCounter(%p)\n", lpPerformanceCount);
|
||||
if (!lpPerformanceCount) {
|
||||
wibo::lastError = ERROR_INVALID_PARAMETER;
|
||||
kernel32::setLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
*lpPerformanceCount = 0;
|
||||
@@ -21,7 +22,7 @@ BOOL WIN_FUNC QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency) {
|
||||
HOST_CONTEXT_GUARD();
|
||||
VERBOSE_LOG("STUB: QueryPerformanceFrequency(%p)\n", lpFrequency);
|
||||
if (!lpFrequency) {
|
||||
wibo::lastError = ERROR_INVALID_PARAMETER;
|
||||
kernel32::setLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
*lpFrequency = 1;
|
||||
|
||||
Reference in New Issue
Block a user