2025-10-02 00:20:28 -06:00
|
|
|
#include "profileapi.h"
|
2025-10-05 17:46:16 -06:00
|
|
|
|
2025-10-02 00:20:28 -06:00
|
|
|
#include "common.h"
|
2025-10-05 17:46:16 -06:00
|
|
|
#include "context.h"
|
2025-10-02 00:20:28 -06:00
|
|
|
#include "errors.h"
|
2025-10-28 10:01:21 -06:00
|
|
|
#include "internal.h"
|
2025-10-02 00:20:28 -06:00
|
|
|
|
|
|
|
|
namespace kernel32 {
|
|
|
|
|
|
2025-10-30 02:23:09 -06:00
|
|
|
BOOL WINAPI QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount) {
|
2025-10-05 14:32:06 -06:00
|
|
|
HOST_CONTEXT_GUARD();
|
2025-10-02 00:20:28 -06:00
|
|
|
VERBOSE_LOG("STUB: QueryPerformanceCounter(%p)\n", lpPerformanceCount);
|
|
|
|
|
if (!lpPerformanceCount) {
|
2025-10-28 10:01:21 -06:00
|
|
|
kernel32::setLastError(ERROR_INVALID_PARAMETER);
|
2025-10-02 00:20:28 -06:00
|
|
|
return FALSE;
|
|
|
|
|
}
|
2025-10-31 00:45:32 -06:00
|
|
|
lpPerformanceCount->QuadPart = 0;
|
2025-10-02 00:20:28 -06:00
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-30 02:23:09 -06:00
|
|
|
BOOL WINAPI QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency) {
|
2025-10-05 14:32:06 -06:00
|
|
|
HOST_CONTEXT_GUARD();
|
2025-10-02 00:20:28 -06:00
|
|
|
VERBOSE_LOG("STUB: QueryPerformanceFrequency(%p)\n", lpFrequency);
|
|
|
|
|
if (!lpFrequency) {
|
2025-10-28 10:01:21 -06:00
|
|
|
kernel32::setLastError(ERROR_INVALID_PARAMETER);
|
2025-10-02 00:20:28 -06:00
|
|
|
return FALSE;
|
|
|
|
|
}
|
2025-10-31 00:45:32 -06:00
|
|
|
lpFrequency->QuadPart = 1;
|
2025-10-02 00:20:28 -06:00
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace kernel32
|