Files

33 lines
769 B
C++
Raw Permalink Normal View History

2025-10-02 00:20:28 -06:00
#include "profileapi.h"
2025-10-02 00:20:28 -06:00
#include "common.h"
#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) {
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) {
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