wibo/dll/kernel32/profileapi.cpp
Luke Street 166b9036fd Dont set ERROR_SUCCESS generally
Turns out we should only be setting this in a select few cases.
2025-10-06 00:03:10 -06:00

32 lines
721 B
C++

#include "profileapi.h"
#include "common.h"
#include "context.h"
#include "errors.h"
namespace kernel32 {
BOOL WIN_FUNC QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount) {
HOST_CONTEXT_GUARD();
VERBOSE_LOG("STUB: QueryPerformanceCounter(%p)\n", lpPerformanceCount);
if (!lpPerformanceCount) {
wibo::lastError = ERROR_INVALID_PARAMETER;
return FALSE;
}
*lpPerformanceCount = 0;
return TRUE;
}
BOOL WIN_FUNC QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency) {
HOST_CONTEXT_GUARD();
VERBOSE_LOG("STUB: QueryPerformanceFrequency(%p)\n", lpFrequency);
if (!lpFrequency) {
wibo::lastError = ERROR_INVALID_PARAMETER;
return FALSE;
}
*lpFrequency = 1;
return TRUE;
}
} // namespace kernel32