#pragma once
#ifndef _MINWINBASE_
#define _MINWINBASE_
#if ( _MSC_VER >= 800 )
#pragma warning(disable:
4514
)
#ifndef __WINDOWS_DONT_DISABLE_PRAGMA_PACK_WARNING__
#pragma warning(disable:
4103
)
#endif
#if _MSC_VER >= 1200
#pragma warning(push)
#pragma warning(disable:4820) // padding added after data member
#endif
#pragma warning(disable:
4820
)
#pragma warning(disable:
4001
)
#pragma warning(disable:
4201
)
#pragma warning(disable:
4214
)
#endif
#ifdef __cplusplus
extern
"C"
{
#endif
#define MoveMemory RtlMoveMemory
#define CopyMemory RtlCopyMemory
#define FillMemory RtlFillMemory
#define ZeroMemory RtlZeroMemory
typedef
struct
{
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
union
{
struct
{
;
;
;
;
}
, *
;
typedef
struct
{
;
;
;
dwNumberOfBytesTransferred
;
}
, *
;
#ifndef _FILETIME_
#define _FILETIME_
typedef struct _FILETIME {
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME, *PFILETIME, *LPFILETIME;
#endif
typedef
struct
{
;
;
;
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
_Field_z_ CHAR cFileName[ MAX_PATH ];
_Field_z_ CHAR cAlternateFileName[ 14 ];
#ifdef _MAC
DWORD dwFileType;
DWORD dwCreatorType;
WORD wFinderFlags;
#endif
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
_Field_z_ WCHAR cFileName[ MAX_PATH ];
_Field_z_ WCHAR cAlternateFileName[ 14 ];
#ifdef _MAC
DWORD dwFileType;
DWORD dwCreatorType;
WORD wFinderFlags;
#endif
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef WIN32_FIND_DATAA WIN32_FIND_DATA;
typedef PWIN32_FIND_DATAA PWIN32_FIND_DATA;
typedef LPWIN32_FIND_DATAA LPWIN32_FIND_DATA;
#endif // UNICODE
#if(_WIN32_WINNT >= 0x0400)
typedef
enum
{
,
,
}
;
#define FIND_FIRST_EX_CASE_SENSITIVE 0x00000001
#define FIND_FIRST_EX_LARGE_FETCH 0x00000002
#if (NTDDI_VERSION >= NTDDI_WIN10_RS4)
#define FIND_FIRST_EX_ON_DISK_ENTRIES_ONLY 0x00000004
#endif
typedef
enum
{
,
FindExSearchLimitToDirectories
,
FindExSearchLimitToDevices
,
}
;
#endif /* _WIN32_WINNT >= 0x0400 */
#if(_WIN32_WINNT >= 0x0400)
#if (NTDDI_VERSION >= NTDDI_WIN10_RS3)
typedef
enum
{
=
1
,
}
, *
;
#endif
#endif /* _WIN32_WINNT >= 0x0400 */
typedef
enum
{
,
}
;
#if (_WIN32_WINNT >= _WIN32_WINNT_LONGHORN)
typedef
enum
_FILE_INFO_BY_HANDLE_CLASS
{
,
,
,
,
,
,
,
,
,
,
,
FileIdBothDirectoryRestartInfo
,
,
,
,
FileFullDirectoryRestartInfo
,
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
,
,
,
,
FileIdExtdDirectoryRestartInfo
,
#endif
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10_RS1)
,
,
#endif
MaximumFileInfoByHandleClass
}
FILE_INFO_BY_HANDLE_CLASS
, *
PFILE_INFO_BY_HANDLE_CLASS
;
#endif
typedef
;
typedef
;
typedef
;
typedef
RTL_CRITICAL_SECTION_DEBUG
;
typedef
PRTL_CRITICAL_SECTION_DEBUG
;
typedef
PRTL_CRITICAL_SECTION_DEBUG
;
typedef
(WINAPI *LPOVERLAPPED_COMPLETION_ROUTINE)(
(
__stdcall
*
LPOVERLAPPED_COMPLETION_ROUTINE
)(
_In_ DWORD dwNumberOfBytesTransfered,
dwNumberOfBytesTransfered,
_Inout_ LPOVERLAPPED lpOverlapped
);
#define LOCKFILE_FAIL_IMMEDIATELY 0x00000001
#define LOCKFILE_EXCLUSIVE_LOCK 0x00000002
typedef
struct
{
;
;
;
;
;
union
{
struct
{
;
[
3
];
}
;
struct
{
;
;
;
;
}
;
}
, *
, *
;
#define PROCESS_HEAP_REGION 0x0001
#define PROCESS_HEAP_UNCOMMITTED_RANGE 0x0002
#define PROCESS_HEAP_ENTRY_BUSY 0x0004
#define PROCESS_HEAP_SEG_ALLOC 0x0008
#define PROCESS_HEAP_ENTRY_MOVEABLE 0x0010
#define PROCESS_HEAP_ENTRY_DDESHARE 0x0020
typedef
struct
{
;
;
union
{
struct
{
;
;
;
*
;
}
;
;
}
;
}
, *
;
#define EXCEPTION_DEBUG_EVENT 1
#define CREATE_THREAD_DEBUG_EVENT 2
#define CREATE_PROCESS_DEBUG_EVENT 3
#define EXIT_THREAD_DEBUG_EVENT 4
#define EXIT_PROCESS_DEBUG_EVENT 5
#define LOAD_DLL_DEBUG_EVENT 6
#define UNLOAD_DLL_DEBUG_EVENT 7
#define OUTPUT_DEBUG_STRING_EVENT 8
#define RIP_EVENT 9
typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(
lpThreadParameter
);
typedef
;
typedef LPVOID (WINAPI *PENCLAVE_ROUTINE)(
lpThreadParameter
);
typedef
;
typedef
struct
{
;
;
}
, *
;
typedef
struct
_CREATE_THREAD_DEBUG_INFO
{
;
;
;
}
, *
LPCREATE_THREAD_DEBUG_INFO
;
typedef
struct
_CREATE_PROCESS_DEBUG_INFO
{
;
;
;
;
;
;
;
;
;
;
}
CREATE_PROCESS_DEBUG_INFO
, *
LPCREATE_PROCESS_DEBUG_INFO
;
typedef
struct
{
;
}
, *
;
typedef
struct
{
;
}
, *
LPEXIT_PROCESS_DEBUG_INFO
;
typedef
struct
{
;
;
;
;
;
;
}
, *
;
typedef
struct
{
;
}
, *
;
typedef
struct
_OUTPUT_DEBUG_STRING_INFO
{
;
;
;
}
, *
LPOUTPUT_DEBUG_STRING_INFO
;
typedef
struct
{
;
;
}
, *
;
typedef
struct
{
;
;
;
union
{
;
;
CREATE_PROCESS_DEBUG_INFO
;
;
;
;
;
;
;
}
;
}
, *
;
#if !defined(MIDL_PASS)
typedef
;
#endif // !defined(MIDL_PASS)
#define STILL_ACTIVE STATUS_PENDING
#define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
#define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT
#define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT
#define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP
#define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED
#define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND
#define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO
#define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT
#define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION
#define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW
#define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK
#define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW
#define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO
#define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW
#define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION
#define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR
#define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION
#define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION
#define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW
#define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION
#define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION
#define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE
#define EXCEPTION_POSSIBLE_DEADLOCK STATUS_POSSIBLE_DEADLOCK
#define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT
#define LMEM_FIXED 0x0000
#define LMEM_MOVEABLE 0x0002
#define LMEM_NOCOMPACT 0x0010
#define LMEM_NODISCARD 0x0020
#define LMEM_ZEROINIT 0x0040
#define LMEM_MODIFY 0x0080
#define LMEM_DISCARDABLE 0x0F00
#define LMEM_VALID_FLAGS 0x0F72
#define LMEM_INVALID_HANDLE 0x8000
#define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT)
#define LPTR (LMEM_FIXED | LMEM_ZEROINIT)
#define NONZEROLHND (LMEM_MOVEABLE)
#define NONZEROLPTR (LMEM_FIXED)
#define LocalDiscard( h ) LocalReAlloc( (h), 0, LMEM_MOVEABLE )
#define LMEM_DISCARDED 0x4000
#define LMEM_LOCKCOUNT 0x00FF
#define NUMA_NO_PREFERRED_NODE ((DWORD) -1)
#ifdef __cplusplus
}
#endif
#if ( _MSC_VER >= 800 )
#if _MSC_VER >= 1200
#pragma warning(pop)
#else
#pragma warning(default:4001)
#pragma warning(default:4201)
#pragma warning(default:4214)
/* Leave 4514 disabled. It's an unneeded warning anyway. */
#endif
#endif
#endif // _MINWINBASE_