Files
windows-user-space-emulator/src/common/platform/primitives.hpp
2025-03-22 14:13:58 +01:00

68 lines
990 B
C++

#pragma once
#include <cstdint>
// NOLINTBEGIN(modernize-use-using)
#ifdef OS_WINDOWS
#include "../utils/win.hpp"
#include "winnt.h"
#else
#define _Field_size_(...)
#define _Struct_size_bytes_(...)
#define ANYSIZE_ARRAY 1
#define DWORD std::uint32_t
using LONG = std::int32_t;
using ULONG = DWORD;
using DWORD64 = std::uint64_t;
using ULONGLONG = DWORD64;
using LONGLONG = std::int64_t;
typedef union _ULARGE_INTEGER
{
struct
{
DWORD LowPart;
DWORD HighPart;
};
ULONGLONG QuadPart;
} ULARGE_INTEGER;
typedef union _LARGE_INTEGER
{
struct
{
DWORD LowPart;
LONG HighPart;
};
LONGLONG QuadPart;
} LARGE_INTEGER;
using BYTE = std::uint8_t;
#define CHAR BYTE
#endif
using WORD = std::uint16_t;
#define UCHAR uint8_t
#define BOOLEAN UCHAR
using CSHORT = int16_t;
using USHORT = WORD;
#define DUMMYSTRUCTNAME
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
// NOLINTEND(modernize-use-using)