/* automatically generated by clay-bindgen */

alias uintptr_t = UInt;

alias va_list = Pointer[CChar];

alias size_t = UInt;

alias rsize_t = size_t;

alias intptr_t = Int;

alias ptrdiff_t = Int;

alias wchar_t = UShort;

alias wint_t = UShort;

alias wctype_t = UShort;

alias errno_t = Int;

alias __time32_t = CLong;

alias __time64_t = Int64;

alias time_t = __time64_t;

external (cdecl) _invalid_parameter_noinfo() : ;

external (cdecl) _invalid_parameter_noinfo_noreturn() : ;

external (cdecl) _invoke_watson(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:Pointer[wchar_t], arg3:UInt, arg4:uintptr_t) : ;

alias Struct_threadmbcinfostruct = Opaque;

alias pthreadlocinfo = Pointer[Struct_threadlocaleinfostruct];

alias pthreadmbcinfo = Pointer[Struct_threadmbcinfostruct];

alias Struct___lc_time_data = Opaque;

record Struct_localeinfo_struct (
    locinfo : pthreadlocinfo,
    mbcinfo : pthreadmbcinfo,
);

alias _locale_tstruct = Struct_localeinfo_struct;

alias _locale_t = Pointer[Struct_localeinfo_struct];

record Struct_tagLC_ID (
    wLanguage : UShort,
    wCountry : UShort,
    wCodePage : UShort,
);

alias LC_ID = Struct_tagLC_ID;

alias LPLC_ID = Pointer[Struct_tagLC_ID];

record Struct_threadlocaleinfostruct (
    refcount : Int,
    lc_codepage : UInt,
    lc_collate_cp : UInt,
    lc_handle : Array[CULong, 6],
    lc_id : Array[LC_ID, 6],
    lc_category : Array[Struct_Unnamed1, 6],
    lc_clike : Int,
    mb_cur_max : Int,
    lconv_intl_refcount : Pointer[Int],
    lconv_num_refcount : Pointer[Int],
    lconv_mon_refcount : Pointer[Int],
    lconv : Pointer[Struct_lconv],
    ctype1_refcount : Pointer[Int],
    ctype1 : Pointer[UShort],
    pctype : Pointer[UShort],
    pclmap : Pointer[CUChar],
    pcumap : Pointer[CUChar],
    lc_time_curr : Pointer[Struct___lc_time_data],
);

record Struct_Unnamed1 (
    locale : Pointer[CChar],
    wlocale : Pointer[wchar_t],
    refcount : Pointer[Int],
    wrefcount : Pointer[Int],
);

alias Struct_lconv = Opaque;

alias threadlocinfo = Struct_threadlocaleinfostruct;

alias Enum__EXCEPTION_DISPOSITION = Int;
alias ExceptionContinueExecution = 0;
alias ExceptionContinueSearch = 1;
alias ExceptionNestedException = 2;
alias ExceptionCollidedUnwind = 3;

alias EXCEPTION_DISPOSITION = Enum__EXCEPTION_DISPOSITION;

external (cdecl) _except_handler(arg0:Pointer[Struct__EXCEPTION_RECORD], arg1:OpaquePointer, arg2:Pointer[Struct__CONTEXT], arg3:OpaquePointer) : EXCEPTION_DISPOSITION;

external (cdecl) _exception_code() : CULong;

external (cdecl) _exception_info() : OpaquePointer;

external (cdecl) _abnormal_termination() : Int;

alias ULONG = CULong;

alias PULONG = Pointer[ULONG];

alias USHORT = UShort;

alias PUSHORT = Pointer[USHORT];

alias UCHAR = CUChar;

alias PUCHAR = Pointer[UCHAR];

alias PSZ = Pointer[CChar];

alias DWORD = CULong;

alias BOOL = Int;

alias BYTE = CUChar;

alias WORD = UShort;

alias FLOAT = Float;

alias PFLOAT = Pointer[FLOAT];

alias PBOOL = Pointer[BOOL];

alias LPBOOL = Pointer[BOOL];

alias PBYTE = Pointer[BYTE];

alias LPBYTE = Pointer[BYTE];

alias PINT = Pointer[Int];

alias LPINT = Pointer[Int];

alias PWORD = Pointer[WORD];

alias LPWORD = Pointer[WORD];

alias LPLONG = Pointer[CLong];

alias PDWORD = Pointer[DWORD];

alias LPDWORD = Pointer[DWORD];

alias LPVOID = OpaquePointer;

alias LPCVOID = OpaquePointer;

alias INT = Int;

alias UINT = UInt;

alias PUINT = Pointer[UInt];

external (cdecl) __pctype_func() : Pointer[UShort];

external _pctype : Pointer[UShort];

external _wctype : Opaque /* unknown NoDeclFound  */;

external (cdecl) __pwctype_func() : Pointer[wctype_t];

external _pwctype : Pointer[wctype_t];

external (cdecl) _isctype(arg0:Int, arg1:Int) : Int;

external (cdecl) _isctype_l(arg0:Int, arg1:Int, arg2:_locale_t) : Int;

external (cdecl) isalpha(arg0:Int) : Int;

external (cdecl) _isalpha_l(arg0:Int, arg1:_locale_t) : Int;

external (cdecl) isupper(arg0:Int) : Int;

external (cdecl) _isupper_l(arg0:Int, arg1:_locale_t) : Int;

external (cdecl) islower(arg0:Int) : Int;

external (cdecl) _islower_l(arg0:Int, arg1:_locale_t) : Int;

external (cdecl) isdigit(arg0:Int) : Int;

external (cdecl) _isdigit_l(arg0:Int, arg1:_locale_t) : Int;

external (cdecl) isxdigit(arg0:Int) : Int;

external (cdecl) _isxdigit_l(arg0:Int, arg1:_locale_t) : Int;

external (cdecl) isspace(arg0:Int) : Int;

external (cdecl) _isspace_l(arg0:Int, arg1:_locale_t) : Int;

external (cdecl) ispunct(arg0:Int) : Int;

external (cdecl) _ispunct_l(arg0:Int, arg1:_locale_t) : Int;

external (cdecl) isalnum(arg0:Int) : Int;

external (cdecl) _isalnum_l(arg0:Int, arg1:_locale_t) : Int;

external (cdecl) isprint(arg0:Int) : Int;

external (cdecl) _isprint_l(arg0:Int, arg1:_locale_t) : Int;

external (cdecl) isgraph(arg0:Int) : Int;

external (cdecl) _isgraph_l(arg0:Int, arg1:_locale_t) : Int;

external (cdecl) iscntrl(arg0:Int) : Int;

external (cdecl) _iscntrl_l(arg0:Int, arg1:_locale_t) : Int;

external (cdecl) toupper(arg0:Int) : Int;

external (cdecl) tolower(arg0:Int) : Int;

external (cdecl) _tolower(arg0:Int) : Int;

external (cdecl) _tolower_l(arg0:Int, arg1:_locale_t) : Int;

external (cdecl) _toupper(arg0:Int) : Int;

external (cdecl) _toupper_l(arg0:Int, arg1:_locale_t) : Int;

external (cdecl) __isascii(arg0:Int) : Int;

external (cdecl) __toascii(arg0:Int) : Int;

external (cdecl) __iscsymf(arg0:Int) : Int;

external (cdecl) __iscsym(arg0:Int) : Int;

external (cdecl) iswalpha(arg0:wint_t) : Int;

external (cdecl) _iswalpha_l(arg0:wint_t, arg1:_locale_t) : Int;

external (cdecl) iswupper(arg0:wint_t) : Int;

external (cdecl) _iswupper_l(arg0:wint_t, arg1:_locale_t) : Int;

external (cdecl) iswlower(arg0:wint_t) : Int;

external (cdecl) _iswlower_l(arg0:wint_t, arg1:_locale_t) : Int;

external (cdecl) iswdigit(arg0:wint_t) : Int;

external (cdecl) _iswdigit_l(arg0:wint_t, arg1:_locale_t) : Int;

external (cdecl) iswxdigit(arg0:wint_t) : Int;

external (cdecl) _iswxdigit_l(arg0:wint_t, arg1:_locale_t) : Int;

external (cdecl) iswspace(arg0:wint_t) : Int;

external (cdecl) _iswspace_l(arg0:wint_t, arg1:_locale_t) : Int;

external (cdecl) iswpunct(arg0:wint_t) : Int;

external (cdecl) _iswpunct_l(arg0:wint_t, arg1:_locale_t) : Int;

external (cdecl) iswalnum(arg0:wint_t) : Int;

external (cdecl) _iswalnum_l(arg0:wint_t, arg1:_locale_t) : Int;

external (cdecl) iswprint(arg0:wint_t) : Int;

external (cdecl) _iswprint_l(arg0:wint_t, arg1:_locale_t) : Int;

external (cdecl) iswgraph(arg0:wint_t) : Int;

external (cdecl) _iswgraph_l(arg0:wint_t, arg1:_locale_t) : Int;

external (cdecl) iswcntrl(arg0:wint_t) : Int;

external (cdecl) _iswcntrl_l(arg0:wint_t, arg1:_locale_t) : Int;

external (cdecl) iswascii(arg0:wint_t) : Int;

external (cdecl) isleadbyte(arg0:Int) : Int;

external (cdecl) _isleadbyte_l(arg0:Int, arg1:_locale_t) : Int;

external (cdecl) towupper(arg0:wint_t) : wint_t;

external (cdecl) _towupper_l(arg0:wint_t, arg1:_locale_t) : wint_t;

external (cdecl) towlower(arg0:wint_t) : wint_t;

external (cdecl) _towlower_l(arg0:wint_t, arg1:_locale_t) : wint_t;

external (cdecl) iswctype(arg0:wint_t, arg1:wctype_t) : Int;

external (cdecl) _iswctype_l(arg0:wint_t, arg1:wctype_t, arg2:_locale_t) : Int;

external (cdecl) __iswcsymf(arg0:wint_t) : Int;

external (cdecl) _iswcsymf_l(arg0:wint_t, arg1:_locale_t) : Int;

external (cdecl) __iswcsym(arg0:wint_t) : Int;

external (cdecl) _iswcsym_l(arg0:wint_t, arg1:_locale_t) : Int;

external (cdecl) is_wctype(arg0:wint_t, arg1:wctype_t) : Int;

external __mb_cur_max : Int;

external (cdecl) ___mb_cur_max_func() : Int;

external (cdecl) ___mb_cur_max_l_func(arg0:_locale_t) : Int;

alias POINTER_64_INT = CULong;

alias INT8 = CChar;

alias PINT8 = Pointer[CChar];

alias INT16 = Short;

alias PINT16 = Pointer[Short];

alias INT32 = Int;

alias PINT32 = Pointer[Int];

alias INT64 = Int64;

alias PINT64 = Pointer[Int64];

alias UINT8 = CUChar;

alias PUINT8 = Pointer[CUChar];

alias UINT16 = UShort;

alias PUINT16 = Pointer[UShort];

alias UINT32 = UInt;

alias PUINT32 = Pointer[UInt];

alias UINT64 = UInt64;

alias PUINT64 = Pointer[UInt64];

alias LONG32 = Int;

alias PLONG32 = Pointer[Int];

alias ULONG32 = UInt;

alias PULONG32 = Pointer[UInt];

alias DWORD32 = UInt;

alias PDWORD32 = Pointer[UInt];

alias INT_PTR = Int;

alias PINT_PTR = Pointer[Int];

alias UINT_PTR = UInt;

alias PUINT_PTR = Pointer[UInt];

alias LONG_PTR = CLong;

alias PLONG_PTR = Pointer[CLong];

alias ULONG_PTR = CULong;

alias PULONG_PTR = Pointer[CULong];

alias UHALF_PTR = UShort;

alias PUHALF_PTR = Pointer[UShort];

alias HALF_PTR = Short;

alias PHALF_PTR = Pointer[Short];

alias SHANDLE_PTR = CLong;

alias HANDLE_PTR = CULong;

external (cdecl) PtrToPtr64(arg0:OpaquePointer) : OpaquePointer;

external (cdecl) Ptr64ToPtr(arg0:OpaquePointer) : OpaquePointer;

external (cdecl) HandleToHandle64(arg0:OpaquePointer) : OpaquePointer;

external (cdecl) Handle64ToHandle(arg0:OpaquePointer) : OpaquePointer;

alias SIZE_T = ULONG_PTR;

alias PSIZE_T = Pointer[ULONG_PTR];

alias SSIZE_T = LONG_PTR;

alias PSSIZE_T = Pointer[LONG_PTR];

alias DWORD_PTR = ULONG_PTR;

alias PDWORD_PTR = Pointer[ULONG_PTR];

alias LONG64 = Int64;

alias PLONG64 = Pointer[Int64];

alias ULONG64 = UInt64;

alias PULONG64 = Pointer[UInt64];

alias DWORD64 = UInt64;

alias PDWORD64 = Pointer[UInt64];

alias KAFFINITY = ULONG_PTR;

alias PKAFFINITY = Pointer[KAFFINITY];

alias PVOID = OpaquePointer;

alias PVOID64 = OpaquePointer;

alias CHAR = CChar;

alias SHORT = Short;

alias LONG = CLong;

alias WCHAR = wchar_t;

alias PWCHAR = Pointer[WCHAR];

alias LPWCH = Pointer[WCHAR];

alias PWCH = Pointer[WCHAR];

alias LPCWCH = Pointer[WCHAR];

alias PCWCH = Pointer[WCHAR];

alias NWPSTR = Pointer[WCHAR];

alias LPWSTR = Pointer[WCHAR];

alias PWSTR = Pointer[WCHAR];

alias PZPWSTR = Pointer[PWSTR];

alias PCZPWSTR = Pointer[PWSTR];

alias LPUWSTR = Pointer[WCHAR];

alias PUWSTR = Pointer[WCHAR];

alias LPCWSTR = Pointer[WCHAR];

alias PCWSTR = Pointer[WCHAR];

alias PZPCWSTR = Pointer[PCWSTR];

alias LPCUWSTR = Pointer[WCHAR];

alias PCUWSTR = Pointer[WCHAR];

alias PZZWSTR = Pointer[WCHAR];

alias PCZZWSTR = Pointer[WCHAR];

alias PUZZWSTR = Pointer[WCHAR];

alias PCUZZWSTR = Pointer[WCHAR];

alias PNZWCH = Pointer[WCHAR];

alias PCNZWCH = Pointer[WCHAR];

alias PUNZWCH = Pointer[WCHAR];

alias PCUNZWCH = Pointer[WCHAR];

alias LPCWCHAR = Pointer[WCHAR];

alias PCWCHAR = Pointer[WCHAR];

alias LPCUWCHAR = Pointer[WCHAR];

alias PCUWCHAR = Pointer[WCHAR];

alias UCSCHAR = CULong;

alias PUCSCHAR = Pointer[UCSCHAR];

alias PCUCSCHAR = Pointer[UCSCHAR];

alias PUCSSTR = Pointer[UCSCHAR];

alias PUUCSSTR = Pointer[UCSCHAR];

alias PCUCSSTR = Pointer[UCSCHAR];

alias PCUUCSSTR = Pointer[UCSCHAR];

alias PUUCSCHAR = Pointer[UCSCHAR];

alias PCUUCSCHAR = Pointer[UCSCHAR];

alias PCHAR = Pointer[CHAR];

alias LPCH = Pointer[CHAR];

alias PCH = Pointer[CHAR];

alias LPCCH = Pointer[CHAR];

alias PCCH = Pointer[CHAR];

alias NPSTR = Pointer[CHAR];

alias LPSTR = Pointer[CHAR];

alias PSTR = Pointer[CHAR];

alias PZPSTR = Pointer[PSTR];

alias PCZPSTR = Pointer[PSTR];

alias LPCSTR = Pointer[CHAR];

alias PCSTR = Pointer[CHAR];

alias PZPCSTR = Pointer[PCSTR];

alias PZZSTR = Pointer[CHAR];

alias PCZZSTR = Pointer[CHAR];

alias PNZCH = Pointer[CHAR];

alias PCNZCH = Pointer[CHAR];

alias TCHAR = CChar;

alias PTCHAR = Pointer[CChar];

alias TBYTE = CUChar;

alias PTBYTE = Pointer[CUChar];

alias LPTCH = LPCH;

alias PTCH = LPCH;

alias LPCTCH = LPCCH;

alias PCTCH = LPCCH;

alias PTSTR = LPSTR;

alias LPTSTR = LPSTR;

alias PUTSTR = LPSTR;

alias LPUTSTR = LPSTR;

alias PCTSTR = LPCSTR;

alias LPCTSTR = LPCSTR;

alias PCUTSTR = LPCSTR;

alias LPCUTSTR = LPCSTR;

alias PZZTSTR = PZZSTR;

alias PUZZTSTR = PZZSTR;

alias PCZZTSTR = PCZZSTR;

alias PCUZZTSTR = PCZZSTR;

alias PNZTCH = PNZCH;

alias PUNZTCH = PNZCH;

alias PCNZTCH = PCNZCH;

alias PCUNZTCH = PCNZCH;

alias PSHORT = Pointer[SHORT];

alias PLONG = Pointer[LONG];

record Struct__PROCESSOR_NUMBER (
    Group : WORD,
    Number : BYTE,
    Reserved : BYTE,
);

alias PROCESSOR_NUMBER = Struct__PROCESSOR_NUMBER;

alias PPROCESSOR_NUMBER = Pointer[Struct__PROCESSOR_NUMBER];

record Struct__GROUP_AFFINITY (
    Mask : KAFFINITY,
    Group : WORD,
    Reserved : Array[WORD, 3],
);

alias GROUP_AFFINITY = Struct__GROUP_AFFINITY;

alias PGROUP_AFFINITY = Pointer[Struct__GROUP_AFFINITY];

alias HANDLE = OpaquePointer;

alias PHANDLE = Pointer[HANDLE];

alias FCHAR = BYTE;

alias FSHORT = WORD;

alias FLONG = DWORD;

alias HRESULT = CLong;

alias CCHAR = CChar;

alias LCID = DWORD;

alias PLCID = PDWORD;

alias LANGID = WORD;

record Struct__FLOAT128 (
    LowPart : Int64,
    HighPart : Int64,
);

alias FLOAT128 = Struct__FLOAT128;

alias PFLOAT128 = Pointer[FLOAT128];

alias LONGLONG = Int64;

alias ULONGLONG = UInt64;

alias PLONGLONG = Pointer[LONGLONG];

alias PULONGLONG = Pointer[ULONGLONG];

alias USN = LONGLONG;

alias Union__LARGE_INTEGER = Union[
    /* u */ Struct_Unnamed2,
    /* QuadPart */ LONGLONG,
];

record Struct_Unnamed3 (
    LowPart : DWORD,
    HighPart : LONG,
);

record Struct_Unnamed2 (
    LowPart : DWORD,
    HighPart : LONG,
);

alias LARGE_INTEGER = Union__LARGE_INTEGER;

alias PLARGE_INTEGER = Pointer[LARGE_INTEGER];

alias Union__ULARGE_INTEGER = Union[
    /* u */ Struct_Unnamed4,
    /* QuadPart */ ULONGLONG,
];

record Struct_Unnamed5 (
    LowPart : DWORD,
    HighPart : DWORD,
);

record Struct_Unnamed4 (
    LowPart : DWORD,
    HighPart : DWORD,
);

alias ULARGE_INTEGER = Union__ULARGE_INTEGER;

alias PULARGE_INTEGER = Pointer[ULARGE_INTEGER];

record Struct__LUID (
    LowPart : DWORD,
    HighPart : LONG,
);

alias LUID = Struct__LUID;

alias PLUID = Pointer[Struct__LUID];

alias DWORDLONG = ULONGLONG;

alias PDWORDLONG = Pointer[DWORDLONG];

external (stdcall) Int64ShllMod32(arg0:ULONGLONG, arg1:DWORD) : ULONGLONG;

external (stdcall) Int64ShraMod32(arg0:LONGLONG, arg1:DWORD) : LONGLONG;

external (stdcall) Int64ShrlMod32(arg0:ULONGLONG, arg1:DWORD) : ULONGLONG;

external (cdecl) _rotl(arg0:UInt, arg1:Int) : UInt;

external (cdecl) _rotl64(arg0:UInt64, arg1:Int) : UInt64;

external (cdecl) _rotr(arg0:UInt, arg1:Int) : UInt;

external (cdecl) _rotr64(arg0:UInt64, arg1:Int) : UInt64;

alias BOOLEAN = BYTE;

alias PBOOLEAN = Pointer[BOOLEAN];

record Struct__LIST_ENTRY (
    Flink : Pointer[Struct__LIST_ENTRY],
    Blink : Pointer[Struct__LIST_ENTRY],
);

alias LIST_ENTRY = Struct__LIST_ENTRY;

alias PLIST_ENTRY = Pointer[Struct__LIST_ENTRY];

alias PRLIST_ENTRY = Pointer[Struct__LIST_ENTRY];

record Struct__SINGLE_LIST_ENTRY (
    Next : Pointer[Struct__SINGLE_LIST_ENTRY],
);

alias SINGLE_LIST_ENTRY = Struct__SINGLE_LIST_ENTRY;

alias PSINGLE_LIST_ENTRY = Pointer[Struct__SINGLE_LIST_ENTRY];

record Struct_LIST_ENTRY32 (
    Flink : DWORD,
    Blink : DWORD,
);

alias LIST_ENTRY32 = Struct_LIST_ENTRY32;

alias PLIST_ENTRY32 = Pointer[LIST_ENTRY32];

record Struct_LIST_ENTRY64 (
    Flink : ULONGLONG,
    Blink : ULONGLONG,
);

alias LIST_ENTRY64 = Struct_LIST_ENTRY64;

alias PLIST_ENTRY64 = Pointer[LIST_ENTRY64];

record Struct__GUID (
    Data1 : CULong,
    Data2 : UShort,
    Data3 : UShort,
    Data4 : Array[CUChar, 8],
);

alias GUID = Struct__GUID;

alias LPGUID = Pointer[GUID];

alias LPCGUID = Pointer[GUID];

alias IID = GUID;

alias LPIID = Pointer[IID];

alias CLSID = GUID;

alias LPCLSID = Pointer[CLSID];

alias FMTID = GUID;

alias LPFMTID = Pointer[FMTID];

external (cdecl) _memccpy(arg0:OpaquePointer, arg1:OpaquePointer, arg2:Int, arg3:size_t) : OpaquePointer;

external (cdecl) memchr(arg0:OpaquePointer, arg1:Int, arg2:size_t) : OpaquePointer;

external (cdecl) _memicmp(arg0:OpaquePointer, arg1:OpaquePointer, arg2:size_t) : Int;

external (cdecl) _memicmp_l(arg0:OpaquePointer, arg1:OpaquePointer, arg2:size_t, arg3:_locale_t) : Int;

external (cdecl) memcmp(arg0:OpaquePointer, arg1:OpaquePointer, arg2:size_t) : Int;

external (cdecl) memcpy(arg0:OpaquePointer, arg1:OpaquePointer, arg2:size_t) : OpaquePointer;

external (cdecl) memcpy_s(arg0:OpaquePointer, arg1:rsize_t, arg2:OpaquePointer, arg3:rsize_t) : errno_t;

external (cdecl) memset(arg0:OpaquePointer, arg1:Int, arg2:size_t) : OpaquePointer;

external (cdecl) memccpy(arg0:OpaquePointer, arg1:OpaquePointer, arg2:Int, arg3:size_t) : OpaquePointer;

external (cdecl) memicmp(arg0:OpaquePointer, arg1:OpaquePointer, arg2:size_t) : Int;

external (cdecl) _strset_s(arg0:Pointer[CChar], arg1:size_t, arg2:Int) : errno_t;

external (cdecl) _strset(arg0:Pointer[CChar], arg1:Int) : Pointer[CChar];

external (cdecl) strcpy_s(arg0:Pointer[CChar], arg1:rsize_t, arg2:Pointer[CChar]) : errno_t;

external (cdecl) strcpy(arg0:Pointer[CChar], arg1:Pointer[CChar]) : Pointer[CChar];

external (cdecl) strcat_s(arg0:Pointer[CChar], arg1:rsize_t, arg2:Pointer[CChar]) : errno_t;

external (cdecl) strcat(arg0:Pointer[CChar], arg1:Pointer[CChar]) : Pointer[CChar];

external (cdecl) strcmp(arg0:Pointer[CChar], arg1:Pointer[CChar]) : Int;

external (cdecl) strlen(arg0:Pointer[CChar]) : size_t;

external (cdecl) strnlen(arg0:Pointer[CChar], arg1:size_t) : size_t;

external (cdecl) strnlen_s(arg0:Pointer[CChar], arg1:size_t) : size_t;

external (cdecl) memmove_s(arg0:OpaquePointer, arg1:rsize_t, arg2:OpaquePointer, arg3:rsize_t) : errno_t;

external (cdecl) memmove(arg0:OpaquePointer, arg1:OpaquePointer, arg2:size_t) : OpaquePointer;

external (cdecl) _strdup(arg0:Pointer[CChar]) : Pointer[CChar];

external (cdecl) strchr(arg0:Pointer[CChar], arg1:Int) : Pointer[CChar];

external (cdecl) _stricmp(arg0:Pointer[CChar], arg1:Pointer[CChar]) : Int;

external (cdecl) _strcmpi(arg0:Pointer[CChar], arg1:Pointer[CChar]) : Int;

external (cdecl) _stricmp_l(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:_locale_t) : Int;

external (cdecl) strcoll(arg0:Pointer[CChar], arg1:Pointer[CChar]) : Int;

external (cdecl) _strcoll_l(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:_locale_t) : Int;

external (cdecl) _stricoll(arg0:Pointer[CChar], arg1:Pointer[CChar]) : Int;

external (cdecl) _stricoll_l(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:_locale_t) : Int;

external (cdecl) _strncoll(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:size_t) : Int;

external (cdecl) _strncoll_l(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:size_t, arg3:_locale_t) : Int;

external (cdecl) _strnicoll(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:size_t) : Int;

external (cdecl) _strnicoll_l(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:size_t, arg3:_locale_t) : Int;

external (cdecl) strcspn(arg0:Pointer[CChar], arg1:Pointer[CChar]) : size_t;

external (cdecl) _strerror(arg0:Pointer[CChar]) : Pointer[CChar];

external (cdecl) _strerror_s(arg0:Pointer[CChar], arg1:size_t, arg2:Pointer[CChar]) : errno_t;

external (cdecl) strerror(arg0:Int) : Pointer[CChar];

external (cdecl) strerror_s(arg0:Pointer[CChar], arg1:size_t, arg2:Int) : errno_t;

external (cdecl) _strlwr_s(arg0:Pointer[CChar], arg1:size_t) : errno_t;

external (cdecl) _strlwr(arg0:Pointer[CChar]) : Pointer[CChar];

external (cdecl) _strlwr_s_l(arg0:Pointer[CChar], arg1:size_t, arg2:_locale_t) : errno_t;

external (cdecl) _strlwr_l(arg0:Pointer[CChar], arg1:_locale_t) : Pointer[CChar];

external (cdecl) strncat_s(arg0:Pointer[CChar], arg1:rsize_t, arg2:Pointer[CChar], arg3:rsize_t) : errno_t;

external (cdecl) strncat(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:size_t) : Pointer[CChar];

external (cdecl) strncmp(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:size_t) : Int;

external (cdecl) _strnicmp(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:size_t) : Int;

external (cdecl) _strnicmp_l(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:size_t, arg3:_locale_t) : Int;

external (cdecl) strncpy_s(arg0:Pointer[CChar], arg1:rsize_t, arg2:Pointer[CChar], arg3:rsize_t) : errno_t;

external (cdecl) strncpy(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:size_t) : Pointer[CChar];

external (cdecl) _strnset_s(arg0:Pointer[CChar], arg1:size_t, arg2:Int, arg3:size_t) : errno_t;

external (cdecl) _strnset(arg0:Pointer[CChar], arg1:Int, arg2:size_t) : Pointer[CChar];

external (cdecl) strpbrk(arg0:Pointer[CChar], arg1:Pointer[CChar]) : Pointer[CChar];

external (cdecl) strrchr(arg0:Pointer[CChar], arg1:Int) : Pointer[CChar];

external (cdecl) _strrev(arg0:Pointer[CChar]) : Pointer[CChar];

external (cdecl) strspn(arg0:Pointer[CChar], arg1:Pointer[CChar]) : size_t;

external (cdecl) strstr(arg0:Pointer[CChar], arg1:Pointer[CChar]) : Pointer[CChar];

external (cdecl) strtok(arg0:Pointer[CChar], arg1:Pointer[CChar]) : Pointer[CChar];

external (cdecl) strtok_s(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:Pointer[Pointer[CChar]]) : Pointer[CChar];

external (cdecl) _strupr_s(arg0:Pointer[CChar], arg1:size_t) : errno_t;

external (cdecl) _strupr(arg0:Pointer[CChar]) : Pointer[CChar];

external (cdecl) _strupr_s_l(arg0:Pointer[CChar], arg1:size_t, arg2:_locale_t) : errno_t;

external (cdecl) _strupr_l(arg0:Pointer[CChar], arg1:_locale_t) : Pointer[CChar];

external (cdecl) strxfrm(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:size_t) : size_t;

external (cdecl) _strxfrm_l(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:size_t, arg3:_locale_t) : size_t;

external (cdecl) strdup(arg0:Pointer[CChar]) : Pointer[CChar];

external (cdecl) strcmpi(arg0:Pointer[CChar], arg1:Pointer[CChar]) : Int;

external (cdecl) stricmp(arg0:Pointer[CChar], arg1:Pointer[CChar]) : Int;

external (cdecl) strlwr(arg0:Pointer[CChar]) : Pointer[CChar];

external (cdecl) strnicmp(arg0:Pointer[CChar], arg1:Pointer[CChar], arg2:size_t) : Int;

external (cdecl) strnset(arg0:Pointer[CChar], arg1:Int, arg2:size_t) : Pointer[CChar];

external (cdecl) strrev(arg0:Pointer[CChar]) : Pointer[CChar];

external (cdecl) strset(arg0:Pointer[CChar], arg1:Int) : Pointer[CChar];

external (cdecl) strupr(arg0:Pointer[CChar]) : Pointer[CChar];

external (cdecl) _wcsdup(arg0:Pointer[wchar_t]) : Pointer[wchar_t];

external (cdecl) wcscat_s(arg0:Pointer[wchar_t], arg1:rsize_t, arg2:Pointer[wchar_t]) : errno_t;

external (cdecl) wcscat(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t]) : Pointer[wchar_t];

external (cdecl) wcschr(arg0:Pointer[wchar_t], arg1:wchar_t) : Pointer[wchar_t];

external (cdecl) wcscmp(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t]) : Int;

external (cdecl) wcscpy_s(arg0:Pointer[wchar_t], arg1:rsize_t, arg2:Pointer[wchar_t]) : errno_t;

external (cdecl) wcscpy(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t]) : Pointer[wchar_t];

external (cdecl) wcscspn(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t]) : size_t;

external (cdecl) wcslen(arg0:Pointer[wchar_t]) : size_t;

external (cdecl) wcsnlen(arg0:Pointer[wchar_t], arg1:size_t) : size_t;

external (cdecl) wcsnlen_s(arg0:Pointer[wchar_t], arg1:size_t) : size_t;

external (cdecl) wcsncat_s(arg0:Pointer[wchar_t], arg1:rsize_t, arg2:Pointer[wchar_t], arg3:rsize_t) : errno_t;

external (cdecl) wcsncat(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:size_t) : Pointer[wchar_t];

external (cdecl) wcsncmp(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:size_t) : Int;

external (cdecl) wcsncpy_s(arg0:Pointer[wchar_t], arg1:rsize_t, arg2:Pointer[wchar_t], arg3:rsize_t) : errno_t;

external (cdecl) wcsncpy(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:size_t) : Pointer[wchar_t];

external (cdecl) wcspbrk(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t]) : Pointer[wchar_t];

external (cdecl) wcsrchr(arg0:Pointer[wchar_t], arg1:wchar_t) : Pointer[wchar_t];

external (cdecl) wcsspn(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t]) : size_t;

external (cdecl) wcsstr(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t]) : Pointer[wchar_t];

external (cdecl) wcstok(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t]) : Pointer[wchar_t];

external (cdecl) wcstok_s(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:Pointer[Pointer[wchar_t]]) : Pointer[wchar_t];

external (cdecl) _wcserror(arg0:Int) : Pointer[wchar_t];

external (cdecl) _wcserror_s(arg0:Pointer[wchar_t], arg1:size_t, arg2:Int) : errno_t;

external (cdecl) __wcserror(arg0:Pointer[wchar_t]) : Pointer[wchar_t];

external (cdecl) __wcserror_s(arg0:Pointer[wchar_t], arg1:size_t, arg2:Pointer[wchar_t]) : errno_t;

external (cdecl) _wcsicmp(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t]) : Int;

external (cdecl) _wcsicmp_l(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:_locale_t) : Int;

external (cdecl) _wcsnicmp(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:size_t) : Int;

external (cdecl) _wcsnicmp_l(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:size_t, arg3:_locale_t) : Int;

external (cdecl) _wcsnset_s(arg0:Pointer[wchar_t], arg1:size_t, arg2:wchar_t, arg3:size_t) : errno_t;

external (cdecl) _wcsnset(arg0:Pointer[wchar_t], arg1:wchar_t, arg2:size_t) : Pointer[wchar_t];

external (cdecl) _wcsrev(arg0:Pointer[wchar_t]) : Pointer[wchar_t];

external (cdecl) _wcsset_s(arg0:Pointer[wchar_t], arg1:size_t, arg2:wchar_t) : errno_t;

external (cdecl) _wcsset(arg0:Pointer[wchar_t], arg1:wchar_t) : Pointer[wchar_t];

external (cdecl) _wcslwr_s(arg0:Pointer[wchar_t], arg1:size_t) : errno_t;

external (cdecl) _wcslwr(arg0:Pointer[wchar_t]) : Pointer[wchar_t];

external (cdecl) _wcslwr_s_l(arg0:Pointer[wchar_t], arg1:size_t, arg2:_locale_t) : errno_t;

external (cdecl) _wcslwr_l(arg0:Pointer[wchar_t], arg1:_locale_t) : Pointer[wchar_t];

external (cdecl) _wcsupr_s(arg0:Pointer[wchar_t], arg1:size_t) : errno_t;

external (cdecl) _wcsupr(arg0:Pointer[wchar_t]) : Pointer[wchar_t];

external (cdecl) _wcsupr_s_l(arg0:Pointer[wchar_t], arg1:size_t, arg2:_locale_t) : errno_t;

external (cdecl) _wcsupr_l(arg0:Pointer[wchar_t], arg1:_locale_t) : Pointer[wchar_t];

external (cdecl) wcsxfrm(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:size_t) : size_t;

external (cdecl) _wcsxfrm_l(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:size_t, arg3:_locale_t) : size_t;

external (cdecl) wcscoll(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t]) : Int;

external (cdecl) _wcscoll_l(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:_locale_t) : Int;

external (cdecl) _wcsicoll(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t]) : Int;

external (cdecl) _wcsicoll_l(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:_locale_t) : Int;

external (cdecl) _wcsncoll(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:size_t) : Int;

external (cdecl) _wcsncoll_l(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:size_t, arg3:_locale_t) : Int;

external (cdecl) _wcsnicoll(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:size_t) : Int;

external (cdecl) _wcsnicoll_l(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:size_t, arg3:_locale_t) : Int;

external (cdecl) wcsdup(arg0:Pointer[wchar_t]) : Pointer[wchar_t];

external (cdecl) wcsicmp(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t]) : Int;

external (cdecl) wcsnicmp(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t], arg2:size_t) : Int;

external (cdecl) wcsnset(arg0:Pointer[wchar_t], arg1:wchar_t, arg2:size_t) : Pointer[wchar_t];

external (cdecl) wcsrev(arg0:Pointer[wchar_t]) : Pointer[wchar_t];

external (cdecl) wcsset(arg0:Pointer[wchar_t], arg1:wchar_t) : Pointer[wchar_t];

external (cdecl) wcslwr(arg0:Pointer[wchar_t]) : Pointer[wchar_t];

external (cdecl) wcsupr(arg0:Pointer[wchar_t]) : Pointer[wchar_t];

external (cdecl) wcsicoll(arg0:Pointer[wchar_t], arg1:Pointer[wchar_t]) : Int;

record Struct__OBJECTID (
    Lineage : GUID,
    Uniquifier : DWORD,
);

alias OBJECTID = Struct__OBJECTID;

alias EXCEPTION_ROUTINE = /* unknown kind FunctionProto */ Opaque;

alias PEXCEPTION_ROUTINE = Pointer[EXCEPTION_ROUTINE];

alias KSPIN_LOCK = ULONG_PTR;

alias PKSPIN_LOCK = Pointer[KSPIN_LOCK];

record Struct__M128A (
    Low : ULONGLONG,
    High : LONGLONG,
);

alias M128A = Struct__M128A;

alias PM128A = Pointer[Struct__M128A];

record Struct__XSAVE_FORMAT (
    ControlWord : WORD,
    StatusWord : WORD,
    TagWord : BYTE,
    Reserved1 : BYTE,
    ErrorOpcode : WORD,
    ErrorOffset : DWORD,
    ErrorSelector : WORD,
    Reserved2 : WORD,
    DataOffset : DWORD,
    DataSelector : WORD,
    Reserved3 : WORD,
    MxCsr : DWORD,
    MxCsr_Mask : DWORD,
    FloatRegisters : Array[M128A, 8],
    XmmRegisters : Array[M128A, 8],
    Reserved4 : Array[BYTE, 192],
    StackControl : Array[DWORD, 7],
    Cr0NpxState : DWORD,
);

alias XSAVE_FORMAT = Struct__XSAVE_FORMAT;

alias PXSAVE_FORMAT = Pointer[Struct__XSAVE_FORMAT];

record Struct__XSAVE_AREA_HEADER (
    Mask : DWORD64,
    Reserved : Array[DWORD64, 7],
);

alias XSAVE_AREA_HEADER = Struct__XSAVE_AREA_HEADER;

alias PXSAVE_AREA_HEADER = Pointer[Struct__XSAVE_AREA_HEADER];

record Struct__XSAVE_AREA (
    LegacyState : XSAVE_FORMAT,
    Header : XSAVE_AREA_HEADER,
);

alias XSAVE_AREA = Struct__XSAVE_AREA;

alias PXSAVE_AREA = Pointer[Struct__XSAVE_AREA];

record Struct__XSTATE_CONTEXT (
    Mask : DWORD64,
    Length : DWORD,
    Reserved1 : DWORD,
    Area : PXSAVE_AREA,
    Reserved2 : DWORD,
    Buffer : PVOID,
    Reserved3 : DWORD,
);

alias XSTATE_CONTEXT = Struct__XSTATE_CONTEXT;

alias PXSTATE_CONTEXT = Pointer[Struct__XSTATE_CONTEXT];

record Struct__CONTEXT_CHUNK (
    Offset : LONG,
    Length : DWORD,
);

alias CONTEXT_CHUNK = Struct__CONTEXT_CHUNK;

alias PCONTEXT_CHUNK = Pointer[Struct__CONTEXT_CHUNK];

record Struct__CONTEXT_EX (
    All : CONTEXT_CHUNK,
    Legacy : CONTEXT_CHUNK,
    XState : CONTEXT_CHUNK,
);

alias CONTEXT_EX = Struct__CONTEXT_EX;

alias PCONTEXT_EX = Pointer[Struct__CONTEXT_EX];

alias __C_ASSERT__ = Array[CChar, 1];

external (cdecl) InterlockedBitTestAndSet(arg0:Pointer[LONG], arg1:LONG) : BOOLEAN;

external (cdecl) InterlockedBitTestAndReset(arg0:Pointer[LONG], arg1:LONG) : BOOLEAN;

external (cdecl) InterlockedBitTestAndComplement(arg0:Pointer[LONG], arg1:LONG) : BOOLEAN;

external (cdecl) MemoryBarrier() : ;

external (cdecl) ReadPMC(arg0:DWORD) : DWORD64;

external (cdecl) ReadTimeStampCounter() : DWORD64;

external (cdecl) DbgRaiseAssertionFailure() : ;

external (cdecl) GetFiberData() : PVOID;

external (cdecl) GetCurrentFiber() : PVOID;

record Struct__FLOATING_SAVE_AREA (
    ControlWord : DWORD,
    StatusWord : DWORD,
    TagWord : DWORD,
    ErrorOffset : DWORD,
    ErrorSelector : DWORD,
    DataOffset : DWORD,
    DataSelector : DWORD,
    RegisterArea : Array[BYTE, 80],
    Cr0NpxState : DWORD,
);

alias FLOATING_SAVE_AREA = Struct__FLOATING_SAVE_AREA;

alias PFLOATING_SAVE_AREA = Pointer[FLOATING_SAVE_AREA];

record Struct__CONTEXT (
    ContextFlags : DWORD,
    Dr0 : DWORD,
    Dr1 : DWORD,
    Dr2 : DWORD,
    Dr3 : DWORD,
    Dr6 : DWORD,
    Dr7 : DWORD,
    FloatSave : FLOATING_SAVE_AREA,
    SegGs : DWORD,
    SegFs : DWORD,
    SegEs : DWORD,
    SegDs : DWORD,
    Edi : DWORD,
    Esi : DWORD,
    Ebx : DWORD,
    Edx : DWORD,
    Ecx : DWORD,
    Eax : DWORD,
    Ebp : DWORD,
    Eip : DWORD,
    SegCs : DWORD,
    EFlags : DWORD,
    Esp : DWORD,
    SegSs : DWORD,
    ExtendedRegisters : Array[BYTE, 512],
);

alias CONTEXT = Struct__CONTEXT;

alias PCONTEXT = Pointer[CONTEXT];

record Struct__LDT_ENTRY (
    LimitLow : WORD,
    BaseLow : WORD,
    HighWord : Union_Unnamed6,
);

alias Union_Unnamed6 = Union[
    /* Bytes */ Struct_Unnamed7,
    /* Bits */ Struct_Unnamed8,
];

record Struct_Unnamed7 (
    BaseMid : BYTE,
    Flags1 : BYTE,
    Flags2 : BYTE,
    BaseHi : BYTE,
);

record Struct_Unnamed8 (
    BaseMid : DWORD,
    Type : DWORD,
    Dpl : DWORD,
    Pres : DWORD,
    LimitHi : DWORD,
    Sys : DWORD,
    Reserved_0 : DWORD,
    Default_Big : DWORD,
    Granularity : DWORD,
    BaseHi : DWORD,
);

alias LDT_ENTRY = Struct__LDT_ENTRY;

alias PLDT_ENTRY = Pointer[Struct__LDT_ENTRY];

record Struct__WOW64_FLOATING_SAVE_AREA (
    ControlWord : DWORD,
    StatusWord : DWORD,
    TagWord : DWORD,
    ErrorOffset : DWORD,
    ErrorSelector : DWORD,
    DataOffset : DWORD,
    DataSelector : DWORD,
    RegisterArea : Array[BYTE, 80],
    Cr0NpxState : DWORD,
);

alias WOW64_FLOATING_SAVE_AREA = Struct__WOW64_FLOATING_SAVE_AREA;

alias PWOW64_FLOATING_SAVE_AREA = Pointer[WOW64_FLOATING_SAVE_AREA];

record Struct__WOW64_CONTEXT (
    ContextFlags : DWORD,
    Dr0 : DWORD,
    Dr1 : DWORD,
    Dr2 : DWORD,
    Dr3 : DWORD,
    Dr6 : DWORD,
    Dr7 : DWORD,
    FloatSave : WOW64_FLOATING_SAVE_AREA,
    SegGs : DWORD,
    SegFs : DWORD,
    SegEs : DWORD,
    SegDs : DWORD,
    Edi : DWORD,
    Esi : DWORD,
    Ebx : DWORD,
    Edx : DWORD,
    Ecx : DWORD,
    Eax : DWORD,
    Ebp : DWORD,
    Eip : DWORD,
    SegCs : DWORD,
    EFlags : DWORD,
    Esp : DWORD,
    SegSs : DWORD,
    ExtendedRegisters : Array[BYTE, 512],
);

alias WOW64_CONTEXT = Struct__WOW64_CONTEXT;

alias PWOW64_CONTEXT = Pointer[WOW64_CONTEXT];

record Struct__WOW64_LDT_ENTRY (
    LimitLow : WORD,
    BaseLow : WORD,
    HighWord : Union_Unnamed9,
);

alias Union_Unnamed9 = Union[
    /* Bytes */ Struct_Unnamed10,
    /* Bits */ Struct_Unnamed11,
];

record Struct_Unnamed10 (
    BaseMid : BYTE,
    Flags1 : BYTE,
    Flags2 : BYTE,
    BaseHi : BYTE,
);

record Struct_Unnamed11 (
    BaseMid : DWORD,
    Type : DWORD,
    Dpl : DWORD,
    Pres : DWORD,
    LimitHi : DWORD,
    Sys : DWORD,
    Reserved_0 : DWORD,
    Default_Big : DWORD,
    Granularity : DWORD,
    BaseHi : DWORD,
);

alias WOW64_LDT_ENTRY = Struct__WOW64_LDT_ENTRY;

alias PWOW64_LDT_ENTRY = Pointer[Struct__WOW64_LDT_ENTRY];

record Struct__WOW64_DESCRIPTOR_TABLE_ENTRY (
    Selector : DWORD,
    Descriptor : WOW64_LDT_ENTRY,
);

alias WOW64_DESCRIPTOR_TABLE_ENTRY = Struct__WOW64_DESCRIPTOR_TABLE_ENTRY;

alias PWOW64_DESCRIPTOR_TABLE_ENTRY = Pointer[Struct__WOW64_DESCRIPTOR_TABLE_ENTRY];

record Struct__EXCEPTION_RECORD (
    ExceptionCode : DWORD,
    ExceptionFlags : DWORD,
    ExceptionRecord : Pointer[Struct__EXCEPTION_RECORD],
    ExceptionAddress : PVOID,
    NumberParameters : DWORD,
    ExceptionInformation : Array[ULONG_PTR, 15],
);

alias EXCEPTION_RECORD = Struct__EXCEPTION_RECORD;

alias PEXCEPTION_RECORD = Pointer[EXCEPTION_RECORD];

record Struct__EXCEPTION_RECORD32 (
    ExceptionCode : DWORD,
    ExceptionFlags : DWORD,
    ExceptionRecord : DWORD,
    ExceptionAddress : DWORD,
    NumberParameters : DWORD,
    ExceptionInformation : Array[DWORD, 15],
);

alias EXCEPTION_RECORD32 = Struct__EXCEPTION_RECORD32;

alias PEXCEPTION_RECORD32 = Pointer[Struct__EXCEPTION_RECORD32];

record Struct__EXCEPTION_RECORD64 (
    ExceptionCode : DWORD,
    ExceptionFlags : DWORD,
    ExceptionRecord : DWORD64,
    ExceptionAddress : DWORD64,
    NumberParameters : DWORD,
    __unusedAlignment : DWORD,
    ExceptionInformation : Array[DWORD64, 15],
);

alias EXCEPTION_RECORD64 = Struct__EXCEPTION_RECORD64;

alias PEXCEPTION_RECORD64 = Pointer[Struct__EXCEPTION_RECORD64];

record Struct__EXCEPTION_POINTERS (
    ExceptionRecord : PEXCEPTION_RECORD,
    ContextRecord : PCONTEXT,
);

alias EXCEPTION_POINTERS = Struct__EXCEPTION_POINTERS;

alias PEXCEPTION_POINTERS = Pointer[Struct__EXCEPTION_POINTERS];

external (stdcall) RtlUnwind(arg0:PVOID, arg1:PVOID, arg2:PEXCEPTION_RECORD, arg3:PVOID) : ;

alias PACCESS_TOKEN = PVOID;

alias PSECURITY_DESCRIPTOR = PVOID;

alias PSID = PVOID;

alias ACCESS_MASK = DWORD;

alias PACCESS_MASK = Pointer[ACCESS_MASK];

record Struct__GENERIC_MAPPING (
    GenericRead : ACCESS_MASK,
    GenericWrite : ACCESS_MASK,
    GenericExecute : ACCESS_MASK,
    GenericAll : ACCESS_MASK,
);

alias GENERIC_MAPPING = Struct__GENERIC_MAPPING;

alias PGENERIC_MAPPING = Pointer[GENERIC_MAPPING];

record Struct__LUID_AND_ATTRIBUTES (
    Luid : LUID,
    Attributes : DWORD,
);

alias LUID_AND_ATTRIBUTES = Struct__LUID_AND_ATTRIBUTES;

alias PLUID_AND_ATTRIBUTES = Pointer[Struct__LUID_AND_ATTRIBUTES];

alias LUID_AND_ATTRIBUTES_ARRAY = Array[LUID_AND_ATTRIBUTES, 1];

alias PLUID_AND_ATTRIBUTES_ARRAY = Pointer[LUID_AND_ATTRIBUTES_ARRAY];

record Struct__SID_IDENTIFIER_AUTHORITY (
    Value : Array[BYTE, 6],
);

alias SID_IDENTIFIER_AUTHORITY = Struct__SID_IDENTIFIER_AUTHORITY;

alias PSID_IDENTIFIER_AUTHORITY = Pointer[Struct__SID_IDENTIFIER_AUTHORITY];

record Struct__SID (
    Revision : BYTE,
    SubAuthorityCount : BYTE,
    IdentifierAuthority : SID_IDENTIFIER_AUTHORITY,
    SubAuthority : Array[DWORD, 1],
);

alias SID = Struct__SID;

alias PISID = Pointer[Struct__SID];

alias Enum__SID_NAME_USE = Int;
alias SidTypeUser = 1;
alias SidTypeGroup = 2;
alias SidTypeDomain = 3;
alias SidTypeAlias = 4;
alias SidTypeWellKnownGroup = 5;
alias SidTypeDeletedAccount = 6;
alias SidTypeInvalid = 7;
alias SidTypeUnknown = 8;
alias SidTypeComputer = 9;
alias SidTypeLabel = 10;

alias SID_NAME_USE = Enum__SID_NAME_USE;

alias PSID_NAME_USE = Pointer[Enum__SID_NAME_USE];

record Struct__SID_AND_ATTRIBUTES (
    Sid : PSID,
    Attributes : DWORD,
);

alias SID_AND_ATTRIBUTES = Struct__SID_AND_ATTRIBUTES;

alias PSID_AND_ATTRIBUTES = Pointer[Struct__SID_AND_ATTRIBUTES];

alias SID_AND_ATTRIBUTES_ARRAY = Array[SID_AND_ATTRIBUTES, 1];

alias PSID_AND_ATTRIBUTES_ARRAY = Pointer[SID_AND_ATTRIBUTES_ARRAY];

alias SID_HASH_ENTRY = ULONG_PTR;

alias PSID_HASH_ENTRY = Pointer[ULONG_PTR];

record Struct__SID_AND_ATTRIBUTES_HASH (
    SidCount : DWORD,
    SidAttr : PSID_AND_ATTRIBUTES,
    Hash : Array[SID_HASH_ENTRY, 32],
);

alias SID_AND_ATTRIBUTES_HASH = Struct__SID_AND_ATTRIBUTES_HASH;

alias PSID_AND_ATTRIBUTES_HASH = Pointer[Struct__SID_AND_ATTRIBUTES_HASH];

alias Enum_Unnamed12 = Int;
alias WinNullSid = 0;
alias WinWorldSid = 1;
alias WinLocalSid = 2;
alias WinCreatorOwnerSid = 3;
alias WinCreatorGroupSid = 4;
alias WinCreatorOwnerServerSid = 5;
alias WinCreatorGroupServerSid = 6;
alias WinNtAuthoritySid = 7;
alias WinDialupSid = 8;
alias WinNetworkSid = 9;
alias WinBatchSid = 10;
alias WinInteractiveSid = 11;
alias WinServiceSid = 12;
alias WinAnonymousSid = 13;
alias WinProxySid = 14;
alias WinEnterpriseControllersSid = 15;
alias WinSelfSid = 16;
alias WinAuthenticatedUserSid = 17;
alias WinRestrictedCodeSid = 18;
alias WinTerminalServerSid = 19;
alias WinRemoteLogonIdSid = 20;
alias WinLogonIdsSid = 21;
alias WinLocalSystemSid = 22;
alias WinLocalServiceSid = 23;
alias WinNetworkServiceSid = 24;
alias WinBuiltinDomainSid = 25;
alias WinBuiltinAdministratorsSid = 26;
alias WinBuiltinUsersSid = 27;
alias WinBuiltinGuestsSid = 28;
alias WinBuiltinPowerUsersSid = 29;
alias WinBuiltinAccountOperatorsSid = 30;
alias WinBuiltinSystemOperatorsSid = 31;
alias WinBuiltinPrintOperatorsSid = 32;
alias WinBuiltinBackupOperatorsSid = 33;
alias WinBuiltinReplicatorSid = 34;
alias WinBuiltinPreWindows2000CompatibleAccessSid = 35;
alias WinBuiltinRemoteDesktopUsersSid = 36;
alias WinBuiltinNetworkConfigurationOperatorsSid = 37;
alias WinAccountAdministratorSid = 38;
alias WinAccountGuestSid = 39;
alias WinAccountKrbtgtSid = 40;
alias WinAccountDomainAdminsSid = 41;
alias WinAccountDomainUsersSid = 42;
alias WinAccountDomainGuestsSid = 43;
alias WinAccountComputersSid = 44;
alias WinAccountControllersSid = 45;
alias WinAccountCertAdminsSid = 46;
alias WinAccountSchemaAdminsSid = 47;
alias WinAccountEnterpriseAdminsSid = 48;
alias WinAccountPolicyAdminsSid = 49;
alias WinAccountRasAndIasServersSid = 50;
alias WinNTLMAuthenticationSid = 51;
alias WinDigestAuthenticationSid = 52;
alias WinSChannelAuthenticationSid = 53;
alias WinThisOrganizationSid = 54;
alias WinOtherOrganizationSid = 55;
alias WinBuiltinIncomingForestTrustBuildersSid = 56;
alias WinBuiltinPerfMonitoringUsersSid = 57;
alias WinBuiltinPerfLoggingUsersSid = 58;
alias WinBuiltinAuthorizationAccessSid = 59;
alias WinBuiltinTerminalServerLicenseServersSid = 60;
alias WinBuiltinDCOMUsersSid = 61;
alias WinBuiltinIUsersSid = 62;
alias WinIUserSid = 63;
alias WinBuiltinCryptoOperatorsSid = 64;
alias WinUntrustedLabelSid = 65;
alias WinLowLabelSid = 66;
alias WinMediumLabelSid = 67;
alias WinHighLabelSid = 68;
alias WinSystemLabelSid = 69;
alias WinWriteRestrictedCodeSid = 70;
alias WinCreatorOwnerRightsSid = 71;
alias WinCacheablePrincipalsGroupSid = 72;
alias WinNonCacheablePrincipalsGroupSid = 73;
alias WinEnterpriseReadonlyControllersSid = 74;
alias WinAccountReadonlyControllersSid = 75;
alias WinBuiltinEventLogReadersGroup = 76;
alias WinNewEnterpriseReadonlyControllersSid = 77;
alias WinBuiltinCertSvcDComAccessGroup = 78;
alias WinMediumPlusLabelSid = 79;
alias WinLocalLogonSid = 80;
alias WinConsoleLogonSid = 81;
alias WinThisOrganizationCertificateSid = 82;

alias WELL_KNOWN_SID_TYPE = Enum_Unnamed12;

record Struct__ACL (
    AclRevision : BYTE,
    Sbz1 : BYTE,
    AclSize : WORD,
    AceCount : WORD,
    Sbz2 : WORD,
);

alias ACL = Struct__ACL;

alias PACL = Pointer[ACL];

record Struct__ACE_HEADER (
    AceType : BYTE,
    AceFlags : BYTE,
    AceSize : WORD,
);

alias ACE_HEADER = Struct__ACE_HEADER;

alias PACE_HEADER = Pointer[ACE_HEADER];

record Struct__ACCESS_ALLOWED_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    SidStart : DWORD,
);

alias ACCESS_ALLOWED_ACE = Struct__ACCESS_ALLOWED_ACE;

alias PACCESS_ALLOWED_ACE = Pointer[ACCESS_ALLOWED_ACE];

record Struct__ACCESS_DENIED_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    SidStart : DWORD,
);

alias ACCESS_DENIED_ACE = Struct__ACCESS_DENIED_ACE;

alias PACCESS_DENIED_ACE = Pointer[ACCESS_DENIED_ACE];

record Struct__SYSTEM_AUDIT_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    SidStart : DWORD,
);

alias SYSTEM_AUDIT_ACE = Struct__SYSTEM_AUDIT_ACE;

alias PSYSTEM_AUDIT_ACE = Pointer[SYSTEM_AUDIT_ACE];

record Struct__SYSTEM_ALARM_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    SidStart : DWORD,
);

alias SYSTEM_ALARM_ACE = Struct__SYSTEM_ALARM_ACE;

alias PSYSTEM_ALARM_ACE = Pointer[SYSTEM_ALARM_ACE];

record Struct__SYSTEM_MANDATORY_LABEL_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    SidStart : DWORD,
);

alias SYSTEM_MANDATORY_LABEL_ACE = Struct__SYSTEM_MANDATORY_LABEL_ACE;

alias PSYSTEM_MANDATORY_LABEL_ACE = Pointer[Struct__SYSTEM_MANDATORY_LABEL_ACE];

record Struct__ACCESS_ALLOWED_OBJECT_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    Flags : DWORD,
    ObjectType : GUID,
    InheritedObjectType : GUID,
    SidStart : DWORD,
);

alias ACCESS_ALLOWED_OBJECT_ACE = Struct__ACCESS_ALLOWED_OBJECT_ACE;

alias PACCESS_ALLOWED_OBJECT_ACE = Pointer[Struct__ACCESS_ALLOWED_OBJECT_ACE];

record Struct__ACCESS_DENIED_OBJECT_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    Flags : DWORD,
    ObjectType : GUID,
    InheritedObjectType : GUID,
    SidStart : DWORD,
);

alias ACCESS_DENIED_OBJECT_ACE = Struct__ACCESS_DENIED_OBJECT_ACE;

alias PACCESS_DENIED_OBJECT_ACE = Pointer[Struct__ACCESS_DENIED_OBJECT_ACE];

record Struct__SYSTEM_AUDIT_OBJECT_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    Flags : DWORD,
    ObjectType : GUID,
    InheritedObjectType : GUID,
    SidStart : DWORD,
);

alias SYSTEM_AUDIT_OBJECT_ACE = Struct__SYSTEM_AUDIT_OBJECT_ACE;

alias PSYSTEM_AUDIT_OBJECT_ACE = Pointer[Struct__SYSTEM_AUDIT_OBJECT_ACE];

record Struct__SYSTEM_ALARM_OBJECT_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    Flags : DWORD,
    ObjectType : GUID,
    InheritedObjectType : GUID,
    SidStart : DWORD,
);

alias SYSTEM_ALARM_OBJECT_ACE = Struct__SYSTEM_ALARM_OBJECT_ACE;

alias PSYSTEM_ALARM_OBJECT_ACE = Pointer[Struct__SYSTEM_ALARM_OBJECT_ACE];

record Struct__ACCESS_ALLOWED_CALLBACK_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    SidStart : DWORD,
);

alias ACCESS_ALLOWED_CALLBACK_ACE = Struct__ACCESS_ALLOWED_CALLBACK_ACE;

alias PACCESS_ALLOWED_CALLBACK_ACE = Pointer[Struct__ACCESS_ALLOWED_CALLBACK_ACE];

record Struct__ACCESS_DENIED_CALLBACK_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    SidStart : DWORD,
);

alias ACCESS_DENIED_CALLBACK_ACE = Struct__ACCESS_DENIED_CALLBACK_ACE;

alias PACCESS_DENIED_CALLBACK_ACE = Pointer[Struct__ACCESS_DENIED_CALLBACK_ACE];

record Struct__SYSTEM_AUDIT_CALLBACK_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    SidStart : DWORD,
);

alias SYSTEM_AUDIT_CALLBACK_ACE = Struct__SYSTEM_AUDIT_CALLBACK_ACE;

alias PSYSTEM_AUDIT_CALLBACK_ACE = Pointer[Struct__SYSTEM_AUDIT_CALLBACK_ACE];

record Struct__SYSTEM_ALARM_CALLBACK_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    SidStart : DWORD,
);

alias SYSTEM_ALARM_CALLBACK_ACE = Struct__SYSTEM_ALARM_CALLBACK_ACE;

alias PSYSTEM_ALARM_CALLBACK_ACE = Pointer[Struct__SYSTEM_ALARM_CALLBACK_ACE];

record Struct__ACCESS_ALLOWED_CALLBACK_OBJECT_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    Flags : DWORD,
    ObjectType : GUID,
    InheritedObjectType : GUID,
    SidStart : DWORD,
);

alias ACCESS_ALLOWED_CALLBACK_OBJECT_ACE = Struct__ACCESS_ALLOWED_CALLBACK_OBJECT_ACE;

alias PACCESS_ALLOWED_CALLBACK_OBJECT_ACE = Pointer[Struct__ACCESS_ALLOWED_CALLBACK_OBJECT_ACE];

record Struct__ACCESS_DENIED_CALLBACK_OBJECT_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    Flags : DWORD,
    ObjectType : GUID,
    InheritedObjectType : GUID,
    SidStart : DWORD,
);

alias ACCESS_DENIED_CALLBACK_OBJECT_ACE = Struct__ACCESS_DENIED_CALLBACK_OBJECT_ACE;

alias PACCESS_DENIED_CALLBACK_OBJECT_ACE = Pointer[Struct__ACCESS_DENIED_CALLBACK_OBJECT_ACE];

record Struct__SYSTEM_AUDIT_CALLBACK_OBJECT_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    Flags : DWORD,
    ObjectType : GUID,
    InheritedObjectType : GUID,
    SidStart : DWORD,
);

alias SYSTEM_AUDIT_CALLBACK_OBJECT_ACE = Struct__SYSTEM_AUDIT_CALLBACK_OBJECT_ACE;

alias PSYSTEM_AUDIT_CALLBACK_OBJECT_ACE = Pointer[Struct__SYSTEM_AUDIT_CALLBACK_OBJECT_ACE];

record Struct__SYSTEM_ALARM_CALLBACK_OBJECT_ACE (
    Header : ACE_HEADER,
    Mask : ACCESS_MASK,
    Flags : DWORD,
    ObjectType : GUID,
    InheritedObjectType : GUID,
    SidStart : DWORD,
);

alias SYSTEM_ALARM_CALLBACK_OBJECT_ACE = Struct__SYSTEM_ALARM_CALLBACK_OBJECT_ACE;

alias PSYSTEM_ALARM_CALLBACK_OBJECT_ACE = Pointer[Struct__SYSTEM_ALARM_CALLBACK_OBJECT_ACE];

alias Enum__ACL_INFORMATION_CLASS = Int;
alias AclRevisionInformation = 1;
alias AclSizeInformation = 2;

alias ACL_INFORMATION_CLASS = Enum__ACL_INFORMATION_CLASS;

record Struct__ACL_REVISION_INFORMATION (
    AclRevision : DWORD,
);

alias ACL_REVISION_INFORMATION = Struct__ACL_REVISION_INFORMATION;

alias PACL_REVISION_INFORMATION = Pointer[ACL_REVISION_INFORMATION];

record Struct__ACL_SIZE_INFORMATION (
    AceCount : DWORD,
    AclBytesInUse : DWORD,
    AclBytesFree : DWORD,
);

alias ACL_SIZE_INFORMATION = Struct__ACL_SIZE_INFORMATION;

alias PACL_SIZE_INFORMATION = Pointer[ACL_SIZE_INFORMATION];

alias SECURITY_DESCRIPTOR_CONTROL = WORD;

alias PSECURITY_DESCRIPTOR_CONTROL = Pointer[WORD];

record Struct__SECURITY_DESCRIPTOR_RELATIVE (
    Revision : BYTE,
    Sbz1 : BYTE,
    Control : SECURITY_DESCRIPTOR_CONTROL,
    Owner : DWORD,
    Group : DWORD,
    Sacl : DWORD,
    Dacl : DWORD,
);

alias SECURITY_DESCRIPTOR_RELATIVE = Struct__SECURITY_DESCRIPTOR_RELATIVE;

alias PISECURITY_DESCRIPTOR_RELATIVE = Pointer[Struct__SECURITY_DESCRIPTOR_RELATIVE];

record Struct__SECURITY_DESCRIPTOR (
    Revision : BYTE,
    Sbz1 : BYTE,
    Control : SECURITY_DESCRIPTOR_CONTROL,
    Owner : PSID,
    Group : PSID,
    Sacl : PACL,
    Dacl : PACL,
);

alias SECURITY_DESCRIPTOR = Struct__SECURITY_DESCRIPTOR;

alias PISECURITY_DESCRIPTOR = Pointer[Struct__SECURITY_DESCRIPTOR];

record Struct__OBJECT_TYPE_LIST (
    Level : WORD,
    Sbz : WORD,
    ObjectType : Pointer[GUID],
);

alias OBJECT_TYPE_LIST = Struct__OBJECT_TYPE_LIST;

alias POBJECT_TYPE_LIST = Pointer[Struct__OBJECT_TYPE_LIST];

alias Enum__AUDIT_EVENT_TYPE = Int;
alias AuditEventObjectAccess = 0;
alias AuditEventDirectoryServiceAccess = 1;

alias AUDIT_EVENT_TYPE = Enum__AUDIT_EVENT_TYPE;

alias PAUDIT_EVENT_TYPE = Pointer[Enum__AUDIT_EVENT_TYPE];

record Struct__PRIVILEGE_SET (
    PrivilegeCount : DWORD,
    Control : DWORD,
    Privilege : Array[LUID_AND_ATTRIBUTES, 1],
);

alias PRIVILEGE_SET = Struct__PRIVILEGE_SET;

alias PPRIVILEGE_SET = Pointer[Struct__PRIVILEGE_SET];

alias Enum__ACCESS_REASON_TYPE = Int;
alias AccessReasonNone = 0;
alias AccessReasonAllowedAce = 65536;
alias AccessReasonDeniedAce = 131072;
alias AccessReasonAllowedParentAce = 196608;
alias AccessReasonDeniedParentAce = 262144;
alias AccessReasonMissingPrivilege = 1048576;
alias AccessReasonFromPrivilege = 2097152;
alias AccessReasonIntegrityLevel = 3145728;
alias AccessReasonOwnership = 4194304;
alias AccessReasonNullDacl = 5242880;
alias AccessReasonEmptyDacl = 6291456;
alias AccessReasonNoSD = 7340032;
alias AccessReasonNoGrant = 8388608;

alias ACCESS_REASON_TYPE = Enum__ACCESS_REASON_TYPE;

alias ACCESS_REASON = DWORD;

record Struct__ACCESS_REASONS (
    Data : Array[ACCESS_REASON, 32],
);

alias ACCESS_REASONS = Struct__ACCESS_REASONS;

alias PACCESS_REASONS = Pointer[Struct__ACCESS_REASONS];

record Struct__SE_SECURITY_DESCRIPTOR (
    Size : DWORD,
    Flags : DWORD,
    SecurityDescriptor : PSECURITY_DESCRIPTOR,
);

alias SE_SECURITY_DESCRIPTOR = Struct__SE_SECURITY_DESCRIPTOR;

alias PSE_SECURITY_DESCRIPTOR = Pointer[Struct__SE_SECURITY_DESCRIPTOR];

record Struct__SE_ACCESS_REQUEST (
    Size : DWORD,
    SeSecurityDescriptor : PSE_SECURITY_DESCRIPTOR,
    DesiredAccess : ACCESS_MASK,
    PreviouslyGrantedAccess : ACCESS_MASK,
    PrincipalSelfSid : PSID,
    GenericMapping : PGENERIC_MAPPING,
    ObjectTypeListCount : DWORD,
    ObjectTypeList : POBJECT_TYPE_LIST,
);

alias SE_ACCESS_REQUEST = Struct__SE_ACCESS_REQUEST;

alias PSE_ACCESS_REQUEST = Pointer[Struct__SE_ACCESS_REQUEST];

record Struct__SE_ACCESS_REPLY (
    Size : DWORD,
    ResultListCount : DWORD,
    GrantedAccess : PACCESS_MASK,
    AccessStatus : PDWORD,
    AccessReason : PACCESS_REASONS,
    Privileges : Pointer[PPRIVILEGE_SET],
);

alias SE_ACCESS_REPLY = Struct__SE_ACCESS_REPLY;

alias PSE_ACCESS_REPLY = Pointer[Struct__SE_ACCESS_REPLY];

alias Enum__SECURITY_IMPERSONATION_LEVEL = Int;
alias SecurityAnonymous = 0;
alias SecurityIdentification = 1;
alias SecurityImpersonation = 2;
alias SecurityDelegation = 3;

alias SECURITY_IMPERSONATION_LEVEL = Enum__SECURITY_IMPERSONATION_LEVEL;

alias PSECURITY_IMPERSONATION_LEVEL = Pointer[Enum__SECURITY_IMPERSONATION_LEVEL];

alias Enum__TOKEN_TYPE = Int;
alias TokenPrimary = 1;
alias TokenImpersonation = 2;

alias TOKEN_TYPE = Enum__TOKEN_TYPE;

alias PTOKEN_TYPE = Pointer[TOKEN_TYPE];

alias Enum__TOKEN_ELEVATION_TYPE = Int;
alias TokenElevationTypeDefault = 1;
alias TokenElevationTypeFull = 2;
alias TokenElevationTypeLimited = 3;

alias TOKEN_ELEVATION_TYPE = Enum__TOKEN_ELEVATION_TYPE;

alias PTOKEN_ELEVATION_TYPE = Pointer[Enum__TOKEN_ELEVATION_TYPE];

alias Enum__TOKEN_INFORMATION_CLASS = Int;
alias TokenUser = 1;
alias TokenGroups = 2;
alias TokenPrivileges = 3;
alias TokenOwner = 4;
alias TokenPrimaryGroup = 5;
alias TokenDefaultDacl = 6;
alias TokenSource = 7;
alias TokenType = 8;
alias TokenImpersonationLevel = 9;
alias TokenStatistics = 10;
alias TokenRestrictedSids = 11;
alias TokenSessionId = 12;
alias TokenGroupsAndPrivileges = 13;
alias TokenSessionReference = 14;
alias TokenSandBoxInert = 15;
alias TokenAuditPolicy = 16;
alias TokenOrigin = 17;
alias TokenElevationType = 18;
alias TokenLinkedToken = 19;
alias TokenElevation = 20;
alias TokenHasRestrictions = 21;
alias TokenAccessInformation = 22;
alias TokenVirtualizationAllowed = 23;
alias TokenVirtualizationEnabled = 24;
alias TokenIntegrityLevel = 25;
alias TokenUIAccess = 26;
alias TokenMandatoryPolicy = 27;
alias TokenLogonSid = 28;
alias MaxTokenInfoClass = 29;

alias TOKEN_INFORMATION_CLASS = Enum__TOKEN_INFORMATION_CLASS;

alias PTOKEN_INFORMATION_CLASS = Pointer[Enum__TOKEN_INFORMATION_CLASS];

record Struct__TOKEN_USER (
    User : SID_AND_ATTRIBUTES,
);

alias TOKEN_USER = Struct__TOKEN_USER;

alias PTOKEN_USER = Pointer[Struct__TOKEN_USER];

record Struct__TOKEN_GROUPS (
    GroupCount : DWORD,
    Groups : Array[SID_AND_ATTRIBUTES, 1],
);

alias TOKEN_GROUPS = Struct__TOKEN_GROUPS;

alias PTOKEN_GROUPS = Pointer[Struct__TOKEN_GROUPS];

record Struct__TOKEN_PRIVILEGES (
    PrivilegeCount : DWORD,
    Privileges : Array[LUID_AND_ATTRIBUTES, 1],
);

alias TOKEN_PRIVILEGES = Struct__TOKEN_PRIVILEGES;

alias PTOKEN_PRIVILEGES = Pointer[Struct__TOKEN_PRIVILEGES];

record Struct__TOKEN_OWNER (
    Owner : PSID,
);

alias TOKEN_OWNER = Struct__TOKEN_OWNER;

alias PTOKEN_OWNER = Pointer[Struct__TOKEN_OWNER];

record Struct__TOKEN_PRIMARY_GROUP (
    PrimaryGroup : PSID,
);

alias TOKEN_PRIMARY_GROUP = Struct__TOKEN_PRIMARY_GROUP;

alias PTOKEN_PRIMARY_GROUP = Pointer[Struct__TOKEN_PRIMARY_GROUP];

record Struct__TOKEN_DEFAULT_DACL (
    DefaultDacl : PACL,
);

alias TOKEN_DEFAULT_DACL = Struct__TOKEN_DEFAULT_DACL;

alias PTOKEN_DEFAULT_DACL = Pointer[Struct__TOKEN_DEFAULT_DACL];

record Struct__TOKEN_GROUPS_AND_PRIVILEGES (
    SidCount : DWORD,
    SidLength : DWORD,
    Sids : PSID_AND_ATTRIBUTES,
    RestrictedSidCount : DWORD,
    RestrictedSidLength : DWORD,
    RestrictedSids : PSID_AND_ATTRIBUTES,
    PrivilegeCount : DWORD,
    PrivilegeLength : DWORD,
    Privileges : PLUID_AND_ATTRIBUTES,
    AuthenticationId : LUID,
);

alias TOKEN_GROUPS_AND_PRIVILEGES = Struct__TOKEN_GROUPS_AND_PRIVILEGES;

alias PTOKEN_GROUPS_AND_PRIVILEGES = Pointer[Struct__TOKEN_GROUPS_AND_PRIVILEGES];

record Struct__TOKEN_LINKED_TOKEN (
    LinkedToken : HANDLE,
);

alias TOKEN_LINKED_TOKEN = Struct__TOKEN_LINKED_TOKEN;

alias PTOKEN_LINKED_TOKEN = Pointer[Struct__TOKEN_LINKED_TOKEN];

record Struct__TOKEN_ELEVATION (
    TokenIsElevated : DWORD,
);

alias TOKEN_ELEVATION = Struct__TOKEN_ELEVATION;

alias PTOKEN_ELEVATION = Pointer[Struct__TOKEN_ELEVATION];

record Struct__TOKEN_MANDATORY_LABEL (
    Label : SID_AND_ATTRIBUTES,
);

alias TOKEN_MANDATORY_LABEL = Struct__TOKEN_MANDATORY_LABEL;

alias PTOKEN_MANDATORY_LABEL = Pointer[Struct__TOKEN_MANDATORY_LABEL];

record Struct__TOKEN_MANDATORY_POLICY (
    Policy : DWORD,
);

alias TOKEN_MANDATORY_POLICY = Struct__TOKEN_MANDATORY_POLICY;

alias PTOKEN_MANDATORY_POLICY = Pointer[Struct__TOKEN_MANDATORY_POLICY];

record Struct__TOKEN_ACCESS_INFORMATION (
    SidHash : PSID_AND_ATTRIBUTES_HASH,
    RestrictedSidHash : PSID_AND_ATTRIBUTES_HASH,
    Privileges : PTOKEN_PRIVILEGES,
    AuthenticationId : LUID,
    TokenType : TOKEN_TYPE,
    ImpersonationLevel : SECURITY_IMPERSONATION_LEVEL,
    MandatoryPolicy : TOKEN_MANDATORY_POLICY,
    Flags : DWORD,
);

alias TOKEN_ACCESS_INFORMATION = Struct__TOKEN_ACCESS_INFORMATION;

alias PTOKEN_ACCESS_INFORMATION = Pointer[Struct__TOKEN_ACCESS_INFORMATION];

record Struct__TOKEN_AUDIT_POLICY (
    PerUserPolicy : Array[BYTE, 27],
);

alias TOKEN_AUDIT_POLICY = Struct__TOKEN_AUDIT_POLICY;

alias PTOKEN_AUDIT_POLICY = Pointer[Struct__TOKEN_AUDIT_POLICY];

record Struct__TOKEN_SOURCE (
    SourceName : Array[CHAR, 8],
    SourceIdentifier : LUID,
);

alias TOKEN_SOURCE = Struct__TOKEN_SOURCE;

alias PTOKEN_SOURCE = Pointer[Struct__TOKEN_SOURCE];

record Struct__TOKEN_STATISTICS (
    TokenId : LUID,
    AuthenticationId : LUID,
    ExpirationTime : LARGE_INTEGER,
    TokenType : TOKEN_TYPE,
    ImpersonationLevel : SECURITY_IMPERSONATION_LEVEL,
    DynamicCharged : DWORD,
    DynamicAvailable : DWORD,
    GroupCount : DWORD,
    PrivilegeCount : DWORD,
    ModifiedId : LUID,
);

alias TOKEN_STATISTICS = Struct__TOKEN_STATISTICS;

alias PTOKEN_STATISTICS = Pointer[Struct__TOKEN_STATISTICS];

record Struct__TOKEN_CONTROL (
    TokenId : LUID,
    AuthenticationId : LUID,
    ModifiedId : LUID,
    TokenSource : TOKEN_SOURCE,
);

alias TOKEN_CONTROL = Struct__TOKEN_CONTROL;

alias PTOKEN_CONTROL = Pointer[Struct__TOKEN_CONTROL];

record Struct__TOKEN_ORIGIN (
    OriginatingLogonSession : LUID,
);

alias TOKEN_ORIGIN = Struct__TOKEN_ORIGIN;

alias PTOKEN_ORIGIN = Pointer[Struct__TOKEN_ORIGIN];

alias Enum__MANDATORY_LEVEL = Int;
alias MandatoryLevelUntrusted = 0;
alias MandatoryLevelLow = 1;
alias MandatoryLevelMedium = 2;
alias MandatoryLevelHigh = 3;
alias MandatoryLevelSystem = 4;
alias MandatoryLevelSecureProcess = 5;
alias MandatoryLevelCount = 6;

alias MANDATORY_LEVEL = Enum__MANDATORY_LEVEL;

alias PMANDATORY_LEVEL = Pointer[Enum__MANDATORY_LEVEL];

alias SECURITY_CONTEXT_TRACKING_MODE = BOOLEAN;

alias PSECURITY_CONTEXT_TRACKING_MODE = Pointer[BOOLEAN];

record Struct__SECURITY_QUALITY_OF_SERVICE (
    Length : DWORD,
    ImpersonationLevel : SECURITY_IMPERSONATION_LEVEL,
    ContextTrackingMode : SECURITY_CONTEXT_TRACKING_MODE,
    EffectiveOnly : BOOLEAN,
);

alias SECURITY_QUALITY_OF_SERVICE = Struct__SECURITY_QUALITY_OF_SERVICE;

alias PSECURITY_QUALITY_OF_SERVICE = Pointer[Struct__SECURITY_QUALITY_OF_SERVICE];

record Struct__SE_IMPERSONATION_STATE (
    Token : PACCESS_TOKEN,
    CopyOnOpen : BOOLEAN,
    EffectiveOnly : BOOLEAN,
    Level : SECURITY_IMPERSONATION_LEVEL,
);

alias SE_IMPERSONATION_STATE = Struct__SE_IMPERSONATION_STATE;

alias PSE_IMPERSONATION_STATE = Pointer[Struct__SE_IMPERSONATION_STATE];

alias SECURITY_INFORMATION = DWORD;

alias PSECURITY_INFORMATION = Pointer[DWORD];

record Struct__JOB_SET_ARRAY (
    JobHandle : HANDLE,
    MemberLevel : DWORD,
    Flags : DWORD,
);

alias JOB_SET_ARRAY = Struct__JOB_SET_ARRAY;

alias PJOB_SET_ARRAY = Pointer[Struct__JOB_SET_ARRAY];

record Struct__NT_TIB (
    ExceptionList : Pointer[Struct__EXCEPTION_REGISTRATION_RECORD],
    StackBase : PVOID,
    StackLimit : PVOID,
    SubSystemTib : PVOID,
    ArbitraryUserPointer : PVOID,
    Self : Pointer[Struct__NT_TIB],
);

alias Struct__EXCEPTION_REGISTRATION_RECORD = Opaque;

alias Union_Unnamed13 = Union[
    /* FiberData */ PVOID,
    /* Version */ DWORD,
];

alias NT_TIB = Struct__NT_TIB;

alias PNT_TIB = Pointer[NT_TIB];

record Struct__NT_TIB32 (
    ExceptionList : DWORD,
    StackBase : DWORD,
    StackLimit : DWORD,
    SubSystemTib : DWORD,
    ArbitraryUserPointer : DWORD,
    Self : DWORD,
);

alias Union_Unnamed14 = Union[
    /* FiberData */ DWORD,
    /* Version */ DWORD,
];

alias NT_TIB32 = Struct__NT_TIB32;

alias PNT_TIB32 = Pointer[Struct__NT_TIB32];

record Struct__NT_TIB64 (
    ExceptionList : DWORD64,
    StackBase : DWORD64,
    StackLimit : DWORD64,
    SubSystemTib : DWORD64,
    ArbitraryUserPointer : DWORD64,
    Self : DWORD64,
);

alias Union_Unnamed15 = Union[
    /* FiberData */ DWORD64,
    /* Version */ DWORD,
];

alias NT_TIB64 = Struct__NT_TIB64;

alias PNT_TIB64 = Pointer[Struct__NT_TIB64];

record Struct__UMS_CREATE_THREAD_ATTRIBUTES (
    UmsVersion : DWORD,
    UmsContext : PVOID,
    UmsCompletionList : PVOID,
);

alias UMS_CREATE_THREAD_ATTRIBUTES = Struct__UMS_CREATE_THREAD_ATTRIBUTES;

alias PUMS_CREATE_THREAD_ATTRIBUTES = Pointer[Struct__UMS_CREATE_THREAD_ATTRIBUTES];

record Struct__QUOTA_LIMITS (
    PagedPoolLimit : SIZE_T,
    NonPagedPoolLimit : SIZE_T,
    MinimumWorkingSetSize : SIZE_T,
    MaximumWorkingSetSize : SIZE_T,
    PagefileLimit : SIZE_T,
    TimeLimit : LARGE_INTEGER,
);

alias QUOTA_LIMITS = Struct__QUOTA_LIMITS;

alias PQUOTA_LIMITS = Pointer[Struct__QUOTA_LIMITS];

alias Union__RATE_QUOTA_LIMIT = Union[
    /* RateData */ DWORD,
];

record Struct_Unnamed16 (
    RatePercent : DWORD,
    Reserved0 : DWORD,
);

alias RATE_QUOTA_LIMIT = Union__RATE_QUOTA_LIMIT;

alias PRATE_QUOTA_LIMIT = Pointer[Union__RATE_QUOTA_LIMIT];

record Struct__QUOTA_LIMITS_EX (
    PagedPoolLimit : SIZE_T,
    NonPagedPoolLimit : SIZE_T,
    MinimumWorkingSetSize : SIZE_T,
    MaximumWorkingSetSize : SIZE_T,
    PagefileLimit : SIZE_T,
    TimeLimit : LARGE_INTEGER,
    WorkingSetLimit : SIZE_T,
    Reserved2 : SIZE_T,
    Reserved3 : SIZE_T,
    Reserved4 : SIZE_T,
    Flags : DWORD,
    CpuRateLimit : RATE_QUOTA_LIMIT,
);

alias QUOTA_LIMITS_EX = Struct__QUOTA_LIMITS_EX;

alias PQUOTA_LIMITS_EX = Pointer[Struct__QUOTA_LIMITS_EX];

record Struct__IO_COUNTERS (
    ReadOperationCount : ULONGLONG,
    WriteOperationCount : ULONGLONG,
    OtherOperationCount : ULONGLONG,
    ReadTransferCount : ULONGLONG,
    WriteTransferCount : ULONGLONG,
    OtherTransferCount : ULONGLONG,
);

alias IO_COUNTERS = Struct__IO_COUNTERS;

alias PIO_COUNTERS = Pointer[IO_COUNTERS];

alias Enum__HARDWARE_COUNTER_TYPE = Int;
alias PMCCounter = 0;
alias MaxHardwareCounterType = 1;

alias HARDWARE_COUNTER_TYPE = Enum__HARDWARE_COUNTER_TYPE;

alias PHARDWARE_COUNTER_TYPE = Pointer[Enum__HARDWARE_COUNTER_TYPE];

record Struct__JOBOBJECT_BASIC_ACCOUNTING_INFORMATION (
    TotalUserTime : LARGE_INTEGER,
    TotalKernelTime : LARGE_INTEGER,
    ThisPeriodTotalUserTime : LARGE_INTEGER,
    ThisPeriodTotalKernelTime : LARGE_INTEGER,
    TotalPageFaultCount : DWORD,
    TotalProcesses : DWORD,
    ActiveProcesses : DWORD,
    TotalTerminatedProcesses : DWORD,
);

alias JOBOBJECT_BASIC_ACCOUNTING_INFORMATION = Struct__JOBOBJECT_BASIC_ACCOUNTING_INFORMATION;

alias PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION = Pointer[Struct__JOBOBJECT_BASIC_ACCOUNTING_INFORMATION];

record Struct__JOBOBJECT_BASIC_LIMIT_INFORMATION (
    PerProcessUserTimeLimit : LARGE_INTEGER,
    PerJobUserTimeLimit : LARGE_INTEGER,
    LimitFlags : DWORD,
    MinimumWorkingSetSize : SIZE_T,
    MaximumWorkingSetSize : SIZE_T,
    ActiveProcessLimit : DWORD,
    Affinity : ULONG_PTR,
    PriorityClass : DWORD,
    SchedulingClass : DWORD,
);

alias JOBOBJECT_BASIC_LIMIT_INFORMATION = Struct__JOBOBJECT_BASIC_LIMIT_INFORMATION;

alias PJOBOBJECT_BASIC_LIMIT_INFORMATION = Pointer[Struct__JOBOBJECT_BASIC_LIMIT_INFORMATION];

record Struct__JOBOBJECT_EXTENDED_LIMIT_INFORMATION (
    BasicLimitInformation : JOBOBJECT_BASIC_LIMIT_INFORMATION,
    IoInfo : IO_COUNTERS,
    ProcessMemoryLimit : SIZE_T,
    JobMemoryLimit : SIZE_T,
    PeakProcessMemoryUsed : SIZE_T,
    PeakJobMemoryUsed : SIZE_T,
);

alias JOBOBJECT_EXTENDED_LIMIT_INFORMATION = Struct__JOBOBJECT_EXTENDED_LIMIT_INFORMATION;

alias PJOBOBJECT_EXTENDED_LIMIT_INFORMATION = Pointer[Struct__JOBOBJECT_EXTENDED_LIMIT_INFORMATION];

record Struct__JOBOBJECT_BASIC_PROCESS_ID_LIST (
    NumberOfAssignedProcesses : DWORD,
    NumberOfProcessIdsInList : DWORD,
    ProcessIdList : Array[ULONG_PTR, 1],
);

alias JOBOBJECT_BASIC_PROCESS_ID_LIST = Struct__JOBOBJECT_BASIC_PROCESS_ID_LIST;

alias PJOBOBJECT_BASIC_PROCESS_ID_LIST = Pointer[Struct__JOBOBJECT_BASIC_PROCESS_ID_LIST];

record Struct__JOBOBJECT_BASIC_UI_RESTRICTIONS (
    UIRestrictionsClass : DWORD,
);

alias JOBOBJECT_BASIC_UI_RESTRICTIONS = Struct__JOBOBJECT_BASIC_UI_RESTRICTIONS;

alias PJOBOBJECT_BASIC_UI_RESTRICTIONS = Pointer[Struct__JOBOBJECT_BASIC_UI_RESTRICTIONS];

record Struct__JOBOBJECT_SECURITY_LIMIT_INFORMATION (
    SecurityLimitFlags : DWORD,
    JobToken : HANDLE,
    SidsToDisable : PTOKEN_GROUPS,
    PrivilegesToDelete : PTOKEN_PRIVILEGES,
    RestrictedSids : PTOKEN_GROUPS,
);

alias JOBOBJECT_SECURITY_LIMIT_INFORMATION = Struct__JOBOBJECT_SECURITY_LIMIT_INFORMATION;

alias PJOBOBJECT_SECURITY_LIMIT_INFORMATION = Pointer[Struct__JOBOBJECT_SECURITY_LIMIT_INFORMATION];

record Struct__JOBOBJECT_END_OF_JOB_TIME_INFORMATION (
    EndOfJobTimeAction : DWORD,
);

alias JOBOBJECT_END_OF_JOB_TIME_INFORMATION = Struct__JOBOBJECT_END_OF_JOB_TIME_INFORMATION;

alias PJOBOBJECT_END_OF_JOB_TIME_INFORMATION = Pointer[Struct__JOBOBJECT_END_OF_JOB_TIME_INFORMATION];

record Struct__JOBOBJECT_ASSOCIATE_COMPLETION_PORT (
    CompletionKey : PVOID,
    CompletionPort : HANDLE,
);

alias JOBOBJECT_ASSOCIATE_COMPLETION_PORT = Struct__JOBOBJECT_ASSOCIATE_COMPLETION_PORT;

alias PJOBOBJECT_ASSOCIATE_COMPLETION_PORT = Pointer[Struct__JOBOBJECT_ASSOCIATE_COMPLETION_PORT];

record Struct__JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION (
    BasicInfo : JOBOBJECT_BASIC_ACCOUNTING_INFORMATION,
    IoInfo : IO_COUNTERS,
);

alias JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = Struct__JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION;

alias PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = Pointer[Struct__JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION];

record Struct__JOBOBJECT_JOBSET_INFORMATION (
    MemberLevel : DWORD,
);

alias JOBOBJECT_JOBSET_INFORMATION = Struct__JOBOBJECT_JOBSET_INFORMATION;

alias PJOBOBJECT_JOBSET_INFORMATION = Pointer[Struct__JOBOBJECT_JOBSET_INFORMATION];

alias Enum__JOBOBJECTINFOCLASS = Int;
alias JobObjectBasicAccountingInformation = 1;
alias JobObjectBasicLimitInformation = 2;
alias JobObjectBasicProcessIdList = 3;
alias JobObjectBasicUIRestrictions = 4;
alias JobObjectSecurityLimitInformation = 5;
alias JobObjectEndOfJobTimeInformation = 6;
alias JobObjectAssociateCompletionPortInformation = 7;
alias JobObjectBasicAndIoAccountingInformation = 8;
alias JobObjectExtendedLimitInformation = 9;
alias JobObjectJobSetInformation = 10;
alias JobObjectGroupInformation = 11;
alias MaxJobObjectInfoClass = 12;

alias JOBOBJECTINFOCLASS = Enum__JOBOBJECTINFOCLASS;

alias Enum__LOGICAL_PROCESSOR_RELATIONSHIP = Int;
alias RelationProcessorCore = 0;
alias RelationNumaNode = 1;
alias RelationCache = 2;
alias RelationProcessorPackage = 3;
alias RelationGroup = 4;
alias RelationAll = 65535;

alias LOGICAL_PROCESSOR_RELATIONSHIP = Enum__LOGICAL_PROCESSOR_RELATIONSHIP;

alias Enum__PROCESSOR_CACHE_TYPE = Int;
alias CacheUnified = 0;
alias CacheInstruction = 1;
alias CacheData = 2;
alias CacheTrace = 3;

alias PROCESSOR_CACHE_TYPE = Enum__PROCESSOR_CACHE_TYPE;

record Struct__CACHE_DESCRIPTOR (
    Level : BYTE,
    Associativity : BYTE,
    LineSize : WORD,
    Size : DWORD,
    Type : PROCESSOR_CACHE_TYPE,
);

alias CACHE_DESCRIPTOR = Struct__CACHE_DESCRIPTOR;

alias PCACHE_DESCRIPTOR = Pointer[Struct__CACHE_DESCRIPTOR];

record Struct__SYSTEM_LOGICAL_PROCESSOR_INFORMATION (
    ProcessorMask : ULONG_PTR,
    Relationship : LOGICAL_PROCESSOR_RELATIONSHIP,
);

alias Union_Unnamed17 = Union[
    /* ProcessorCore */ Struct_Unnamed18,
    /* NumaNode */ Struct_Unnamed19,
    /* Cache */ CACHE_DESCRIPTOR,
    /* Reserved */ Array[ULONGLONG, 2],
];

record Struct_Unnamed18 (
    Flags : BYTE,
);

record Struct_Unnamed19 (
    NodeNumber : DWORD,
);

alias SYSTEM_LOGICAL_PROCESSOR_INFORMATION = Struct__SYSTEM_LOGICAL_PROCESSOR_INFORMATION;

alias PSYSTEM_LOGICAL_PROCESSOR_INFORMATION = Pointer[Struct__SYSTEM_LOGICAL_PROCESSOR_INFORMATION];

record Struct__PROCESSOR_RELATIONSHIP (
    Flags : BYTE,
    Reserved : Array[BYTE, 21],
    GroupCount : WORD,
    GroupMask : Array[GROUP_AFFINITY, 1],
);

alias PROCESSOR_RELATIONSHIP = Struct__PROCESSOR_RELATIONSHIP;

alias PPROCESSOR_RELATIONSHIP = Pointer[Struct__PROCESSOR_RELATIONSHIP];

record Struct__NUMA_NODE_RELATIONSHIP (
    NodeNumber : DWORD,
    Reserved : Array[BYTE, 20],
    GroupMask : GROUP_AFFINITY,
);

alias NUMA_NODE_RELATIONSHIP = Struct__NUMA_NODE_RELATIONSHIP;

alias PNUMA_NODE_RELATIONSHIP = Pointer[Struct__NUMA_NODE_RELATIONSHIP];

record Struct__CACHE_RELATIONSHIP (
    Level : BYTE,
    Associativity : BYTE,
    LineSize : WORD,
    CacheSize : DWORD,
    Type : PROCESSOR_CACHE_TYPE,
    Reserved : Array[BYTE, 20],
    GroupMask : GROUP_AFFINITY,
);

alias CACHE_RELATIONSHIP = Struct__CACHE_RELATIONSHIP;

alias PCACHE_RELATIONSHIP = Pointer[Struct__CACHE_RELATIONSHIP];

record Struct__PROCESSOR_GROUP_INFO (
    MaximumProcessorCount : BYTE,
    ActiveProcessorCount : BYTE,
    Reserved : Array[BYTE, 38],
    ActiveProcessorMask : KAFFINITY,
);

alias PROCESSOR_GROUP_INFO = Struct__PROCESSOR_GROUP_INFO;

alias PPROCESSOR_GROUP_INFO = Pointer[Struct__PROCESSOR_GROUP_INFO];

record Struct__GROUP_RELATIONSHIP (
    MaximumGroupCount : WORD,
    ActiveGroupCount : WORD,
    Reserved : Array[BYTE, 20],
    GroupInfo : Array[PROCESSOR_GROUP_INFO, 1],
);

alias GROUP_RELATIONSHIP = Struct__GROUP_RELATIONSHIP;

alias PGROUP_RELATIONSHIP = Pointer[Struct__GROUP_RELATIONSHIP];

record Struct__SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX (
    Relationship : LOGICAL_PROCESSOR_RELATIONSHIP,
    Size : DWORD,
);

alias Union_Unnamed20 = Union[
    /* Processor */ PROCESSOR_RELATIONSHIP,
    /* NumaNode */ NUMA_NODE_RELATIONSHIP,
    /* Cache */ CACHE_RELATIONSHIP,
    /* Group */ GROUP_RELATIONSHIP,
];

alias SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX = Struct__SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX;

alias PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX = Pointer[Struct__SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX];

record Struct__SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION (
    CycleTime : DWORD64,
);

alias SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION = Struct__SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION;

alias PSYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION = Pointer[Struct__SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION];

record Struct__XSTATE_FEATURE (
    Offset : DWORD,
    Size : DWORD,
);

alias XSTATE_FEATURE = Struct__XSTATE_FEATURE;

alias PXSTATE_FEATURE = Pointer[Struct__XSTATE_FEATURE];

record Struct__XSTATE_CONFIGURATION (
    EnabledFeatures : DWORD64,
    Size : DWORD,
    OptimizedSave : DWORD,
    Features : Array[XSTATE_FEATURE, 64],
);

alias XSTATE_CONFIGURATION = Struct__XSTATE_CONFIGURATION;

alias PXSTATE_CONFIGURATION = Pointer[Struct__XSTATE_CONFIGURATION];

record Struct__MEMORY_BASIC_INFORMATION (
    BaseAddress : PVOID,
    AllocationBase : PVOID,
    AllocationProtect : DWORD,
    RegionSize : SIZE_T,
    State : DWORD,
    Protect : DWORD,
    Type : DWORD,
);

alias MEMORY_BASIC_INFORMATION = Struct__MEMORY_BASIC_INFORMATION;

alias PMEMORY_BASIC_INFORMATION = Pointer[Struct__MEMORY_BASIC_INFORMATION];

record Struct__MEMORY_BASIC_INFORMATION32 (
    BaseAddress : DWORD,
    AllocationBase : DWORD,
    AllocationProtect : DWORD,
    RegionSize : DWORD,
    State : DWORD,
    Protect : DWORD,
    Type : DWORD,
);

alias MEMORY_BASIC_INFORMATION32 = Struct__MEMORY_BASIC_INFORMATION32;

alias PMEMORY_BASIC_INFORMATION32 = Pointer[Struct__MEMORY_BASIC_INFORMATION32];

record Struct__MEMORY_BASIC_INFORMATION64 (
    BaseAddress : ULONGLONG,
    AllocationBase : ULONGLONG,
    AllocationProtect : DWORD,
    __alignment1 : DWORD,
    RegionSize : ULONGLONG,
    State : DWORD,
    Protect : DWORD,
    Type : DWORD,
    __alignment2 : DWORD,
);

alias MEMORY_BASIC_INFORMATION64 = Struct__MEMORY_BASIC_INFORMATION64;

alias PMEMORY_BASIC_INFORMATION64 = Pointer[Struct__MEMORY_BASIC_INFORMATION64];

record Struct__FILE_NOTIFY_INFORMATION (
    NextEntryOffset : DWORD,
    Action : DWORD,
    FileNameLength : DWORD,
    FileName : Array[WCHAR, 1],
);

alias FILE_NOTIFY_INFORMATION = Struct__FILE_NOTIFY_INFORMATION;

alias PFILE_NOTIFY_INFORMATION = Pointer[Struct__FILE_NOTIFY_INFORMATION];

alias Union__FILE_SEGMENT_ELEMENT = Union[
    /* Buffer */ PVOID64,
    /* Alignment */ ULONGLONG,
];

alias FILE_SEGMENT_ELEMENT = Union__FILE_SEGMENT_ELEMENT;

alias PFILE_SEGMENT_ELEMENT = Pointer[Union__FILE_SEGMENT_ELEMENT];

record Struct__REPARSE_GUID_DATA_BUFFER (
    ReparseTag : DWORD,
    ReparseDataLength : WORD,
    Reserved : WORD,
    ReparseGuid : GUID,
    GenericReparseBuffer : Struct_Unnamed21,
);

record Struct_Unnamed21 (
    DataBuffer : Array[BYTE, 1],
);

alias REPARSE_GUID_DATA_BUFFER = Struct__REPARSE_GUID_DATA_BUFFER;

alias PREPARSE_GUID_DATA_BUFFER = Pointer[Struct__REPARSE_GUID_DATA_BUFFER];

external GUID_MAX_POWER_SAVINGS : GUID;

external GUID_MIN_POWER_SAVINGS : GUID;

external GUID_TYPICAL_POWER_SAVINGS : GUID;

external NO_SUBGROUP_GUID : GUID;

external ALL_POWERSCHEMES_GUID : GUID;

external GUID_POWERSCHEME_PERSONALITY : GUID;

external GUID_ACTIVE_POWERSCHEME : GUID;

external GUID_VIDEO_SUBGROUP : GUID;

external GUID_VIDEO_POWERDOWN_TIMEOUT : GUID;

external GUID_VIDEO_ANNOYANCE_TIMEOUT : GUID;

external GUID_VIDEO_ADAPTIVE_PERCENT_INCREASE : GUID;

external GUID_VIDEO_DIM_TIMEOUT : GUID;

external GUID_VIDEO_ADAPTIVE_POWERDOWN : GUID;

external GUID_MONITOR_POWER_ON : GUID;

external GUID_DEVICE_POWER_POLICY_VIDEO_BRIGHTNESS : GUID;

external GUID_DEVICE_POWER_POLICY_VIDEO_DIM_BRIGHTNESS : GUID;

external GUID_VIDEO_CURRENT_MONITOR_BRIGHTNESS : GUID;

external GUID_VIDEO_ADAPTIVE_DISPLAY_BRIGHTNESS : GUID;

external GUID_SESSION_DISPLAY_STATE : GUID;

external GUID_CONSOLE_DISPLAY_STATE : GUID;

external GUID_ALLOW_DISPLAY_REQUIRED : GUID;

external GUID_DISK_SUBGROUP : GUID;

external GUID_DISK_POWERDOWN_TIMEOUT : GUID;

external GUID_DISK_BURST_IGNORE_THRESHOLD : GUID;

external GUID_DISK_ADAPTIVE_POWERDOWN : GUID;

external GUID_SLEEP_SUBGROUP : GUID;

external GUID_SLEEP_IDLE_THRESHOLD : GUID;

external GUID_STANDBY_TIMEOUT : GUID;

external GUID_UNATTEND_SLEEP_TIMEOUT : GUID;

external GUID_HIBERNATE_TIMEOUT : GUID;

external GUID_HIBERNATE_FASTS4_POLICY : GUID;

external GUID_CRITICAL_POWER_TRANSITION : GUID;

external GUID_SYSTEM_AWAYMODE : GUID;

external GUID_ALLOW_AWAYMODE : GUID;

external GUID_ALLOW_STANDBY_STATES : GUID;

external GUID_ALLOW_RTC_WAKE : GUID;

external GUID_ALLOW_SYSTEM_REQUIRED : GUID;

external GUID_SYSTEM_BUTTON_SUBGROUP : GUID;

external GUID_POWERBUTTON_ACTION : GUID;

external GUID_POWERBUTTON_ACTION_FLAGS : GUID;

external GUID_SLEEPBUTTON_ACTION : GUID;

external GUID_SLEEPBUTTON_ACTION_FLAGS : GUID;

external GUID_USERINTERFACEBUTTON_ACTION : GUID;

external GUID_LIDCLOSE_ACTION : GUID;

external GUID_LIDCLOSE_ACTION_FLAGS : GUID;

external GUID_LIDOPEN_POWERSTATE : GUID;

external GUID_BATTERY_SUBGROUP : GUID;

external GUID_BATTERY_DISCHARGE_ACTION_0 : GUID;

external GUID_BATTERY_DISCHARGE_LEVEL_0 : GUID;

external GUID_BATTERY_DISCHARGE_FLAGS_0 : GUID;

external GUID_BATTERY_DISCHARGE_ACTION_1 : GUID;

external GUID_BATTERY_DISCHARGE_LEVEL_1 : GUID;

external GUID_BATTERY_DISCHARGE_FLAGS_1 : GUID;

external GUID_BATTERY_DISCHARGE_ACTION_2 : GUID;

external GUID_BATTERY_DISCHARGE_LEVEL_2 : GUID;

external GUID_BATTERY_DISCHARGE_FLAGS_2 : GUID;

external GUID_BATTERY_DISCHARGE_ACTION_3 : GUID;

external GUID_BATTERY_DISCHARGE_LEVEL_3 : GUID;

external GUID_BATTERY_DISCHARGE_FLAGS_3 : GUID;

external GUID_PROCESSOR_SETTINGS_SUBGROUP : GUID;

external GUID_PROCESSOR_THROTTLE_POLICY : GUID;

external GUID_PROCESSOR_THROTTLE_MAXIMUM : GUID;

external GUID_PROCESSOR_THROTTLE_MINIMUM : GUID;

external GUID_PROCESSOR_ALLOW_THROTTLING : GUID;

external GUID_PROCESSOR_IDLESTATE_POLICY : GUID;

external GUID_PROCESSOR_PERFSTATE_POLICY : GUID;

external GUID_PROCESSOR_PERF_INCREASE_THRESHOLD : GUID;

external GUID_PROCESSOR_PERF_DECREASE_THRESHOLD : GUID;

external GUID_PROCESSOR_PERF_INCREASE_POLICY : GUID;

external GUID_PROCESSOR_PERF_DECREASE_POLICY : GUID;

external GUID_PROCESSOR_PERF_INCREASE_TIME : GUID;

external GUID_PROCESSOR_PERF_DECREASE_TIME : GUID;

external GUID_PROCESSOR_PERF_TIME_CHECK : GUID;

external GUID_PROCESSOR_PERF_BOOST_POLICY : GUID;

external GUID_PROCESSOR_IDLE_ALLOW_SCALING : GUID;

external GUID_PROCESSOR_IDLE_DISABLE : GUID;

external GUID_PROCESSOR_IDLE_TIME_CHECK : GUID;

external GUID_PROCESSOR_IDLE_DEMOTE_THRESHOLD : GUID;

external GUID_PROCESSOR_IDLE_PROMOTE_THRESHOLD : GUID;

external GUID_PROCESSOR_CORE_PARKING_INCREASE_THRESHOLD : GUID;

external GUID_PROCESSOR_CORE_PARKING_DECREASE_THRESHOLD : GUID;

external GUID_PROCESSOR_CORE_PARKING_INCREASE_POLICY : GUID;

external GUID_PROCESSOR_CORE_PARKING_DECREASE_POLICY : GUID;

external GUID_PROCESSOR_CORE_PARKING_MAX_CORES : GUID;

external GUID_PROCESSOR_CORE_PARKING_MIN_CORES : GUID;

external GUID_PROCESSOR_CORE_PARKING_INCREASE_TIME : GUID;

external GUID_PROCESSOR_CORE_PARKING_DECREASE_TIME : GUID;

external GUID_PROCESSOR_CORE_PARKING_AFFINITY_HISTORY_DECREASE_FACTOR : GUID;

external GUID_PROCESSOR_CORE_PARKING_AFFINITY_HISTORY_THRESHOLD : GUID;

external GUID_PROCESSOR_CORE_PARKING_AFFINITY_WEIGHTING : GUID;

external GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_HISTORY_DECREASE_FACTOR : GUID;

external GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_HISTORY_THRESHOLD : GUID;

external GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_WEIGHTING : GUID;

external GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_THRESHOLD : GUID;

external GUID_PROCESSOR_PARKING_CORE_OVERRIDE : GUID;

external GUID_PROCESSOR_PARKING_PERF_STATE : GUID;

external GUID_PROCESSOR_PERF_HISTORY : GUID;

external GUID_SYSTEM_COOLING_POLICY : GUID;

external GUID_LOCK_CONSOLE_ON_WAKE : GUID;

external GUID_DEVICE_IDLE_POLICY : GUID;

external GUID_ACDC_POWER_SOURCE : GUID;

external GUID_LIDSWITCH_STATE_CHANGE : GUID;

external GUID_BATTERY_PERCENTAGE_REMAINING : GUID;

external GUID_IDLE_BACKGROUND_TASK : GUID;

external GUID_BACKGROUND_TASK_NOTIFICATION : GUID;

external GUID_APPLAUNCH_BUTTON : GUID;

external GUID_PCIEXPRESS_SETTINGS_SUBGROUP : GUID;

external GUID_PCIEXPRESS_ASPM_POLICY : GUID;

external GUID_ENABLE_SWITCH_FORCED_SHUTDOWN : GUID;

alias Enum__SYSTEM_POWER_STATE = Int;
alias PowerSystemUnspecified = 0;
alias PowerSystemWorking = 1;
alias PowerSystemSleeping1 = 2;
alias PowerSystemSleeping2 = 3;
alias PowerSystemSleeping3 = 4;
alias PowerSystemHibernate = 5;
alias PowerSystemShutdown = 6;
alias PowerSystemMaximum = 7;

alias SYSTEM_POWER_STATE = Enum__SYSTEM_POWER_STATE;

alias PSYSTEM_POWER_STATE = Pointer[Enum__SYSTEM_POWER_STATE];

alias Enum_Unnamed22 = Int;
alias PowerActionNone = 0;
alias PowerActionReserved = 1;
alias PowerActionSleep = 2;
alias PowerActionHibernate = 3;
alias PowerActionShutdown = 4;
alias PowerActionShutdownReset = 5;
alias PowerActionShutdownOff = 6;
alias PowerActionWarmEject = 7;

alias POWER_ACTION = Enum_Unnamed22;

alias PPOWER_ACTION = Pointer[Enum_Unnamed22];

alias Enum__DEVICE_POWER_STATE = Int;
alias PowerDeviceUnspecified = 0;
alias PowerDeviceD0 = 1;
alias PowerDeviceD1 = 2;
alias PowerDeviceD2 = 3;
alias PowerDeviceD3 = 4;
alias PowerDeviceMaximum = 5;

alias DEVICE_POWER_STATE = Enum__DEVICE_POWER_STATE;

alias PDEVICE_POWER_STATE = Pointer[Enum__DEVICE_POWER_STATE];

alias Enum__MONITOR_DISPLAY_STATE = Int;
alias PowerMonitorOff = 0;
alias PowerMonitorOn = 1;
alias PowerMonitorDim = 2;

alias MONITOR_DISPLAY_STATE = Enum__MONITOR_DISPLAY_STATE;

alias PMONITOR_DISPLAY_STATE = Pointer[Enum__MONITOR_DISPLAY_STATE];

alias EXECUTION_STATE = DWORD;

alias PEXECUTION_STATE = Pointer[DWORD];

alias Enum_Unnamed23 = Int;
alias LT_DONT_CARE = 0;
alias LT_LOWEST_LATENCY = 1;

alias LATENCY_TIME = Enum_Unnamed23;

alias Enum__POWER_REQUEST_TYPE = Int;
alias PowerRequestDisplayRequired = 0;
alias PowerRequestSystemRequired = 1;
alias PowerRequestAwayModeRequired = 2;

alias POWER_REQUEST_TYPE = Enum__POWER_REQUEST_TYPE;

alias PPOWER_REQUEST_TYPE = Pointer[Enum__POWER_REQUEST_TYPE];

record Struct_CM_Power_Data_s (
    PD_Size : DWORD,
    PD_MostRecentPowerState : DEVICE_POWER_STATE,
    PD_Capabilities : DWORD,
    PD_D1Latency : DWORD,
    PD_D2Latency : DWORD,
    PD_D3Latency : DWORD,
    PD_PowerStateMapping : Array[DEVICE_POWER_STATE, 7],
    PD_DeepestSystemWake : SYSTEM_POWER_STATE,
);

alias CM_POWER_DATA = Struct_CM_Power_Data_s;

alias PCM_POWER_DATA = Pointer[Struct_CM_Power_Data_s];

alias Enum_Unnamed24 = Int;
alias SystemPowerPolicyAc = 0;
alias SystemPowerPolicyDc = 1;
alias VerifySystemPolicyAc = 2;
alias VerifySystemPolicyDc = 3;
alias SystemPowerCapabilities = 4;
alias SystemBatteryState = 5;
alias SystemPowerStateHandler = 6;
alias ProcessorStateHandler = 7;
alias SystemPowerPolicyCurrent = 8;
alias AdministratorPowerPolicy = 9;
alias SystemReserveHiberFile = 10;
alias ProcessorInformation = 11;
alias SystemPowerInformation = 12;
alias ProcessorStateHandler2 = 13;
alias LastWakeTime = 14;
alias LastSleepTime = 15;
alias SystemExecutionState = 16;
alias SystemPowerStateNotifyHandler = 17;
alias ProcessorPowerPolicyAc = 18;
alias ProcessorPowerPolicyDc = 19;
alias VerifyProcessorPowerPolicyAc = 20;
alias VerifyProcessorPowerPolicyDc = 21;
alias ProcessorPowerPolicyCurrent = 22;
alias SystemPowerStateLogging = 23;
alias SystemPowerLoggingEntry = 24;
alias SetPowerSettingValue = 25;
alias NotifyUserPowerSetting = 26;
alias PowerInformationLevelUnused0 = 27;
alias PowerInformationLevelUnused1 = 28;
alias SystemVideoState = 29;
alias TraceApplicationPowerMessage = 30;
alias TraceApplicationPowerMessageEnd = 31;
alias ProcessorPerfStates = 32;
alias ProcessorIdleStates = 33;
alias ProcessorCap = 34;
alias SystemWakeSource = 35;
alias SystemHiberFileInformation = 36;
alias TraceServicePowerMessage = 37;
alias ProcessorLoad = 38;
alias PowerShutdownNotification = 39;
alias MonitorCapabilities = 40;
alias SessionPowerInit = 41;
alias SessionDisplayState = 42;
alias PowerRequestCreate = 43;
alias PowerRequestAction = 44;
alias GetPowerRequestList = 45;
alias ProcessorInformationEx = 46;
alias NotifyUserModeLegacyPowerEvent = 47;
alias GroupPark = 48;
alias ProcessorIdleDomains = 49;
alias WakeTimerList = 50;
alias SystemHiberFileSize = 51;
alias PowerInformationLevelMaximum = 52;

alias POWER_INFORMATION_LEVEL = Enum_Unnamed24;

alias Enum_Unnamed25 = Int;
alias PoAc = 0;
alias PoDc = 1;
alias PoHot = 2;
alias PoConditionMaximum = 3;

alias SYSTEM_POWER_CONDITION = Enum_Unnamed25;

record Struct_Unnamed26 (
    Version : DWORD,
    Guid : GUID,
    PowerCondition : SYSTEM_POWER_CONDITION,
    DataLength : DWORD,
    Data : Array[BYTE, 1],
);

alias SET_POWER_SETTING_VALUE = Struct_Unnamed26;

alias PSET_POWER_SETTING_VALUE = Pointer[Struct_Unnamed26];

record Struct_Unnamed27 (
    Guid : GUID,
);

alias NOTIFY_USER_POWER_SETTING = Struct_Unnamed27;

alias PNOTIFY_USER_POWER_SETTING = Pointer[Struct_Unnamed27];

record Struct__APPLICATIONLAUNCH_SETTING_VALUE (
    ActivationTime : LARGE_INTEGER,
    Flags : DWORD,
    ButtonInstanceID : DWORD,
);

alias APPLICATIONLAUNCH_SETTING_VALUE = Struct__APPLICATIONLAUNCH_SETTING_VALUE;

alias PAPPLICATIONLAUNCH_SETTING_VALUE = Pointer[Struct__APPLICATIONLAUNCH_SETTING_VALUE];

alias Enum_Unnamed28 = Int;
alias PlatformRoleUnspecified = 0;
alias PlatformRoleDesktop = 1;
alias PlatformRoleMobile = 2;
alias PlatformRoleWorkstation = 3;
alias PlatformRoleEnterpriseServer = 4;
alias PlatformRoleSOHOServer = 5;
alias PlatformRoleAppliancePC = 6;
alias PlatformRolePerformanceServer = 7;
alias PlatformRoleMaximum = 8;

alias POWER_PLATFORM_ROLE = Enum_Unnamed28;

record Struct_Unnamed29 (
    Granularity : DWORD,
    Capacity : DWORD,
);

alias BATTERY_REPORTING_SCALE = Struct_Unnamed29;

alias PBATTERY_REPORTING_SCALE = Pointer[Struct_Unnamed29];

record Struct_Unnamed30 (
    Frequency : DWORD,
    Flags : DWORD,
    PercentFrequency : DWORD,
);

alias PPM_WMI_LEGACY_PERFSTATE = Struct_Unnamed30;

alias PPPM_WMI_LEGACY_PERFSTATE = Pointer[Struct_Unnamed30];

record Struct_Unnamed31 (
    Latency : DWORD,
    Power : DWORD,
    TimeCheck : DWORD,
    PromotePercent : BYTE,
    DemotePercent : BYTE,
    StateType : BYTE,
    Reserved : BYTE,
    StateFlags : DWORD,
    Context : DWORD,
    IdleHandler : DWORD,
    Reserved1 : DWORD,
);

alias PPM_WMI_IDLE_STATE = Struct_Unnamed31;

alias PPPM_WMI_IDLE_STATE = Pointer[Struct_Unnamed31];

record Struct_Unnamed32 (
    Type : DWORD,
    Count : DWORD,
    TargetState : DWORD,
    OldState : DWORD,
    TargetProcessors : DWORD64,
    State : Array[PPM_WMI_IDLE_STATE, 1],
);

alias PPM_WMI_IDLE_STATES = Struct_Unnamed32;

alias PPPM_WMI_IDLE_STATES = Pointer[Struct_Unnamed32];

record Struct_Unnamed33 (
    Type : DWORD,
    Count : DWORD,
    TargetState : DWORD,
    OldState : DWORD,
    TargetProcessors : PVOID,
    State : Array[PPM_WMI_IDLE_STATE, 1],
);

alias PPM_WMI_IDLE_STATES_EX = Struct_Unnamed33;

alias PPPM_WMI_IDLE_STATES_EX = Pointer[Struct_Unnamed33];

record Struct_Unnamed34 (
    Frequency : DWORD,
    Power : DWORD,
    PercentFrequency : BYTE,
    IncreaseLevel : BYTE,
    DecreaseLevel : BYTE,
    Type : BYTE,
    IncreaseTime : DWORD,
    DecreaseTime : DWORD,
    Control : DWORD64,
    Status : DWORD64,
    HitCount : DWORD,
    Reserved1 : DWORD,
    Reserved2 : DWORD64,
    Reserved3 : DWORD64,
);

alias PPM_WMI_PERF_STATE = Struct_Unnamed34;

alias PPPM_WMI_PERF_STATE = Pointer[Struct_Unnamed34];

record Struct_Unnamed35 (
    Count : DWORD,
    MaxFrequency : DWORD,
    CurrentState : DWORD,
    MaxPerfState : DWORD,
    MinPerfState : DWORD,
    LowestPerfState : DWORD,
    ThermalConstraint : DWORD,
    BusyAdjThreshold : BYTE,
    PolicyType : BYTE,
    Type : BYTE,
    Reserved : BYTE,
    TimerInterval : DWORD,
    TargetProcessors : DWORD64,
    PStateHandler : DWORD,
    PStateContext : DWORD,
    TStateHandler : DWORD,
    TStateContext : DWORD,
    FeedbackHandler : DWORD,
    Reserved1 : DWORD,
    Reserved2 : DWORD64,
    State : Array[PPM_WMI_PERF_STATE, 1],
);

alias PPM_WMI_PERF_STATES = Struct_Unnamed35;

alias PPPM_WMI_PERF_STATES = Pointer[Struct_Unnamed35];

record Struct_Unnamed36 (
    Count : DWORD,
    MaxFrequency : DWORD,
    CurrentState : DWORD,
    MaxPerfState : DWORD,
    MinPerfState : DWORD,
    LowestPerfState : DWORD,
    ThermalConstraint : DWORD,
    BusyAdjThreshold : BYTE,
    PolicyType : BYTE,
    Type : BYTE,
    Reserved : BYTE,
    TimerInterval : DWORD,
    TargetProcessors : PVOID,
    PStateHandler : DWORD,
    PStateContext : DWORD,
    TStateHandler : DWORD,
    TStateContext : DWORD,
    FeedbackHandler : DWORD,
    Reserved1 : DWORD,
    Reserved2 : DWORD64,
    State : Array[PPM_WMI_PERF_STATE, 1],
);

alias PPM_WMI_PERF_STATES_EX = Struct_Unnamed36;

alias PPPM_WMI_PERF_STATES_EX = Pointer[Struct_Unnamed36];

record Struct_Unnamed37 (
    IdleTransitions : DWORD,
    FailedTransitions : DWORD,
    InvalidBucketIndex : DWORD,
    TotalTime : DWORD64,
    IdleTimeBuckets : Array[DWORD, 6],
);

alias PPM_IDLE_STATE_ACCOUNTING = Struct_Unnamed37;

alias PPPM_IDLE_STATE_ACCOUNTING = Pointer[Struct_Unnamed37];

record Struct_Unnamed38 (
    StateCount : DWORD,
    TotalTransitions : DWORD,
    ResetCount : DWORD,
    StartTime : DWORD64,
    State : Array[PPM_IDLE_STATE_ACCOUNTING, 1],
);

alias PPM_IDLE_ACCOUNTING = Struct_Unnamed38;

alias PPPM_IDLE_ACCOUNTING = Pointer[Struct_Unnamed38];

record Struct_Unnamed39 (
    TotalTimeUs : DWORD64,
    MinTimeUs : DWORD,
    MaxTimeUs : DWORD,
    Count : DWORD,
);

alias PPM_IDLE_STATE_BUCKET_EX = Struct_Unnamed39;

alias PPPM_IDLE_STATE_BUCKET_EX = Pointer[Struct_Unnamed39];

record Struct_Unnamed40 (
    TotalTime : DWORD64,
    IdleTransitions : DWORD,
    FailedTransitions : DWORD,
    InvalidBucketIndex : DWORD,
    MinTimeUs : DWORD,
    MaxTimeUs : DWORD,
    IdleTimeBuckets : Array[PPM_IDLE_STATE_BUCKET_EX, 16],
);

alias PPM_IDLE_STATE_ACCOUNTING_EX = Struct_Unnamed40;

alias PPPM_IDLE_STATE_ACCOUNTING_EX = Pointer[Struct_Unnamed40];

record Struct_Unnamed41 (
    StateCount : DWORD,
    TotalTransitions : DWORD,
    ResetCount : DWORD,
    StartTime : DWORD64,
    State : Array[PPM_IDLE_STATE_ACCOUNTING_EX, 1],
);

alias PPM_IDLE_ACCOUNTING_EX = Struct_Unnamed41;

alias PPPM_IDLE_ACCOUNTING_EX = Pointer[Struct_Unnamed41];

external PPM_PERFSTATE_CHANGE_GUID : GUID;

external PPM_PERFSTATE_DOMAIN_CHANGE_GUID : GUID;

external PPM_IDLESTATE_CHANGE_GUID : GUID;

external PPM_PERFSTATES_DATA_GUID : GUID;

external PPM_IDLESTATES_DATA_GUID : GUID;

external PPM_IDLE_ACCOUNTING_GUID : GUID;

external PPM_IDLE_ACCOUNTING_EX_GUID : GUID;

external PPM_THERMALCONSTRAINT_GUID : GUID;

external PPM_PERFMON_PERFSTATE_GUID : GUID;

external PPM_THERMAL_POLICY_CHANGE_GUID : GUID;

record Struct_Unnamed42 (
    State : DWORD,
    Status : DWORD,
    Latency : DWORD,
    Speed : DWORD,
    Processor : DWORD,
);

alias PPM_PERFSTATE_EVENT = Struct_Unnamed42;

alias PPPM_PERFSTATE_EVENT = Pointer[Struct_Unnamed42];

record Struct_Unnamed43 (
    State : DWORD,
    Latency : DWORD,
    Speed : DWORD,
    Processors : DWORD64,
);

alias PPM_PERFSTATE_DOMAIN_EVENT = Struct_Unnamed43;

alias PPPM_PERFSTATE_DOMAIN_EVENT = Pointer[Struct_Unnamed43];

record Struct_Unnamed44 (
    NewState : DWORD,
    OldState : DWORD,
    Processors : DWORD64,
);

alias PPM_IDLESTATE_EVENT = Struct_Unnamed44;

alias PPPM_IDLESTATE_EVENT = Pointer[Struct_Unnamed44];

record Struct_Unnamed45 (
    ThermalConstraint : DWORD,
    Processors : DWORD64,
);

alias PPM_THERMALCHANGE_EVENT = Struct_Unnamed45;

alias PPPM_THERMALCHANGE_EVENT = Pointer[Struct_Unnamed45];

record Struct_Unnamed46 (
    Mode : BYTE,
    Processors : DWORD64,
);

alias PPM_THERMAL_POLICY_EVENT = Struct_Unnamed46;

alias PPPM_THERMAL_POLICY_EVENT = Pointer[Struct_Unnamed46];

record Struct_Unnamed47 (
    Action : POWER_ACTION,
    Flags : DWORD,
    EventCode : DWORD,
);

alias POWER_ACTION_POLICY = Struct_Unnamed47;

alias PPOWER_ACTION_POLICY = Pointer[Struct_Unnamed47];

record Struct_Unnamed48 (
    Enable : BOOLEAN,
    Spare : Array[BYTE, 3],
    BatteryLevel : DWORD,
    PowerPolicy : POWER_ACTION_POLICY,
    MinSystemState : SYSTEM_POWER_STATE,
);

alias SYSTEM_POWER_LEVEL = Struct_Unnamed48;

alias PSYSTEM_POWER_LEVEL = Pointer[Struct_Unnamed48];

record Struct__SYSTEM_POWER_POLICY (
    Revision : DWORD,
    PowerButton : POWER_ACTION_POLICY,
    SleepButton : POWER_ACTION_POLICY,
    LidClose : POWER_ACTION_POLICY,
    LidOpenWake : SYSTEM_POWER_STATE,
    Reserved : DWORD,
    Idle : POWER_ACTION_POLICY,
    IdleTimeout : DWORD,
    IdleSensitivity : BYTE,
    DynamicThrottle : BYTE,
    Spare2 : Array[BYTE, 2],
    MinSleep : SYSTEM_POWER_STATE,
    MaxSleep : SYSTEM_POWER_STATE,
    ReducedLatencySleep : SYSTEM_POWER_STATE,
    WinLogonFlags : DWORD,
    Spare3 : DWORD,
    DozeS4Timeout : DWORD,
    BroadcastCapacityResolution : DWORD,
    DischargePolicy : Array[SYSTEM_POWER_LEVEL, 4],
    VideoTimeout : DWORD,
    VideoDimDisplay : BOOLEAN,
    VideoReserved : Array[DWORD, 3],
    SpindownTimeout : DWORD,
    OptimizeForPower : BOOLEAN,
    FanThrottleTolerance : BYTE,
    ForcedThrottle : BYTE,
    MinThrottle : BYTE,
    OverThrottled : POWER_ACTION_POLICY,
);

alias SYSTEM_POWER_POLICY = Struct__SYSTEM_POWER_POLICY;

alias PSYSTEM_POWER_POLICY = Pointer[Struct__SYSTEM_POWER_POLICY];

record Struct_Unnamed49 (
    TimeCheck : DWORD,
    DemotePercent : BYTE,
    PromotePercent : BYTE,
    Spare : Array[BYTE, 2],
);

alias PROCESSOR_IDLESTATE_INFO = Struct_Unnamed49;

alias PPROCESSOR_IDLESTATE_INFO = Pointer[Struct_Unnamed49];

record Struct_Unnamed50 (
    Revision : WORD,
    Flags : Union_Unnamed51,
    PolicyCount : DWORD,
    Policy : Array[PROCESSOR_IDLESTATE_INFO, 3],
);

alias Union_Unnamed51 = Union[
    /* AsWORD */ WORD,
];

record Struct_Unnamed52 (
    AllowScaling : WORD,
    Disabled : WORD,
    Reserved : WORD,
);

alias PROCESSOR_IDLESTATE_POLICY = Struct_Unnamed50;

alias PPROCESSOR_IDLESTATE_POLICY = Pointer[Struct_Unnamed50];

record Struct__PROCESSOR_POWER_POLICY_INFO (
    TimeCheck : DWORD,
    DemoteLimit : DWORD,
    PromoteLimit : DWORD,
    DemotePercent : BYTE,
    PromotePercent : BYTE,
    Spare : Array[BYTE, 2],
    AllowDemotion : DWORD,
    AllowPromotion : DWORD,
    Reserved : DWORD,
);

alias PROCESSOR_POWER_POLICY_INFO = Struct__PROCESSOR_POWER_POLICY_INFO;

alias PPROCESSOR_POWER_POLICY_INFO = Pointer[Struct__PROCESSOR_POWER_POLICY_INFO];

record Struct__PROCESSOR_POWER_POLICY (
    Revision : DWORD,
    DynamicThrottle : BYTE,
    Spare : Array[BYTE, 3],
    DisableCStates : DWORD,
    Reserved : DWORD,
    PolicyCount : DWORD,
    Policy : Array[PROCESSOR_POWER_POLICY_INFO, 3],
);

alias PROCESSOR_POWER_POLICY = Struct__PROCESSOR_POWER_POLICY;

alias PPROCESSOR_POWER_POLICY = Pointer[Struct__PROCESSOR_POWER_POLICY];

record Struct_Unnamed53 (
    Revision : DWORD,
    MaxThrottle : BYTE,
    MinThrottle : BYTE,
    BusyAdjThreshold : BYTE,
    TimeCheck : DWORD,
    IncreaseTime : DWORD,
    DecreaseTime : DWORD,
    IncreasePercent : DWORD,
    DecreasePercent : DWORD,
);

alias Union_Unnamed54 = Union[
    /* Spare */ BYTE,
    /* Flags */ Union_Unnamed55,
];

alias Union_Unnamed55 = Union[
    /* AsBYTE */ BYTE,
];

record Struct_Unnamed56 (
    NoDomainAccounting : BYTE,
    IncreasePolicy : BYTE,
    DecreasePolicy : BYTE,
    Reserved : BYTE,
);

alias PROCESSOR_PERFSTATE_POLICY = Struct_Unnamed53;

alias PPROCESSOR_PERFSTATE_POLICY = Pointer[Struct_Unnamed53];

record Struct__ADMINISTRATOR_POWER_POLICY (
    MinSleep : SYSTEM_POWER_STATE,
    MaxSleep : SYSTEM_POWER_STATE,
    MinVideoTimeout : DWORD,
    MaxVideoTimeout : DWORD,
    MinSpindownTimeout : DWORD,
    MaxSpindownTimeout : DWORD,
);

alias ADMINISTRATOR_POWER_POLICY = Struct__ADMINISTRATOR_POWER_POLICY;

alias PADMINISTRATOR_POWER_POLICY = Pointer[Struct__ADMINISTRATOR_POWER_POLICY];

record Struct_Unnamed57 (
    PowerButtonPresent : BOOLEAN,
    SleepButtonPresent : BOOLEAN,
    LidPresent : BOOLEAN,
    SystemS1 : BOOLEAN,
    SystemS2 : BOOLEAN,
    SystemS3 : BOOLEAN,
    SystemS4 : BOOLEAN,
    SystemS5 : BOOLEAN,
    HiberFilePresent : BOOLEAN,
    FullWake : BOOLEAN,
    VideoDimPresent : BOOLEAN,
    ApmPresent : BOOLEAN,
    UpsPresent : BOOLEAN,
    ThermalControl : BOOLEAN,
    ProcessorThrottle : BOOLEAN,
    ProcessorMinThrottle : BYTE,
    ProcessorMaxThrottle : BYTE,
    FastSystemS4 : BOOLEAN,
    spare2 : Array[BYTE, 3],
    DiskSpinDown : BOOLEAN,
    spare3 : Array[BYTE, 8],
    SystemBatteriesPresent : BOOLEAN,
    BatteriesAreShortTerm : BOOLEAN,
    BatteryScale : Array[BATTERY_REPORTING_SCALE, 3],
    AcOnLineWake : SYSTEM_POWER_STATE,
    SoftLidWake : SYSTEM_POWER_STATE,
    RtcWake : SYSTEM_POWER_STATE,
    MinDeviceWakeState : SYSTEM_POWER_STATE,
    DefaultLowLatencyWake : SYSTEM_POWER_STATE,
);

alias SYSTEM_POWER_CAPABILITIES = Struct_Unnamed57;

alias PSYSTEM_POWER_CAPABILITIES = Pointer[Struct_Unnamed57];

record Struct_Unnamed58 (
    AcOnLine : BOOLEAN,
    BatteryPresent : BOOLEAN,
    Charging : BOOLEAN,
    Discharging : BOOLEAN,
    Spare1 : Array[BOOLEAN, 4],
    MaxCapacity : DWORD,
    RemainingCapacity : DWORD,
    Rate : DWORD,
    EstimatedTime : DWORD,
    DefaultAlert1 : DWORD,
    DefaultAlert2 : DWORD,
);

alias SYSTEM_BATTERY_STATE = Struct_Unnamed58;

alias PSYSTEM_BATTERY_STATE = Pointer[Struct_Unnamed58];

record Struct__IMAGE_DOS_HEADER (
    e_magic : WORD,
    e_cblp : WORD,
    e_cp : WORD,
    e_crlc : WORD,
    e_cparhdr : WORD,
    e_minalloc : WORD,
    e_maxalloc : WORD,
    e_ss : WORD,
    e_sp : WORD,
    e_csum : WORD,
    e_ip : WORD,
    e_cs : WORD,
    e_lfarlc : WORD,
    e_ovno : WORD,
    e_res : Array[WORD, 4],
    e_oemid : WORD,
    e_oeminfo : WORD,
    e_res2 : Array[WORD, 10],
    e_lfanew : LONG,
);

alias IMAGE_DOS_HEADER = Struct__IMAGE_DOS_HEADER;

alias PIMAGE_DOS_HEADER = Pointer[Struct__IMAGE_DOS_HEADER];

record Struct__IMAGE_OS2_HEADER (
    ne_magic : WORD,
    ne_ver : CHAR,
    ne_rev : CHAR,
    ne_enttab : WORD,
    ne_cbenttab : WORD,
    ne_crc : LONG,
    ne_flags : WORD,
    ne_autodata : WORD,
    ne_heap : WORD,
    ne_stack : WORD,
    ne_csip : LONG,
    ne_sssp : LONG,
    ne_cseg : WORD,
    ne_cmod : WORD,
    ne_cbnrestab : WORD,
    ne_segtab : WORD,
    ne_rsrctab : WORD,
    ne_restab : WORD,
    ne_modtab : WORD,
    ne_imptab : WORD,
    ne_nrestab : LONG,
    ne_cmovent : WORD,
    ne_align : WORD,
    ne_cres : WORD,
    ne_exetyp : BYTE,
    ne_flagsothers : BYTE,
    ne_pretthunks : WORD,
    ne_psegrefbytes : WORD,
    ne_swaparea : WORD,
    ne_expver : WORD,
);

alias IMAGE_OS2_HEADER = Struct__IMAGE_OS2_HEADER;

alias PIMAGE_OS2_HEADER = Pointer[Struct__IMAGE_OS2_HEADER];

record Struct__IMAGE_VXD_HEADER (
    e32_magic : WORD,
    e32_border : BYTE,
    e32_worder : BYTE,
    e32_level : DWORD,
    e32_cpu : WORD,
    e32_os : WORD,
    e32_ver : DWORD,
    e32_mflags : DWORD,
    e32_mpages : DWORD,
    e32_startobj : DWORD,
    e32_eip : DWORD,
    e32_stackobj : DWORD,
    e32_esp : DWORD,
    e32_pagesize : DWORD,
    e32_lastpagesize : DWORD,
    e32_fixupsize : DWORD,
    e32_fixupsum : DWORD,
    e32_ldrsize : DWORD,
    e32_ldrsum : DWORD,
    e32_objtab : DWORD,
    e32_objcnt : DWORD,
    e32_objmap : DWORD,
    e32_itermap : DWORD,
    e32_rsrctab : DWORD,
    e32_rsrccnt : DWORD,
    e32_restab : DWORD,
    e32_enttab : DWORD,
    e32_dirtab : DWORD,
    e32_dircnt : DWORD,
    e32_fpagetab : DWORD,
    e32_frectab : DWORD,
    e32_impmod : DWORD,
    e32_impmodcnt : DWORD,
    e32_impproc : DWORD,
    e32_pagesum : DWORD,
    e32_datapage : DWORD,
    e32_preload : DWORD,
    e32_nrestab : DWORD,
    e32_cbnrestab : DWORD,
    e32_nressum : DWORD,
    e32_autodata : DWORD,
    e32_debuginfo : DWORD,
    e32_debuglen : DWORD,
    e32_instpreload : DWORD,
    e32_instdemand : DWORD,
    e32_heapsize : DWORD,
    e32_res3 : Array[BYTE, 12],
    e32_winresoff : DWORD,
    e32_winreslen : DWORD,
    e32_devid : WORD,
    e32_ddkver : WORD,
);

alias IMAGE_VXD_HEADER = Struct__IMAGE_VXD_HEADER;

alias PIMAGE_VXD_HEADER = Pointer[Struct__IMAGE_VXD_HEADER];

record Struct__IMAGE_FILE_HEADER (
    Machine : WORD,
    NumberOfSections : WORD,
    TimeDateStamp : DWORD,
    PointerToSymbolTable : DWORD,
    NumberOfSymbols : DWORD,
    SizeOfOptionalHeader : WORD,
    Characteristics : WORD,
);

alias IMAGE_FILE_HEADER = Struct__IMAGE_FILE_HEADER;

alias PIMAGE_FILE_HEADER = Pointer[Struct__IMAGE_FILE_HEADER];

record Struct__IMAGE_DATA_DIRECTORY (
    VirtualAddress : DWORD,
    Size : DWORD,
);

alias IMAGE_DATA_DIRECTORY = Struct__IMAGE_DATA_DIRECTORY;

alias PIMAGE_DATA_DIRECTORY = Pointer[Struct__IMAGE_DATA_DIRECTORY];

record Struct__IMAGE_OPTIONAL_HEADER (
    Magic : WORD,
    MajorLinkerVersion : BYTE,
    MinorLinkerVersion : BYTE,
    SizeOfCode : DWORD,
    SizeOfInitializedData : DWORD,
    SizeOfUninitializedData : DWORD,
    AddressOfEntryPoint : DWORD,
    BaseOfCode : DWORD,
    BaseOfData : DWORD,
    ImageBase : DWORD,
    SectionAlignment : DWORD,
    FileAlignment : DWORD,
    MajorOperatingSystemVersion : WORD,
    MinorOperatingSystemVersion : WORD,
    MajorImageVersion : WORD,
    MinorImageVersion : WORD,
    MajorSubsystemVersion : WORD,
    MinorSubsystemVersion : WORD,
    Win32VersionValue : DWORD,
    SizeOfImage : DWORD,
    SizeOfHeaders : DWORD,
    CheckSum : DWORD,
    Subsystem : WORD,
    DllCharacteristics : WORD,
    SizeOfStackReserve : DWORD,
    SizeOfStackCommit : DWORD,
    SizeOfHeapReserve : DWORD,
    SizeOfHeapCommit : DWORD,
    LoaderFlags : DWORD,
    NumberOfRvaAndSizes : DWORD,
    DataDirectory : Array[IMAGE_DATA_DIRECTORY, 16],
);

alias IMAGE_OPTIONAL_HEADER32 = Struct__IMAGE_OPTIONAL_HEADER;

alias PIMAGE_OPTIONAL_HEADER32 = Pointer[Struct__IMAGE_OPTIONAL_HEADER];

record Struct__IMAGE_ROM_OPTIONAL_HEADER (
    Magic : WORD,
    MajorLinkerVersion : BYTE,
    MinorLinkerVersion : BYTE,
    SizeOfCode : DWORD,
    SizeOfInitializedData : DWORD,
    SizeOfUninitializedData : DWORD,
    AddressOfEntryPoint : DWORD,
    BaseOfCode : DWORD,
    BaseOfData : DWORD,
    BaseOfBss : DWORD,
    GprMask : DWORD,
    CprMask : Array[DWORD, 4],
    GpValue : DWORD,
);

alias IMAGE_ROM_OPTIONAL_HEADER = Struct__IMAGE_ROM_OPTIONAL_HEADER;

alias PIMAGE_ROM_OPTIONAL_HEADER = Pointer[Struct__IMAGE_ROM_OPTIONAL_HEADER];

record Struct__IMAGE_OPTIONAL_HEADER64 (
    Magic : WORD,
    MajorLinkerVersion : BYTE,
    MinorLinkerVersion : BYTE,
    SizeOfCode : DWORD,
    SizeOfInitializedData : DWORD,
    SizeOfUninitializedData : DWORD,
    AddressOfEntryPoint : DWORD,
    BaseOfCode : DWORD,
    ImageBase : ULONGLONG,
    SectionAlignment : DWORD,
    FileAlignment : DWORD,
    MajorOperatingSystemVersion : WORD,
    MinorOperatingSystemVersion : WORD,
    MajorImageVersion : WORD,
    MinorImageVersion : WORD,
    MajorSubsystemVersion : WORD,
    MinorSubsystemVersion : WORD,
    Win32VersionValue : DWORD,
    SizeOfImage : DWORD,
    SizeOfHeaders : DWORD,
    CheckSum : DWORD,
    Subsystem : WORD,
    DllCharacteristics : WORD,
    SizeOfStackReserve : ULONGLONG,
    SizeOfStackCommit : ULONGLONG,
    SizeOfHeapReserve : ULONGLONG,
    SizeOfHeapCommit : ULONGLONG,
    LoaderFlags : DWORD,
    NumberOfRvaAndSizes : DWORD,
    DataDirectory : Array[IMAGE_DATA_DIRECTORY, 16],
);

alias IMAGE_OPTIONAL_HEADER64 = Struct__IMAGE_OPTIONAL_HEADER64;

alias PIMAGE_OPTIONAL_HEADER64 = Pointer[Struct__IMAGE_OPTIONAL_HEADER64];

alias IMAGE_OPTIONAL_HEADER = IMAGE_OPTIONAL_HEADER32;

alias PIMAGE_OPTIONAL_HEADER = PIMAGE_OPTIONAL_HEADER32;

record Struct__IMAGE_NT_HEADERS64 (
    Signature : DWORD,
    FileHeader : IMAGE_FILE_HEADER,
    OptionalHeader : IMAGE_OPTIONAL_HEADER64,
);

alias IMAGE_NT_HEADERS64 = Struct__IMAGE_NT_HEADERS64;

alias PIMAGE_NT_HEADERS64 = Pointer[Struct__IMAGE_NT_HEADERS64];

record Struct__IMAGE_NT_HEADERS (
    Signature : DWORD,
    FileHeader : IMAGE_FILE_HEADER,
    OptionalHeader : IMAGE_OPTIONAL_HEADER32,
);

alias IMAGE_NT_HEADERS32 = Struct__IMAGE_NT_HEADERS;

alias PIMAGE_NT_HEADERS32 = Pointer[Struct__IMAGE_NT_HEADERS];

record Struct__IMAGE_ROM_HEADERS (
    FileHeader : IMAGE_FILE_HEADER,
    OptionalHeader : IMAGE_ROM_OPTIONAL_HEADER,
);

alias IMAGE_ROM_HEADERS = Struct__IMAGE_ROM_HEADERS;

alias PIMAGE_ROM_HEADERS = Pointer[Struct__IMAGE_ROM_HEADERS];

alias IMAGE_NT_HEADERS = IMAGE_NT_HEADERS32;

alias PIMAGE_NT_HEADERS = PIMAGE_NT_HEADERS32;

record Struct_ANON_OBJECT_HEADER (
    Sig1 : WORD,
    Sig2 : WORD,
    Version : WORD,
    Machine : WORD,
    TimeDateStamp : DWORD,
    ClassID : CLSID,
    SizeOfData : DWORD,
);

alias ANON_OBJECT_HEADER = Struct_ANON_OBJECT_HEADER;

record Struct_ANON_OBJECT_HEADER_V2 (
    Sig1 : WORD,
    Sig2 : WORD,
    Version : WORD,
    Machine : WORD,
    TimeDateStamp : DWORD,
    ClassID : CLSID,
    SizeOfData : DWORD,
    Flags : DWORD,
    MetaDataSize : DWORD,
    MetaDataOffset : DWORD,
);

alias ANON_OBJECT_HEADER_V2 = Struct_ANON_OBJECT_HEADER_V2;

record Struct_ANON_OBJECT_HEADER_BIGOBJ (
    Sig1 : WORD,
    Sig2 : WORD,
    Version : WORD,
    Machine : WORD,
    TimeDateStamp : DWORD,
    ClassID : CLSID,
    SizeOfData : DWORD,
    Flags : DWORD,
    MetaDataSize : DWORD,
    MetaDataOffset : DWORD,
    NumberOfSections : DWORD,
    PointerToSymbolTable : DWORD,
    NumberOfSymbols : DWORD,
);

alias ANON_OBJECT_HEADER_BIGOBJ = Struct_ANON_OBJECT_HEADER_BIGOBJ;

record Struct__IMAGE_SECTION_HEADER (
    Name : Array[BYTE, 8],
    Misc : Union_Unnamed59,
    VirtualAddress : DWORD,
    SizeOfRawData : DWORD,
    PointerToRawData : DWORD,
    PointerToRelocations : DWORD,
    PointerToLinenumbers : DWORD,
    NumberOfRelocations : WORD,
    NumberOfLinenumbers : WORD,
    Characteristics : DWORD,
);

alias Union_Unnamed59 = Union[
    /* PhysicalAddress */ DWORD,
    /* VirtualSize */ DWORD,
];

alias IMAGE_SECTION_HEADER = Struct__IMAGE_SECTION_HEADER;

alias PIMAGE_SECTION_HEADER = Pointer[Struct__IMAGE_SECTION_HEADER];

record Struct__IMAGE_SYMBOL (
    N : Union_Unnamed60,
    Value : DWORD,
    SectionNumber : SHORT,
    Type : WORD,
    StorageClass : BYTE,
    NumberOfAuxSymbols : BYTE,
);

alias Union_Unnamed60 = Union[
    /* ShortName */ Array[BYTE, 8],
    /* Name */ Struct_Unnamed61,
    /* LongName */ Array[DWORD, 2],
];

record Struct_Unnamed61 (
    Short : DWORD,
    Long : DWORD,
);

alias IMAGE_SYMBOL = Struct__IMAGE_SYMBOL;

alias PIMAGE_SYMBOL = Pointer[IMAGE_SYMBOL];

record Struct__IMAGE_SYMBOL_EX (
    N : Union_Unnamed62,
    Value : DWORD,
    SectionNumber : LONG,
    Type : WORD,
    StorageClass : BYTE,
    NumberOfAuxSymbols : BYTE,
);

alias Union_Unnamed62 = Union[
    /* ShortName */ Array[BYTE, 8],
    /* Name */ Struct_Unnamed63,
    /* LongName */ Array[DWORD, 2],
];

record Struct_Unnamed63 (
    Short : DWORD,
    Long : DWORD,
);

alias IMAGE_SYMBOL_EX = Struct__IMAGE_SYMBOL_EX;

alias PIMAGE_SYMBOL_EX = Pointer[IMAGE_SYMBOL_EX];

record Struct_IMAGE_AUX_SYMBOL_TOKEN_DEF (
    bAuxType : BYTE,
    bReserved : BYTE,
    SymbolTableIndex : DWORD,
    rgbReserved : Array[BYTE, 12],
);

alias IMAGE_AUX_SYMBOL_TOKEN_DEF = Struct_IMAGE_AUX_SYMBOL_TOKEN_DEF;

alias PIMAGE_AUX_SYMBOL_TOKEN_DEF = Pointer[IMAGE_AUX_SYMBOL_TOKEN_DEF];

alias Union__IMAGE_AUX_SYMBOL = Union[
    /* Sym */ Struct_Unnamed64,
    /* File */ Struct_Unnamed65,
    /* Section */ Struct_Unnamed66,
    /* TokenDef */ IMAGE_AUX_SYMBOL_TOKEN_DEF,
    /* CRC */ Struct_Unnamed67,
];

record Struct_Unnamed64 (
    TagIndex : DWORD,
    Misc : Union_Unnamed68,
    FcnAry : Union_Unnamed69,
    TvIndex : WORD,
);

alias Union_Unnamed68 = Union[
    /* LnSz */ Struct_Unnamed70,
    /* TotalSize */ DWORD,
];

record Struct_Unnamed70 (
    Linenumber : WORD,
    Size : WORD,
);

alias Union_Unnamed69 = Union[
    /* Function */ Struct_Unnamed71,
    /* Array */ Struct_Unnamed72,
];

record Struct_Unnamed71 (
    PointerToLinenumber : DWORD,
    PointerToNextFunction : DWORD,
);

record Struct_Unnamed72 (
    Dimension : Array[WORD, 4],
);

record Struct_Unnamed65 (
    Name : Array[BYTE, 18],
);

record Struct_Unnamed66 (
    Length : DWORD,
    NumberOfRelocations : WORD,
    NumberOfLinenumbers : WORD,
    CheckSum : DWORD,
    Number : SHORT,
    Selection : BYTE,
    bReserved : BYTE,
    HighNumber : SHORT,
);

record Struct_Unnamed67 (
    crc : DWORD,
    rgbReserved : Array[BYTE, 14],
);

alias IMAGE_AUX_SYMBOL = Union__IMAGE_AUX_SYMBOL;

alias PIMAGE_AUX_SYMBOL = Pointer[IMAGE_AUX_SYMBOL];

alias Union__IMAGE_AUX_SYMBOL_EX = Union[
    /* Sym */ Struct_Unnamed73,
    /* File */ Struct_Unnamed74,
    /* Section */ Struct_Unnamed75,
    /* CRC */ Struct_Unnamed76,
];

record Struct_Unnamed73 (
    WeakDefaultSymIndex : DWORD,
    WeakSearchType : DWORD,
    rgbReserved : Array[BYTE, 12],
);

record Struct_Unnamed74 (
    Name : Array[BYTE, 20],
);

record Struct_Unnamed75 (
    Length : DWORD,
    NumberOfRelocations : WORD,
    NumberOfLinenumbers : WORD,
    CheckSum : DWORD,
    Number : SHORT,
    Selection : BYTE,
    bReserved : BYTE,
    HighNumber : SHORT,
    rgbReserved : Array[BYTE, 2],
);

record Struct_Unnamed77 (
    TokenDef : IMAGE_AUX_SYMBOL_TOKEN_DEF,
    rgbReserved : Array[BYTE, 2],
);

record Struct_Unnamed76 (
    crc : DWORD,
    rgbReserved : Array[BYTE, 16],
);

alias IMAGE_AUX_SYMBOL_EX = Union__IMAGE_AUX_SYMBOL_EX;

alias PIMAGE_AUX_SYMBOL_EX = Pointer[IMAGE_AUX_SYMBOL_EX];

alias Enum_IMAGE_AUX_SYMBOL_TYPE = Int;
alias IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF = 1;

alias IMAGE_AUX_SYMBOL_TYPE = Enum_IMAGE_AUX_SYMBOL_TYPE;

record Struct__IMAGE_RELOCATION (
    SymbolTableIndex : DWORD,
    Type : WORD,
);

alias Union_Unnamed78 = Union[
    /* VirtualAddress */ DWORD,
    /* RelocCount */ DWORD,
];

alias IMAGE_RELOCATION = Struct__IMAGE_RELOCATION;

alias PIMAGE_RELOCATION = Pointer[IMAGE_RELOCATION];

record Struct__IMAGE_LINENUMBER (
    Type : Union_Unnamed79,
    Linenumber : WORD,
);

alias Union_Unnamed79 = Union[
    /* SymbolTableIndex */ DWORD,
    /* VirtualAddress */ DWORD,
];

alias IMAGE_LINENUMBER = Struct__IMAGE_LINENUMBER;

alias PIMAGE_LINENUMBER = Pointer[IMAGE_LINENUMBER];

record Struct__IMAGE_BASE_RELOCATION (
    VirtualAddress : DWORD,
    SizeOfBlock : DWORD,
);

alias IMAGE_BASE_RELOCATION = Struct__IMAGE_BASE_RELOCATION;

alias PIMAGE_BASE_RELOCATION = Pointer[IMAGE_BASE_RELOCATION];

record Struct__IMAGE_ARCHIVE_MEMBER_HEADER (
    Name : Array[BYTE, 16],
    Date : Array[BYTE, 12],
    UserID : Array[BYTE, 6],
    GroupID : Array[BYTE, 6],
    Mode : Array[BYTE, 8],
    Size : Array[BYTE, 10],
    EndHeader : Array[BYTE, 2],
);

alias IMAGE_ARCHIVE_MEMBER_HEADER = Struct__IMAGE_ARCHIVE_MEMBER_HEADER;

alias PIMAGE_ARCHIVE_MEMBER_HEADER = Pointer[Struct__IMAGE_ARCHIVE_MEMBER_HEADER];

record Struct__IMAGE_EXPORT_DIRECTORY (
    Characteristics : DWORD,
    TimeDateStamp : DWORD,
    MajorVersion : WORD,
    MinorVersion : WORD,
    Name : DWORD,
    Base : DWORD,
    NumberOfFunctions : DWORD,
    NumberOfNames : DWORD,
    AddressOfFunctions : DWORD,
    AddressOfNames : DWORD,
    AddressOfNameOrdinals : DWORD,
);

alias IMAGE_EXPORT_DIRECTORY = Struct__IMAGE_EXPORT_DIRECTORY;

alias PIMAGE_EXPORT_DIRECTORY = Pointer[Struct__IMAGE_EXPORT_DIRECTORY];

record Struct__IMAGE_IMPORT_BY_NAME (
    Hint : WORD,
    Name : Array[BYTE, 1],
);

alias IMAGE_IMPORT_BY_NAME = Struct__IMAGE_IMPORT_BY_NAME;

alias PIMAGE_IMPORT_BY_NAME = Pointer[Struct__IMAGE_IMPORT_BY_NAME];

record Struct__IMAGE_THUNK_DATA64 (
    u1 : Union_Unnamed80,
);

alias Union_Unnamed80 = Union[
    /* ForwarderString */ ULONGLONG,
    /* Function */ ULONGLONG,
    /* Ordinal */ ULONGLONG,
    /* AddressOfData */ ULONGLONG,
];

alias IMAGE_THUNK_DATA64 = Struct__IMAGE_THUNK_DATA64;

alias PIMAGE_THUNK_DATA64 = Pointer[IMAGE_THUNK_DATA64];

record Struct__IMAGE_THUNK_DATA32 (
    u1 : Union_Unnamed81,
);

alias Union_Unnamed81 = Union[
    /* ForwarderString */ DWORD,
    /* Function */ DWORD,
    /* Ordinal */ DWORD,
    /* AddressOfData */ DWORD,
];

alias IMAGE_THUNK_DATA32 = Struct__IMAGE_THUNK_DATA32;

alias PIMAGE_THUNK_DATA32 = Pointer[IMAGE_THUNK_DATA32];

alias PIMAGE_TLS_CALLBACK = StdCallCodePointer[[PVOID, DWORD, PVOID],[]];

record Struct__IMAGE_TLS_DIRECTORY64 (
    StartAddressOfRawData : ULONGLONG,
    EndAddressOfRawData : ULONGLONG,
    AddressOfIndex : ULONGLONG,
    AddressOfCallBacks : ULONGLONG,
    SizeOfZeroFill : DWORD,
    Characteristics : DWORD,
);

alias IMAGE_TLS_DIRECTORY64 = Struct__IMAGE_TLS_DIRECTORY64;

alias PIMAGE_TLS_DIRECTORY64 = Pointer[IMAGE_TLS_DIRECTORY64];

record Struct__IMAGE_TLS_DIRECTORY32 (
    StartAddressOfRawData : DWORD,
    EndAddressOfRawData : DWORD,
    AddressOfIndex : DWORD,
    AddressOfCallBacks : DWORD,
    SizeOfZeroFill : DWORD,
    Characteristics : DWORD,
);

alias IMAGE_TLS_DIRECTORY32 = Struct__IMAGE_TLS_DIRECTORY32;

alias PIMAGE_TLS_DIRECTORY32 = Pointer[IMAGE_TLS_DIRECTORY32];

alias IMAGE_THUNK_DATA = IMAGE_THUNK_DATA32;

alias PIMAGE_THUNK_DATA = PIMAGE_THUNK_DATA32;

alias IMAGE_TLS_DIRECTORY = IMAGE_TLS_DIRECTORY32;

alias PIMAGE_TLS_DIRECTORY = PIMAGE_TLS_DIRECTORY32;

record Struct__IMAGE_IMPORT_DESCRIPTOR (
    TimeDateStamp : DWORD,
    ForwarderChain : DWORD,
    Name : DWORD,
    FirstThunk : DWORD,
);

alias Union_Unnamed82 = Union[
    /* Characteristics */ DWORD,
    /* OriginalFirstThunk */ DWORD,
];

alias IMAGE_IMPORT_DESCRIPTOR = Struct__IMAGE_IMPORT_DESCRIPTOR;

alias PIMAGE_IMPORT_DESCRIPTOR = Pointer[IMAGE_IMPORT_DESCRIPTOR];

record Struct__IMAGE_BOUND_IMPORT_DESCRIPTOR (
    TimeDateStamp : DWORD,
    OffsetModuleName : WORD,
    NumberOfModuleForwarderRefs : WORD,
);

alias IMAGE_BOUND_IMPORT_DESCRIPTOR = Struct__IMAGE_BOUND_IMPORT_DESCRIPTOR;

alias PIMAGE_BOUND_IMPORT_DESCRIPTOR = Pointer[Struct__IMAGE_BOUND_IMPORT_DESCRIPTOR];

record Struct__IMAGE_BOUND_FORWARDER_REF (
    TimeDateStamp : DWORD,
    OffsetModuleName : WORD,
    Reserved : WORD,
);

alias IMAGE_BOUND_FORWARDER_REF = Struct__IMAGE_BOUND_FORWARDER_REF;

alias PIMAGE_BOUND_FORWARDER_REF = Pointer[Struct__IMAGE_BOUND_FORWARDER_REF];

record Struct__IMAGE_RESOURCE_DIRECTORY (
    Characteristics : DWORD,
    TimeDateStamp : DWORD,
    MajorVersion : WORD,
    MinorVersion : WORD,
    NumberOfNamedEntries : WORD,
    NumberOfIdEntries : WORD,
);

alias IMAGE_RESOURCE_DIRECTORY = Struct__IMAGE_RESOURCE_DIRECTORY;

alias PIMAGE_RESOURCE_DIRECTORY = Pointer[Struct__IMAGE_RESOURCE_DIRECTORY];

record Struct__IMAGE_RESOURCE_DIRECTORY_ENTRY (
);

alias Union_Unnamed83 = Union[
    /* Name */ DWORD,
    /* Id */ WORD,
];

record Struct_Unnamed84 (
    NameOffset : DWORD,
    NameIsString : DWORD,
);

alias Union_Unnamed85 = Union[
    /* OffsetToData */ DWORD,
];

record Struct_Unnamed86 (
    OffsetToDirectory : DWORD,
    DataIsDirectory : DWORD,
);

alias IMAGE_RESOURCE_DIRECTORY_ENTRY = Struct__IMAGE_RESOURCE_DIRECTORY_ENTRY;

alias PIMAGE_RESOURCE_DIRECTORY_ENTRY = Pointer[Struct__IMAGE_RESOURCE_DIRECTORY_ENTRY];

record Struct__IMAGE_RESOURCE_DIRECTORY_STRING (
    Length : WORD,
    NameString : Array[CHAR, 1],
);

alias IMAGE_RESOURCE_DIRECTORY_STRING = Struct__IMAGE_RESOURCE_DIRECTORY_STRING;

alias PIMAGE_RESOURCE_DIRECTORY_STRING = Pointer[Struct__IMAGE_RESOURCE_DIRECTORY_STRING];

record Struct__IMAGE_RESOURCE_DIR_STRING_U (
    Length : WORD,
    NameString : Array[WCHAR, 1],
);

alias IMAGE_RESOURCE_DIR_STRING_U = Struct__IMAGE_RESOURCE_DIR_STRING_U;

alias PIMAGE_RESOURCE_DIR_STRING_U = Pointer[Struct__IMAGE_RESOURCE_DIR_STRING_U];

record Struct__IMAGE_RESOURCE_DATA_ENTRY (
    OffsetToData : DWORD,
    Size : DWORD,
    CodePage : DWORD,
    Reserved : DWORD,
);

alias IMAGE_RESOURCE_DATA_ENTRY = Struct__IMAGE_RESOURCE_DATA_ENTRY;

alias PIMAGE_RESOURCE_DATA_ENTRY = Pointer[Struct__IMAGE_RESOURCE_DATA_ENTRY];

record Struct_Unnamed87 (
    Size : DWORD,
    TimeDateStamp : DWORD,
    MajorVersion : WORD,
    MinorVersion : WORD,
    GlobalFlagsClear : DWORD,
    GlobalFlagsSet : DWORD,
    CriticalSectionDefaultTimeout : DWORD,
    DeCommitFreeBlockThreshold : DWORD,
    DeCommitTotalFreeThreshold : DWORD,
    LockPrefixTable : DWORD,
    MaximumAllocationSize : DWORD,
    VirtualMemoryThreshold : DWORD,
    ProcessHeapFlags : DWORD,
    ProcessAffinityMask : DWORD,
    CSDVersion : WORD,
    Reserved1 : WORD,
    EditList : DWORD,
    SecurityCookie : DWORD,
    SEHandlerTable : DWORD,
    SEHandlerCount : DWORD,
);

alias IMAGE_LOAD_CONFIG_DIRECTORY32 = Struct_Unnamed87;

alias PIMAGE_LOAD_CONFIG_DIRECTORY32 = Pointer[Struct_Unnamed87];

record Struct_Unnamed88 (
    Size : DWORD,
    TimeDateStamp : DWORD,
    MajorVersion : WORD,
    MinorVersion : WORD,
    GlobalFlagsClear : DWORD,
    GlobalFlagsSet : DWORD,
    CriticalSectionDefaultTimeout : DWORD,
    DeCommitFreeBlockThreshold : ULONGLONG,
    DeCommitTotalFreeThreshold : ULONGLONG,
    LockPrefixTable : ULONGLONG,
    MaximumAllocationSize : ULONGLONG,
    VirtualMemoryThreshold : ULONGLONG,
    ProcessAffinityMask : ULONGLONG,
    ProcessHeapFlags : DWORD,
    CSDVersion : WORD,
    Reserved1 : WORD,
    EditList : ULONGLONG,
    SecurityCookie : ULONGLONG,
    SEHandlerTable : ULONGLONG,
    SEHandlerCount : ULONGLONG,
);

alias IMAGE_LOAD_CONFIG_DIRECTORY64 = Struct_Unnamed88;

alias PIMAGE_LOAD_CONFIG_DIRECTORY64 = Pointer[Struct_Unnamed88];

alias IMAGE_LOAD_CONFIG_DIRECTORY = IMAGE_LOAD_CONFIG_DIRECTORY32;

alias PIMAGE_LOAD_CONFIG_DIRECTORY = PIMAGE_LOAD_CONFIG_DIRECTORY32;

record Struct__IMAGE_CE_RUNTIME_FUNCTION_ENTRY (
    FuncStart : DWORD,
    PrologLen : DWORD,
    FuncLen : DWORD,
    ThirtyTwoBit : DWORD,
    ExceptionFlag : DWORD,
);

alias IMAGE_CE_RUNTIME_FUNCTION_ENTRY = Struct__IMAGE_CE_RUNTIME_FUNCTION_ENTRY;

alias PIMAGE_CE_RUNTIME_FUNCTION_ENTRY = Pointer[Struct__IMAGE_CE_RUNTIME_FUNCTION_ENTRY];

record Struct__IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY (
    BeginAddress : ULONGLONG,
    EndAddress : ULONGLONG,
    ExceptionHandler : ULONGLONG,
    HandlerData : ULONGLONG,
    PrologEndAddress : ULONGLONG,
);

alias IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY = Struct__IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY;

alias PIMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY = Pointer[Struct__IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY];

record Struct__IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY (
    BeginAddress : DWORD,
    EndAddress : DWORD,
    ExceptionHandler : DWORD,
    HandlerData : DWORD,
    PrologEndAddress : DWORD,
);

alias IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY = Struct__IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY;

alias PIMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY = Pointer[Struct__IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY];

record Struct__IMAGE_RUNTIME_FUNCTION_ENTRY (
    BeginAddress : DWORD,
    EndAddress : DWORD,
    UnwindInfoAddress : DWORD,
);

alias _IMAGE_RUNTIME_FUNCTION_ENTRY = Struct__IMAGE_RUNTIME_FUNCTION_ENTRY;

alias _PIMAGE_RUNTIME_FUNCTION_ENTRY = Pointer[Struct__IMAGE_RUNTIME_FUNCTION_ENTRY];

alias IMAGE_IA64_RUNTIME_FUNCTION_ENTRY = _IMAGE_RUNTIME_FUNCTION_ENTRY;

alias PIMAGE_IA64_RUNTIME_FUNCTION_ENTRY = _PIMAGE_RUNTIME_FUNCTION_ENTRY;

alias IMAGE_RUNTIME_FUNCTION_ENTRY = _IMAGE_RUNTIME_FUNCTION_ENTRY;

alias PIMAGE_RUNTIME_FUNCTION_ENTRY = _PIMAGE_RUNTIME_FUNCTION_ENTRY;

record Struct__IMAGE_DEBUG_DIRECTORY (
    Characteristics : DWORD,
    TimeDateStamp : DWORD,
    MajorVersion : WORD,
    MinorVersion : WORD,
    Type : DWORD,
    SizeOfData : DWORD,
    AddressOfRawData : DWORD,
    PointerToRawData : DWORD,
);

alias IMAGE_DEBUG_DIRECTORY = Struct__IMAGE_DEBUG_DIRECTORY;

alias PIMAGE_DEBUG_DIRECTORY = Pointer[Struct__IMAGE_DEBUG_DIRECTORY];

record Struct__IMAGE_COFF_SYMBOLS_HEADER (
    NumberOfSymbols : DWORD,
    LvaToFirstSymbol : DWORD,
    NumberOfLinenumbers : DWORD,
    LvaToFirstLinenumber : DWORD,
    RvaToFirstByteOfCode : DWORD,
    RvaToLastByteOfCode : DWORD,
    RvaToFirstByteOfData : DWORD,
    RvaToLastByteOfData : DWORD,
);

alias IMAGE_COFF_SYMBOLS_HEADER = Struct__IMAGE_COFF_SYMBOLS_HEADER;

alias PIMAGE_COFF_SYMBOLS_HEADER = Pointer[Struct__IMAGE_COFF_SYMBOLS_HEADER];

record Struct__FPO_DATA (
    ulOffStart : DWORD,
    cbProcSize : DWORD,
    cdwLocals : DWORD,
    cdwParams : WORD,
    cbProlog : WORD,
    cbRegs : WORD,
    fHasSEH : WORD,
    fUseBP : WORD,
    reserved : WORD,
    cbFrame : WORD,
);

alias FPO_DATA = Struct__FPO_DATA;

alias PFPO_DATA = Pointer[Struct__FPO_DATA];

record Struct__IMAGE_DEBUG_MISC (
    DataType : DWORD,
    Length : DWORD,
    Unicode : BOOLEAN,
    Reserved : Array[BYTE, 3],
    Data : Array[BYTE, 1],
);

alias IMAGE_DEBUG_MISC = Struct__IMAGE_DEBUG_MISC;

alias PIMAGE_DEBUG_MISC = Pointer[Struct__IMAGE_DEBUG_MISC];

record Struct__IMAGE_FUNCTION_ENTRY (
    StartingAddress : DWORD,
    EndingAddress : DWORD,
    EndOfPrologue : DWORD,
);

alias IMAGE_FUNCTION_ENTRY = Struct__IMAGE_FUNCTION_ENTRY;

alias PIMAGE_FUNCTION_ENTRY = Pointer[Struct__IMAGE_FUNCTION_ENTRY];

record Struct__IMAGE_FUNCTION_ENTRY64 (
    StartingAddress : ULONGLONG,
    EndingAddress : ULONGLONG,
);

alias Union_Unnamed89 = Union[
    /* EndOfPrologue */ ULONGLONG,
    /* UnwindInfoAddress */ ULONGLONG,
];

alias IMAGE_FUNCTION_ENTRY64 = Struct__IMAGE_FUNCTION_ENTRY64;

alias PIMAGE_FUNCTION_ENTRY64 = Pointer[Struct__IMAGE_FUNCTION_ENTRY64];

record Struct__IMAGE_SEPARATE_DEBUG_HEADER (
    Signature : WORD,
    Flags : WORD,
    Machine : WORD,
    Characteristics : WORD,
    TimeDateStamp : DWORD,
    CheckSum : DWORD,
    ImageBase : DWORD,
    SizeOfImage : DWORD,
    NumberOfSections : DWORD,
    ExportedNamesSize : DWORD,
    DebugDirectorySize : DWORD,
    SectionAlignment : DWORD,
    Reserved : Array[DWORD, 2],
);

alias IMAGE_SEPARATE_DEBUG_HEADER = Struct__IMAGE_SEPARATE_DEBUG_HEADER;

alias PIMAGE_SEPARATE_DEBUG_HEADER = Pointer[Struct__IMAGE_SEPARATE_DEBUG_HEADER];

record Struct__NON_PAGED_DEBUG_INFO (
    Signature : WORD,
    Flags : WORD,
    Size : DWORD,
    Machine : WORD,
    Characteristics : WORD,
    TimeDateStamp : DWORD,
    CheckSum : DWORD,
    SizeOfImage : DWORD,
    ImageBase : ULONGLONG,
);

alias NON_PAGED_DEBUG_INFO = Struct__NON_PAGED_DEBUG_INFO;

alias PNON_PAGED_DEBUG_INFO = Pointer[Struct__NON_PAGED_DEBUG_INFO];

record Struct__ImageArchitectureHeader (
    AmaskValue : UInt,
    ?padding0 : Int,
    AmaskShift : UInt,
    ?padding1 : Int,
    FirstEntryRVA : DWORD,
);

alias IMAGE_ARCHITECTURE_HEADER = Struct__ImageArchitectureHeader;

alias PIMAGE_ARCHITECTURE_HEADER = Pointer[Struct__ImageArchitectureHeader];

record Struct__ImageArchitectureEntry (
    FixupInstRVA : DWORD,
    NewInst : DWORD,
);

alias IMAGE_ARCHITECTURE_ENTRY = Struct__ImageArchitectureEntry;

alias PIMAGE_ARCHITECTURE_ENTRY = Pointer[Struct__ImageArchitectureEntry];

record Struct_IMPORT_OBJECT_HEADER (
    Sig1 : WORD,
    Sig2 : WORD,
    Version : WORD,
    Machine : WORD,
    TimeDateStamp : DWORD,
    SizeOfData : DWORD,
    Type : WORD,
    NameType : WORD,
    Reserved : WORD,
);

alias Union_Unnamed90 = Union[
    /* Ordinal */ WORD,
    /* Hint */ WORD,
];

alias IMPORT_OBJECT_HEADER = Struct_IMPORT_OBJECT_HEADER;

alias Enum_IMPORT_OBJECT_TYPE = Int;
alias IMPORT_OBJECT_CODE = 0;
alias IMPORT_OBJECT_DATA = 1;
alias IMPORT_OBJECT_CONST = 2;

alias IMPORT_OBJECT_TYPE = Enum_IMPORT_OBJECT_TYPE;

alias Enum_IMPORT_OBJECT_NAME_TYPE = Int;
alias IMPORT_OBJECT_ORDINAL = 0;
alias IMPORT_OBJECT_NAME = 1;
alias IMPORT_OBJECT_NAME_NO_PREFIX = 2;
alias IMPORT_OBJECT_NAME_UNDECORATE = 3;

alias IMPORT_OBJECT_NAME_TYPE = Enum_IMPORT_OBJECT_NAME_TYPE;

alias Enum_ReplacesCorHdrNumericDefines = Int;
alias COMIMAGE_FLAGS_ILONLY = 1;
alias COMIMAGE_FLAGS_32BITREQUIRED = 2;
alias COMIMAGE_FLAGS_IL_LIBRARY = 4;
alias COMIMAGE_FLAGS_STRONGNAMESIGNED = 8;
alias COMIMAGE_FLAGS_NATIVE_ENTRYPOINT = 16;
alias COMIMAGE_FLAGS_TRACKDEBUGDATA = 65536;
alias COR_VERSION_MAJOR_V2 = 2;
alias COR_VERSION_MAJOR = 2;
alias COR_VERSION_MINOR = 0;
alias COR_DELETED_NAME_LENGTH = 8;
alias COR_VTABLEGAP_NAME_LENGTH = 8;
alias NATIVE_TYPE_MAX_CB = 1;
alias COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE = 255;
alias IMAGE_COR_MIH_METHODRVA = 1;
alias IMAGE_COR_MIH_EHRVA = 2;
alias IMAGE_COR_MIH_BASICBLOCK = 8;
alias COR_VTABLE_32BIT = 1;
alias COR_VTABLE_64BIT = 2;
alias COR_VTABLE_FROM_UNMANAGED = 4;
alias COR_VTABLE_FROM_UNMANAGED_RETAIN_APPDOMAIN = 8;
alias COR_VTABLE_CALL_MOST_DERIVED = 16;
alias IMAGE_COR_EATJ_THUNK_SIZE = 32;
alias MAX_CLASS_NAME = 1024;
alias MAX_PACKAGE_NAME = 1024;

alias ReplacesCorHdrNumericDefines = Enum_ReplacesCorHdrNumericDefines;

record Struct_IMAGE_COR20_HEADER (
    cb : DWORD,
    MajorRuntimeVersion : WORD,
    MinorRuntimeVersion : WORD,
    MetaData : IMAGE_DATA_DIRECTORY,
    Flags : DWORD,
    Resources : IMAGE_DATA_DIRECTORY,
    StrongNameSignature : IMAGE_DATA_DIRECTORY,
    CodeManagerTable : IMAGE_DATA_DIRECTORY,
    VTableFixups : IMAGE_DATA_DIRECTORY,
    ExportAddressTableJumps : IMAGE_DATA_DIRECTORY,
    ManagedNativeHeader : IMAGE_DATA_DIRECTORY,
);

alias Union_Unnamed91 = Union[
    /* EntryPointToken */ DWORD,
    /* EntryPointRVA */ DWORD,
];

alias IMAGE_COR20_HEADER = Struct_IMAGE_COR20_HEADER;

alias PIMAGE_COR20_HEADER = Pointer[Struct_IMAGE_COR20_HEADER];

alias SLIST_ENTRY32 = SINGLE_LIST_ENTRY;

alias PSLIST_ENTRY32 = Pointer[SINGLE_LIST_ENTRY];

alias Union__SLIST_HEADER = Union[
    /* Alignment */ ULONGLONG,
];

record Struct_Unnamed92 (
    Next : SINGLE_LIST_ENTRY,
    Depth : WORD,
    Sequence : WORD,
);

alias SLIST_HEADER = Union__SLIST_HEADER;

alias PSLIST_HEADER = Pointer[Union__SLIST_HEADER];

alias SLIST_HEADER32 = SLIST_HEADER;

alias PSLIST_HEADER32 = Pointer[SLIST_HEADER];

external (stdcall) RtlInitializeSListHead(arg0:PSLIST_HEADER) : ;

external (stdcall) RtlFirstEntrySList(arg0:Pointer[SLIST_HEADER]) : PSINGLE_LIST_ENTRY;

external (stdcall) RtlInterlockedPopEntrySList(arg0:PSLIST_HEADER) : PSINGLE_LIST_ENTRY;

external (stdcall) RtlInterlockedPushEntrySList(arg0:PSLIST_HEADER, arg1:PSINGLE_LIST_ENTRY) : PSINGLE_LIST_ENTRY;

external (stdcall) RtlInterlockedFlushSList(arg0:PSLIST_HEADER) : PSINGLE_LIST_ENTRY;

external (stdcall) RtlQueryDepthSList(arg0:PSLIST_HEADER) : WORD;

alias Union__RTL_RUN_ONCE = Union[
    /* Ptr */ PVOID,
];

alias RTL_RUN_ONCE = Union__RTL_RUN_ONCE;

alias PRTL_RUN_ONCE = Pointer[Union__RTL_RUN_ONCE];

alias RTL_RUN_ONCE_INIT_FN = /* unknown kind FunctionProto */ Opaque;

alias PRTL_RUN_ONCE_INIT_FN = Pointer[RTL_RUN_ONCE_INIT_FN];

external (stdcall) RtlRunOnceInitialize(arg0:PRTL_RUN_ONCE) : ;

external (stdcall) RtlRunOnceExecuteOnce(arg0:PRTL_RUN_ONCE, arg1:PRTL_RUN_ONCE_INIT_FN, arg2:PVOID, arg3:Pointer[PVOID]) : DWORD;

external (stdcall) RtlRunOnceBeginInitialize(arg0:PRTL_RUN_ONCE, arg1:DWORD, arg2:Pointer[PVOID]) : DWORD;

external (stdcall) RtlRunOnceComplete(arg0:PRTL_RUN_ONCE, arg1:DWORD, arg2:PVOID) : DWORD;

external (cdecl) HEAP_MAKE_TAG_FLAGS(arg0:DWORD, arg1:DWORD) : DWORD;

external (stdcall) RtlCaptureStackBackTrace(arg0:DWORD, arg1:DWORD, arg2:Pointer[PVOID], arg3:PDWORD) : WORD;

external (stdcall) RtlCaptureContext(arg0:PCONTEXT) : ;

external (stdcall) RtlCompareMemory(arg0:OpaquePointer, arg1:OpaquePointer, arg2:SIZE_T) : SIZE_T;

external (cdecl) RtlSecureZeroMemory(arg0:PVOID, arg1:SIZE_T) : PVOID;

record Struct__MESSAGE_RESOURCE_ENTRY (
    Length : WORD,
    Flags : WORD,
    Text : Array[BYTE, 1],
);

alias MESSAGE_RESOURCE_ENTRY = Struct__MESSAGE_RESOURCE_ENTRY;

alias PMESSAGE_RESOURCE_ENTRY = Pointer[Struct__MESSAGE_RESOURCE_ENTRY];

record Struct__MESSAGE_RESOURCE_BLOCK (
    LowId : DWORD,
    HighId : DWORD,
    OffsetToEntries : DWORD,
);

alias MESSAGE_RESOURCE_BLOCK = Struct__MESSAGE_RESOURCE_BLOCK;

alias PMESSAGE_RESOURCE_BLOCK = Pointer[Struct__MESSAGE_RESOURCE_BLOCK];

record Struct__MESSAGE_RESOURCE_DATA (
    NumberOfBlocks : DWORD,
    Blocks : Array[MESSAGE_RESOURCE_BLOCK, 1],
);

alias MESSAGE_RESOURCE_DATA = Struct__MESSAGE_RESOURCE_DATA;

alias PMESSAGE_RESOURCE_DATA = Pointer[Struct__MESSAGE_RESOURCE_DATA];

external (stdcall) RtlPcToFileHeader(arg0:PVOID, arg1:Pointer[PVOID]) : PVOID;

record Struct__OSVERSIONINFOA (
    dwOSVersionInfoSize : DWORD,
    dwMajorVersion : DWORD,
    dwMinorVersion : DWORD,
    dwBuildNumber : DWORD,
    dwPlatformId : DWORD,
    szCSDVersion : Array[CHAR, 128],
);

alias OSVERSIONINFOA = Struct__OSVERSIONINFOA;

alias POSVERSIONINFOA = Pointer[Struct__OSVERSIONINFOA];

alias LPOSVERSIONINFOA = Pointer[Struct__OSVERSIONINFOA];

record Struct__OSVERSIONINFOW (
    dwOSVersionInfoSize : DWORD,
    dwMajorVersion : DWORD,
    dwMinorVersion : DWORD,
    dwBuildNumber : DWORD,
    dwPlatformId : DWORD,
    szCSDVersion : Array[WCHAR, 128],
);

alias OSVERSIONINFOW = Struct__OSVERSIONINFOW;

alias POSVERSIONINFOW = Pointer[Struct__OSVERSIONINFOW];

alias LPOSVERSIONINFOW = Pointer[Struct__OSVERSIONINFOW];

alias RTL_OSVERSIONINFOW = Struct__OSVERSIONINFOW;

alias PRTL_OSVERSIONINFOW = Pointer[Struct__OSVERSIONINFOW];

alias OSVERSIONINFO = OSVERSIONINFOA;

alias POSVERSIONINFO = POSVERSIONINFOA;

alias LPOSVERSIONINFO = LPOSVERSIONINFOA;

record Struct__OSVERSIONINFOEXA (
    dwOSVersionInfoSize : DWORD,
    dwMajorVersion : DWORD,
    dwMinorVersion : DWORD,
    dwBuildNumber : DWORD,
    dwPlatformId : DWORD,
    szCSDVersion : Array[CHAR, 128],
    wServicePackMajor : WORD,
    wServicePackMinor : WORD,
    wSuiteMask : WORD,
    wProductType : BYTE,
    wReserved : BYTE,
);

alias OSVERSIONINFOEXA = Struct__OSVERSIONINFOEXA;

alias POSVERSIONINFOEXA = Pointer[Struct__OSVERSIONINFOEXA];

alias LPOSVERSIONINFOEXA = Pointer[Struct__OSVERSIONINFOEXA];

record Struct__OSVERSIONINFOEXW (
    dwOSVersionInfoSize : DWORD,
    dwMajorVersion : DWORD,
    dwMinorVersion : DWORD,
    dwBuildNumber : DWORD,
    dwPlatformId : DWORD,
    szCSDVersion : Array[WCHAR, 128],
    wServicePackMajor : WORD,
    wServicePackMinor : WORD,
    wSuiteMask : WORD,
    wProductType : BYTE,
    wReserved : BYTE,
);

alias OSVERSIONINFOEXW = Struct__OSVERSIONINFOEXW;

alias POSVERSIONINFOEXW = Pointer[Struct__OSVERSIONINFOEXW];

alias LPOSVERSIONINFOEXW = Pointer[Struct__OSVERSIONINFOEXW];

alias RTL_OSVERSIONINFOEXW = Struct__OSVERSIONINFOEXW;

alias PRTL_OSVERSIONINFOEXW = Pointer[Struct__OSVERSIONINFOEXW];

alias OSVERSIONINFOEX = OSVERSIONINFOEXA;

alias POSVERSIONINFOEX = POSVERSIONINFOEXA;

alias LPOSVERSIONINFOEX = LPOSVERSIONINFOEXA;

external (stdcall) VerSetConditionMask(arg0:ULONGLONG, arg1:DWORD, arg2:BYTE) : ULONGLONG;

external (stdcall) RtlGetProductInfo(arg0:DWORD, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:PDWORD) : BOOLEAN;

alias Enum__RTL_UMS_THREAD_INFO_CLASS = Int;
alias UmsThreadInvalidInfoClass = 0;
alias UmsThreadUserContext = 1;
alias UmsThreadPriority = 2;
alias UmsThreadAffinity = 3;
alias UmsThreadTeb = 4;
alias UmsThreadIsSuspended = 5;
alias UmsThreadIsTerminated = 6;
alias UmsThreadMaxInfoClass = 7;

alias RTL_UMS_THREAD_INFO_CLASS = Enum__RTL_UMS_THREAD_INFO_CLASS;

alias PRTL_UMS_THREAD_INFO_CLASS = Pointer[Enum__RTL_UMS_THREAD_INFO_CLASS];

alias Enum__RTL_UMS_SCHEDULER_REASON = Int;
alias UmsSchedulerStartup = 0;
alias UmsSchedulerThreadBlocked = 1;
alias UmsSchedulerThreadYield = 2;

alias RTL_UMS_SCHEDULER_REASON = Enum__RTL_UMS_SCHEDULER_REASON;

alias PRTL_UMS_SCHEDULER_REASON = Pointer[Enum__RTL_UMS_SCHEDULER_REASON];

alias RTL_UMS_SCHEDULER_ENTRY_POINT = /* unknown kind FunctionProto */ Opaque;

alias PRTL_UMS_SCHEDULER_ENTRY_POINT = Pointer[RTL_UMS_SCHEDULER_ENTRY_POINT];

external (stdcall) RtlCopyExtendedContext(arg0:PCONTEXT_EX, arg1:DWORD, arg2:PCONTEXT_EX) : DWORD;

external (stdcall) RtlInitializeExtendedContext(arg0:PVOID, arg1:DWORD, arg2:Pointer[PCONTEXT_EX]) : DWORD;

external (stdcall) RtlGetEnabledExtendedFeatures(arg0:DWORD64) : DWORD64;

external (stdcall) RtlGetExtendedContextLength(arg0:DWORD, arg1:PDWORD) : DWORD;

external (stdcall) RtlGetExtendedFeaturesMask(arg0:PCONTEXT_EX) : DWORD64;

external (stdcall) RtlLocateExtendedFeature(arg0:PCONTEXT_EX, arg1:DWORD, arg2:PDWORD) : PVOID;

external (stdcall) RtlLocateLegacyContext(arg0:PCONTEXT_EX, arg1:PDWORD) : PCONTEXT;

external (stdcall) RtlSetExtendedFeaturesMask(arg0:PCONTEXT_EX, arg1:DWORD64) : ;

record Struct__RTL_CRITICAL_SECTION_DEBUG (
    Type : WORD,
    CreatorBackTraceIndex : WORD,
    CriticalSection : Pointer[Struct__RTL_CRITICAL_SECTION],
    ProcessLocksList : LIST_ENTRY,
    EntryCount : DWORD,
    ContentionCount : DWORD,
    Flags : DWORD,
    CreatorBackTraceIndexHigh : WORD,
    SpareWORD : WORD,
);

alias RTL_CRITICAL_SECTION_DEBUG = Struct__RTL_CRITICAL_SECTION_DEBUG;

alias PRTL_CRITICAL_SECTION_DEBUG = Pointer[Struct__RTL_CRITICAL_SECTION_DEBUG];

alias RTL_RESOURCE_DEBUG = Struct__RTL_CRITICAL_SECTION_DEBUG;

alias PRTL_RESOURCE_DEBUG = Pointer[Struct__RTL_CRITICAL_SECTION_DEBUG];

record Struct__RTL_CRITICAL_SECTION (
    DebugInfo : PRTL_CRITICAL_SECTION_DEBUG,
    LockCount : LONG,
    RecursionCount : LONG,
    OwningThread : HANDLE,
    LockSemaphore : HANDLE,
    SpinCount : ULONG_PTR,
);

alias RTL_CRITICAL_SECTION = Struct__RTL_CRITICAL_SECTION;

alias PRTL_CRITICAL_SECTION = Pointer[Struct__RTL_CRITICAL_SECTION];

record Struct__RTL_SRWLOCK (
    Ptr : PVOID,
);

alias RTL_SRWLOCK = Struct__RTL_SRWLOCK;

alias PRTL_SRWLOCK = Pointer[Struct__RTL_SRWLOCK];

record Struct__RTL_CONDITION_VARIABLE (
    Ptr : PVOID,
);

alias RTL_CONDITION_VARIABLE = Struct__RTL_CONDITION_VARIABLE;

alias PRTL_CONDITION_VARIABLE = Pointer[Struct__RTL_CONDITION_VARIABLE];

alias PAPCFUNC = StdCallCodePointer[[ULONG_PTR],[]];

alias PVECTORED_EXCEPTION_HANDLER = StdCallCodePointer[[Pointer[Struct__EXCEPTION_POINTERS]],[LONG]];

alias Enum__HEAP_INFORMATION_CLASS = Int;
alias HeapCompatibilityInformation = 0;
alias HeapEnableTerminationOnCorruption = 1;

alias HEAP_INFORMATION_CLASS = Enum__HEAP_INFORMATION_CLASS;

alias WAITORTIMERCALLBACKFUNC = StdCallCodePointer[[PVOID, BOOLEAN],[]];

alias WORKERCALLBACKFUNC = StdCallCodePointer[[PVOID],[]];

alias APC_CALLBACK_FUNCTION = StdCallCodePointer[[DWORD, PVOID, PVOID],[]];

alias PFLS_CALLBACK_FUNCTION = StdCallCodePointer[[PVOID],[]];

alias PSECURE_MEMORY_CACHE_CALLBACK = StdCallCodePointer[[PVOID, SIZE_T],[BOOLEAN]];

alias Enum__ACTIVATION_CONTEXT_INFO_CLASS = Int;
alias ActivationContextBasicInformation = 1;
alias ActivationContextDetailedInformation = 2;
alias AssemblyDetailedInformationInActivationContext = 3;
alias FileInformationInAssemblyOfAssemblyInActivationContext = 4;
alias RunlevelInformationInActivationContext = 5;
alias CompatibilityInformationInActivationContext = 6;
alias ActivationContextManifestResourceName = 7;
alias MaxActivationContextInfoClass = 8;
alias AssemblyDetailedInformationInActivationContxt = 3;
alias FileInformationInAssemblyOfAssemblyInActivationContxt = 4;

alias ACTIVATION_CONTEXT_INFO_CLASS = Enum__ACTIVATION_CONTEXT_INFO_CLASS;

record Struct__ACTIVATION_CONTEXT_QUERY_INDEX (
    ulAssemblyIndex : DWORD,
    ulFileIndexInAssembly : DWORD,
);

alias ACTIVATION_CONTEXT_QUERY_INDEX = Struct__ACTIVATION_CONTEXT_QUERY_INDEX;

alias PACTIVATION_CONTEXT_QUERY_INDEX = Pointer[Struct__ACTIVATION_CONTEXT_QUERY_INDEX];

alias PCACTIVATION_CONTEXT_QUERY_INDEX = Pointer[Struct__ACTIVATION_CONTEXT_QUERY_INDEX];

record Struct__ASSEMBLY_FILE_DETAILED_INFORMATION (
    ulFlags : DWORD,
    ulFilenameLength : DWORD,
    ulPathLength : DWORD,
    lpFileName : PCWSTR,
    lpFilePath : PCWSTR,
);

alias ASSEMBLY_FILE_DETAILED_INFORMATION = Struct__ASSEMBLY_FILE_DETAILED_INFORMATION;

alias PASSEMBLY_FILE_DETAILED_INFORMATION = Pointer[Struct__ASSEMBLY_FILE_DETAILED_INFORMATION];

alias PCASSEMBLY_FILE_DETAILED_INFORMATION = Pointer[ASSEMBLY_FILE_DETAILED_INFORMATION];

record Struct__ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION (
    ulFlags : DWORD,
    ulEncodedAssemblyIdentityLength : DWORD,
    ulManifestPathType : DWORD,
    ulManifestPathLength : DWORD,
    liManifestLastWriteTime : LARGE_INTEGER,
    ulPolicyPathType : DWORD,
    ulPolicyPathLength : DWORD,
    liPolicyLastWriteTime : LARGE_INTEGER,
    ulMetadataSatelliteRosterIndex : DWORD,
    ulManifestVersionMajor : DWORD,
    ulManifestVersionMinor : DWORD,
    ulPolicyVersionMajor : DWORD,
    ulPolicyVersionMinor : DWORD,
    ulAssemblyDirectoryNameLength : DWORD,
    lpAssemblyEncodedAssemblyIdentity : PCWSTR,
    lpAssemblyManifestPath : PCWSTR,
    lpAssemblyPolicyPath : PCWSTR,
    lpAssemblyDirectoryName : PCWSTR,
    ulFileCount : DWORD,
);

alias ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = Struct__ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;

alias PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = Pointer[Struct__ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION];

alias PCACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = Pointer[Struct__ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION];

alias Enum_Unnamed93 = Int;
alias ACTCTX_RUN_LEVEL_UNSPECIFIED = 0;
alias ACTCTX_RUN_LEVEL_AS_INVOKER = 1;
alias ACTCTX_RUN_LEVEL_HIGHEST_AVAILABLE = 2;
alias ACTCTX_RUN_LEVEL_REQUIRE_ADMIN = 3;
alias ACTCTX_RUN_LEVEL_NUMBERS = 4;

alias ACTCTX_REQUESTED_RUN_LEVEL = Enum_Unnamed93;

record Struct__ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION (
    ulFlags : DWORD,
    RunLevel : ACTCTX_REQUESTED_RUN_LEVEL,
    UiAccess : DWORD,
);

alias ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = Struct__ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION;

alias PACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = Pointer[Struct__ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION];

alias PCACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = Pointer[Struct__ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION];

alias Enum_Unnamed94 = Int;
alias ACTCTX_COMPATIBILITY_ELEMENT_TYPE_UNKNOWN = 0;
alias ACTCTX_COMPATIBILITY_ELEMENT_TYPE_OS = 1;
alias ACTCTX_COMPATIBILITY_ELEMENT_TYPE_MITIGATION = 2;

alias ACTCTX_COMPATIBILITY_ELEMENT_TYPE = Enum_Unnamed94;

record Struct__COMPATIBILITY_CONTEXT_ELEMENT (
    Id : GUID,
    Type : ACTCTX_COMPATIBILITY_ELEMENT_TYPE,
);

alias COMPATIBILITY_CONTEXT_ELEMENT = Struct__COMPATIBILITY_CONTEXT_ELEMENT;

alias PCOMPATIBILITY_CONTEXT_ELEMENT = Pointer[Struct__COMPATIBILITY_CONTEXT_ELEMENT];

alias PCCOMPATIBILITY_CONTEXT_ELEMENT = Pointer[Struct__COMPATIBILITY_CONTEXT_ELEMENT];

record Struct__ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION (
    ElementCount : DWORD,
    Elements : Opaque /* unknown NoDeclFound  */,
);

alias ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = Struct__ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION;

alias PACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = Pointer[Struct__ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION];

alias PCACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = Pointer[Struct__ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION];

record Struct__SUPPORTED_OS_INFO (
    OsCount : WORD,
    MitigationExist : WORD,
    OsList : Array[WORD, 4],
);

alias SUPPORTED_OS_INFO = Struct__SUPPORTED_OS_INFO;

alias PSUPPORTED_OS_INFO = Pointer[Struct__SUPPORTED_OS_INFO];

record Struct__ACTIVATION_CONTEXT_DETAILED_INFORMATION (
    dwFlags : DWORD,
    ulFormatVersion : DWORD,
    ulAssemblyCount : DWORD,
    ulRootManifestPathType : DWORD,
    ulRootManifestPathChars : DWORD,
    ulRootConfigurationPathType : DWORD,
    ulRootConfigurationPathChars : DWORD,
    ulAppDirPathType : DWORD,
    ulAppDirPathChars : DWORD,
    lpRootManifestPath : PCWSTR,
    lpRootConfigurationPath : PCWSTR,
    lpAppDirPath : PCWSTR,
);

alias ACTIVATION_CONTEXT_DETAILED_INFORMATION = Struct__ACTIVATION_CONTEXT_DETAILED_INFORMATION;

alias PACTIVATION_CONTEXT_DETAILED_INFORMATION = Pointer[Struct__ACTIVATION_CONTEXT_DETAILED_INFORMATION];

alias PCACTIVATION_CONTEXT_DETAILED_INFORMATION = Pointer[Struct__ACTIVATION_CONTEXT_DETAILED_INFORMATION];

record Struct__HARDWARE_COUNTER_DATA (
    Type : HARDWARE_COUNTER_TYPE,
    Reserved : DWORD,
    Value : DWORD64,
);

alias HARDWARE_COUNTER_DATA = Struct__HARDWARE_COUNTER_DATA;

alias PHARDWARE_COUNTER_DATA = Pointer[Struct__HARDWARE_COUNTER_DATA];

record Struct__PERFORMANCE_DATA (
    Size : WORD,
    Version : BYTE,
    HwCountersCount : BYTE,
    ContextSwitchCount : DWORD,
    WaitReasonBitMap : DWORD64,
    CycleTime : DWORD64,
    RetryCount : DWORD,
    Reserved : DWORD,
    HwCounters : Array[HARDWARE_COUNTER_DATA, 16],
);

alias PERFORMANCE_DATA = Struct__PERFORMANCE_DATA;

alias PPERFORMANCE_DATA = Pointer[Struct__PERFORMANCE_DATA];

record Struct__EVENTLOGRECORD (
    Length : DWORD,
    Reserved : DWORD,
    RecordNumber : DWORD,
    TimeGenerated : DWORD,
    TimeWritten : DWORD,
    EventID : DWORD,
    EventType : WORD,
    NumStrings : WORD,
    EventCategory : WORD,
    ReservedFlags : WORD,
    ClosingRecordNumber : DWORD,
    StringOffset : DWORD,
    UserSidLength : DWORD,
    UserSidOffset : DWORD,
    DataLength : DWORD,
    DataOffset : DWORD,
);

alias EVENTLOGRECORD = Struct__EVENTLOGRECORD;

alias PEVENTLOGRECORD = Pointer[Struct__EVENTLOGRECORD];

alias EVENTSFORLOGFILE = Struct__EVENTSFORLOGFILE;

alias PEVENTSFORLOGFILE = Pointer[Struct__EVENTSFORLOGFILE];

alias PACKEDEVENTINFO = Struct__PACKEDEVENTINFO;

alias PPACKEDEVENTINFO = Pointer[Struct__PACKEDEVENTINFO];

record Struct__EVENTSFORLOGFILE (
    ulSize : DWORD,
    szLogicalLogFile : Array[WCHAR, 256],
    ulNumRecords : DWORD,
    pEventLogRecords : Opaque /* unknown NoDeclFound  */,
);

record Struct__PACKEDEVENTINFO (
    ulSize : DWORD,
    ulNumEventsForLogFile : DWORD,
    ulOffsets : Opaque /* unknown NoDeclFound  */,
);

alias Enum__CM_SERVICE_NODE_TYPE = Int;
alias DriverType = 1;
alias FileSystemType = 2;
alias Win32ServiceOwnProcess = 16;
alias Win32ServiceShareProcess = 32;
alias AdapterType = 4;
alias RecognizerType = 8;

alias SERVICE_NODE_TYPE = Enum__CM_SERVICE_NODE_TYPE;

alias Enum__CM_SERVICE_LOAD_TYPE = Int;
alias BootLoad = 0;
alias SystemLoad = 1;
alias AutoLoad = 2;
alias DemandLoad = 3;
alias DisableLoad = 4;

alias SERVICE_LOAD_TYPE = Enum__CM_SERVICE_LOAD_TYPE;

alias Enum__CM_ERROR_CONTROL_TYPE = Int;
alias IgnoreError = 0;
alias NormalError = 1;
alias SevereError = 2;
alias CriticalError = 3;

alias SERVICE_ERROR_TYPE = Enum__CM_ERROR_CONTROL_TYPE;

record Struct__TAPE_ERASE (
    Type : DWORD,
    Immediate : BOOLEAN,
);

alias TAPE_ERASE = Struct__TAPE_ERASE;

alias PTAPE_ERASE = Pointer[Struct__TAPE_ERASE];

record Struct__TAPE_PREPARE (
    Operation : DWORD,
    Immediate : BOOLEAN,
);

alias TAPE_PREPARE = Struct__TAPE_PREPARE;

alias PTAPE_PREPARE = Pointer[Struct__TAPE_PREPARE];

record Struct__TAPE_WRITE_MARKS (
    Type : DWORD,
    Count : DWORD,
    Immediate : BOOLEAN,
);

alias TAPE_WRITE_MARKS = Struct__TAPE_WRITE_MARKS;

alias PTAPE_WRITE_MARKS = Pointer[Struct__TAPE_WRITE_MARKS];

record Struct__TAPE_GET_POSITION (
    Type : DWORD,
    Partition : DWORD,
    Offset : LARGE_INTEGER,
);

alias TAPE_GET_POSITION = Struct__TAPE_GET_POSITION;

alias PTAPE_GET_POSITION = Pointer[Struct__TAPE_GET_POSITION];

record Struct__TAPE_SET_POSITION (
    Method : DWORD,
    Partition : DWORD,
    Offset : LARGE_INTEGER,
    Immediate : BOOLEAN,
);

alias TAPE_SET_POSITION = Struct__TAPE_SET_POSITION;

alias PTAPE_SET_POSITION = Pointer[Struct__TAPE_SET_POSITION];

record Struct__TAPE_GET_DRIVE_PARAMETERS (
    ECC : BOOLEAN,
    Compression : BOOLEAN,
    DataPadding : BOOLEAN,
    ReportSetmarks : BOOLEAN,
    DefaultBlockSize : DWORD,
    MaximumBlockSize : DWORD,
    MinimumBlockSize : DWORD,
    MaximumPartitionCount : DWORD,
    FeaturesLow : DWORD,
    FeaturesHigh : DWORD,
    EOTWarningZoneSize : DWORD,
);

alias TAPE_GET_DRIVE_PARAMETERS = Struct__TAPE_GET_DRIVE_PARAMETERS;

alias PTAPE_GET_DRIVE_PARAMETERS = Pointer[Struct__TAPE_GET_DRIVE_PARAMETERS];

record Struct__TAPE_SET_DRIVE_PARAMETERS (
    ECC : BOOLEAN,
    Compression : BOOLEAN,
    DataPadding : BOOLEAN,
    ReportSetmarks : BOOLEAN,
    EOTWarningZoneSize : DWORD,
);

alias TAPE_SET_DRIVE_PARAMETERS = Struct__TAPE_SET_DRIVE_PARAMETERS;

alias PTAPE_SET_DRIVE_PARAMETERS = Pointer[Struct__TAPE_SET_DRIVE_PARAMETERS];

record Struct__TAPE_GET_MEDIA_PARAMETERS (
    Capacity : LARGE_INTEGER,
    Remaining : LARGE_INTEGER,
    BlockSize : DWORD,
    PartitionCount : DWORD,
    WriteProtected : BOOLEAN,
);

alias TAPE_GET_MEDIA_PARAMETERS = Struct__TAPE_GET_MEDIA_PARAMETERS;

alias PTAPE_GET_MEDIA_PARAMETERS = Pointer[Struct__TAPE_GET_MEDIA_PARAMETERS];

record Struct__TAPE_SET_MEDIA_PARAMETERS (
    BlockSize : DWORD,
);

alias TAPE_SET_MEDIA_PARAMETERS = Struct__TAPE_SET_MEDIA_PARAMETERS;

alias PTAPE_SET_MEDIA_PARAMETERS = Pointer[Struct__TAPE_SET_MEDIA_PARAMETERS];

record Struct__TAPE_CREATE_PARTITION (
    Method : DWORD,
    Count : DWORD,
    Size : DWORD,
);

alias TAPE_CREATE_PARTITION = Struct__TAPE_CREATE_PARTITION;

alias PTAPE_CREATE_PARTITION = Pointer[Struct__TAPE_CREATE_PARTITION];

record Struct__TAPE_WMI_OPERATIONS (
    Method : DWORD,
    DataBufferSize : DWORD,
    DataBuffer : PVOID,
);

alias TAPE_WMI_OPERATIONS = Struct__TAPE_WMI_OPERATIONS;

alias PTAPE_WMI_OPERATIONS = Pointer[Struct__TAPE_WMI_OPERATIONS];

alias Enum__TAPE_DRIVE_PROBLEM_TYPE = Int;
alias TapeDriveProblemNone = 0;
alias TapeDriveReadWriteWarning = 1;
alias TapeDriveReadWriteError = 2;
alias TapeDriveReadWarning = 3;
alias TapeDriveWriteWarning = 4;
alias TapeDriveReadError = 5;
alias TapeDriveWriteError = 6;
alias TapeDriveHardwareError = 7;
alias TapeDriveUnsupportedMedia = 8;
alias TapeDriveScsiConnectionError = 9;
alias TapeDriveTimetoClean = 10;
alias TapeDriveCleanDriveNow = 11;
alias TapeDriveMediaLifeExpired = 12;
alias TapeDriveSnappedTape = 13;

alias TAPE_DRIVE_PROBLEM_TYPE = Enum__TAPE_DRIVE_PROBLEM_TYPE;

alias UOW = GUID;

alias PUOW = Pointer[GUID];

alias CRM_PROTOCOL_ID = GUID;

alias PCRM_PROTOCOL_ID = Pointer[GUID];

alias NOTIFICATION_MASK = ULONG;

record Struct__TRANSACTION_NOTIFICATION (
    TransactionKey : PVOID,
    TransactionNotification : ULONG,
    TmVirtualClock : LARGE_INTEGER,
    ArgumentLength : ULONG,
);

alias TRANSACTION_NOTIFICATION = Struct__TRANSACTION_NOTIFICATION;

alias PTRANSACTION_NOTIFICATION = Pointer[Struct__TRANSACTION_NOTIFICATION];

record Struct__TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT (
    EnlistmentId : GUID,
    UOW : UOW,
);

alias TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT = Struct__TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT;

alias PTRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT = Pointer[Struct__TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT];

record Struct__TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT (
    TmIdentity : GUID,
    Flags : ULONG,
);

alias TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT = Struct__TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT;

alias PTRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT = Pointer[Struct__TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT];

alias SAVEPOINT_ID = ULONG;

alias PSAVEPOINT_ID = Pointer[ULONG];

record Struct__TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT (
    SavepointId : SAVEPOINT_ID,
);

alias TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT = Struct__TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT;

alias PTRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT = Pointer[Struct__TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT];

record Struct__TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT (
    PropagationCookie : ULONG,
    UOW : GUID,
    TmIdentity : GUID,
    BufferLength : ULONG,
);

alias TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT = Struct__TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT;

alias PTRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT = Pointer[Struct__TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT];

record Struct__TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT (
    MarshalCookie : ULONG,
    UOW : GUID,
);

alias TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT = Struct__TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT;

alias PTRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT = Pointer[Struct__TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT];

alias TRANSACTION_NOTIFICATION_PROMOTE_ARGUMENT = TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT;

alias PTRANSACTION_NOTIFICATION_PROMOTE_ARGUMENT = Pointer[TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT];

record Struct__KCRM_MARSHAL_HEADER (
    VersionMajor : ULONG,
    VersionMinor : ULONG,
    NumProtocols : ULONG,
    Unused : ULONG,
);

alias KCRM_MARSHAL_HEADER = Struct__KCRM_MARSHAL_HEADER;

alias PKCRM_MARSHAL_HEADER = Pointer[Struct__KCRM_MARSHAL_HEADER];

alias PRKCRM_MARSHAL_HEADER = Pointer[Struct__KCRM_MARSHAL_HEADER];

record Struct__KCRM_TRANSACTION_BLOB (
    UOW : UOW,
    TmIdentity : GUID,
    IsolationLevel : ULONG,
    IsolationFlags : ULONG,
    Timeout : ULONG,
    Description : Array[WCHAR, 64],
);

alias KCRM_TRANSACTION_BLOB = Struct__KCRM_TRANSACTION_BLOB;

alias PKCRM_TRANSACTION_BLOB = Pointer[Struct__KCRM_TRANSACTION_BLOB];

alias PRKCRM_TRANSACTION_BLOB = Pointer[Struct__KCRM_TRANSACTION_BLOB];

record Struct__KCRM_PROTOCOL_BLOB (
    ProtocolId : CRM_PROTOCOL_ID,
    StaticInfoLength : ULONG,
    TransactionIdInfoLength : ULONG,
    Unused1 : ULONG,
    Unused2 : ULONG,
);

alias KCRM_PROTOCOL_BLOB = Struct__KCRM_PROTOCOL_BLOB;

alias PKCRM_PROTOCOL_BLOB = Pointer[Struct__KCRM_PROTOCOL_BLOB];

alias PRKCRM_PROTOCOL_BLOB = Pointer[Struct__KCRM_PROTOCOL_BLOB];

alias Enum__TRANSACTION_OUTCOME = Int;
alias TransactionOutcomeUndetermined = 1;
alias TransactionOutcomeCommitted = 2;
alias TransactionOutcomeAborted = 3;

alias TRANSACTION_OUTCOME = Enum__TRANSACTION_OUTCOME;

alias Enum__TRANSACTION_STATE = Int;
alias TransactionStateNormal = 1;
alias TransactionStateIndoubt = 2;
alias TransactionStateCommittedNotify = 3;

alias TRANSACTION_STATE = Enum__TRANSACTION_STATE;

record Struct__TRANSACTION_BASIC_INFORMATION (
    TransactionId : GUID,
    State : DWORD,
    Outcome : DWORD,
);

alias TRANSACTION_BASIC_INFORMATION = Struct__TRANSACTION_BASIC_INFORMATION;

alias PTRANSACTION_BASIC_INFORMATION = Pointer[Struct__TRANSACTION_BASIC_INFORMATION];

record Struct__TRANSACTIONMANAGER_BASIC_INFORMATION (
    TmIdentity : GUID,
    VirtualClock : LARGE_INTEGER,
);

alias TRANSACTIONMANAGER_BASIC_INFORMATION = Struct__TRANSACTIONMANAGER_BASIC_INFORMATION;

alias PTRANSACTIONMANAGER_BASIC_INFORMATION = Pointer[Struct__TRANSACTIONMANAGER_BASIC_INFORMATION];

record Struct__TRANSACTIONMANAGER_LOG_INFORMATION (
    LogIdentity : GUID,
);

alias TRANSACTIONMANAGER_LOG_INFORMATION = Struct__TRANSACTIONMANAGER_LOG_INFORMATION;

alias PTRANSACTIONMANAGER_LOG_INFORMATION = Pointer[Struct__TRANSACTIONMANAGER_LOG_INFORMATION];

record Struct__TRANSACTIONMANAGER_LOGPATH_INFORMATION (
    LogPathLength : DWORD,
    LogPath : Array[WCHAR, 1],
);

alias TRANSACTIONMANAGER_LOGPATH_INFORMATION = Struct__TRANSACTIONMANAGER_LOGPATH_INFORMATION;

alias PTRANSACTIONMANAGER_LOGPATH_INFORMATION = Pointer[Struct__TRANSACTIONMANAGER_LOGPATH_INFORMATION];

record Struct__TRANSACTIONMANAGER_RECOVERY_INFORMATION (
    LastRecoveredLsn : ULONGLONG,
);

alias TRANSACTIONMANAGER_RECOVERY_INFORMATION = Struct__TRANSACTIONMANAGER_RECOVERY_INFORMATION;

alias PTRANSACTIONMANAGER_RECOVERY_INFORMATION = Pointer[Struct__TRANSACTIONMANAGER_RECOVERY_INFORMATION];

record Struct__TRANSACTIONMANAGER_OLDEST_INFORMATION (
    OldestTransactionGuid : GUID,
);

alias TRANSACTIONMANAGER_OLDEST_INFORMATION = Struct__TRANSACTIONMANAGER_OLDEST_INFORMATION;

alias PTRANSACTIONMANAGER_OLDEST_INFORMATION = Pointer[Struct__TRANSACTIONMANAGER_OLDEST_INFORMATION];

record Struct__TRANSACTION_PROPERTIES_INFORMATION (
    IsolationLevel : DWORD,
    IsolationFlags : DWORD,
    Timeout : LARGE_INTEGER,
    Outcome : DWORD,
    DescriptionLength : DWORD,
    Description : Array[WCHAR, 1],
);

alias TRANSACTION_PROPERTIES_INFORMATION = Struct__TRANSACTION_PROPERTIES_INFORMATION;

alias PTRANSACTION_PROPERTIES_INFORMATION = Pointer[Struct__TRANSACTION_PROPERTIES_INFORMATION];

record Struct__TRANSACTION_BIND_INFORMATION (
    TmHandle : HANDLE,
);

alias TRANSACTION_BIND_INFORMATION = Struct__TRANSACTION_BIND_INFORMATION;

alias PTRANSACTION_BIND_INFORMATION = Pointer[Struct__TRANSACTION_BIND_INFORMATION];

record Struct__TRANSACTION_ENLISTMENT_PAIR (
    EnlistmentId : GUID,
    ResourceManagerId : GUID,
);

alias TRANSACTION_ENLISTMENT_PAIR = Struct__TRANSACTION_ENLISTMENT_PAIR;

alias PTRANSACTION_ENLISTMENT_PAIR = Pointer[Struct__TRANSACTION_ENLISTMENT_PAIR];

record Struct__TRANSACTION_ENLISTMENTS_INFORMATION (
    NumberOfEnlistments : DWORD,
    EnlistmentPair : Array[TRANSACTION_ENLISTMENT_PAIR, 1],
);

alias TRANSACTION_ENLISTMENTS_INFORMATION = Struct__TRANSACTION_ENLISTMENTS_INFORMATION;

alias PTRANSACTION_ENLISTMENTS_INFORMATION = Pointer[Struct__TRANSACTION_ENLISTMENTS_INFORMATION];

record Struct__TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION (
    SuperiorEnlistmentPair : TRANSACTION_ENLISTMENT_PAIR,
);

alias TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION = Struct__TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION;

alias PTRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION = Pointer[Struct__TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION];

record Struct__RESOURCEMANAGER_BASIC_INFORMATION (
    ResourceManagerId : GUID,
    DescriptionLength : DWORD,
    Description : Array[WCHAR, 1],
);

alias RESOURCEMANAGER_BASIC_INFORMATION = Struct__RESOURCEMANAGER_BASIC_INFORMATION;

alias PRESOURCEMANAGER_BASIC_INFORMATION = Pointer[Struct__RESOURCEMANAGER_BASIC_INFORMATION];

record Struct__RESOURCEMANAGER_COMPLETION_INFORMATION (
    IoCompletionPortHandle : HANDLE,
    CompletionKey : ULONG_PTR,
);

alias RESOURCEMANAGER_COMPLETION_INFORMATION = Struct__RESOURCEMANAGER_COMPLETION_INFORMATION;

alias PRESOURCEMANAGER_COMPLETION_INFORMATION = Pointer[Struct__RESOURCEMANAGER_COMPLETION_INFORMATION];

alias Enum__TRANSACTION_INFORMATION_CLASS = Int;
alias TransactionBasicInformation = 0;
alias TransactionPropertiesInformation = 1;
alias TransactionEnlistmentInformation = 2;
alias TransactionSuperiorEnlistmentInformation = 3;
alias TransactionBindInformation = 4;
alias TransactionDTCPrivateInformation = 5;

alias TRANSACTION_INFORMATION_CLASS = Enum__TRANSACTION_INFORMATION_CLASS;

alias Enum__TRANSACTIONMANAGER_INFORMATION_CLASS = Int;
alias TransactionManagerBasicInformation = 0;
alias TransactionManagerLogInformation = 1;
alias TransactionManagerLogPathInformation = 2;
alias TransactionManagerRecoveryInformation = 4;
alias TransactionManagerOnlineProbeInformation = 3;
alias TransactionManagerOldestTransactionInformation = 5;

alias TRANSACTIONMANAGER_INFORMATION_CLASS = Enum__TRANSACTIONMANAGER_INFORMATION_CLASS;

alias Enum__RESOURCEMANAGER_INFORMATION_CLASS = Int;
alias ResourceManagerBasicInformation = 0;
alias ResourceManagerCompletionInformation = 1;

alias RESOURCEMANAGER_INFORMATION_CLASS = Enum__RESOURCEMANAGER_INFORMATION_CLASS;

record Struct__ENLISTMENT_BASIC_INFORMATION (
    EnlistmentId : GUID,
    TransactionId : GUID,
    ResourceManagerId : GUID,
);

alias ENLISTMENT_BASIC_INFORMATION = Struct__ENLISTMENT_BASIC_INFORMATION;

alias PENLISTMENT_BASIC_INFORMATION = Pointer[Struct__ENLISTMENT_BASIC_INFORMATION];

record Struct__ENLISTMENT_CRM_INFORMATION (
    CrmTransactionManagerId : GUID,
    CrmResourceManagerId : GUID,
    CrmEnlistmentId : GUID,
);

alias ENLISTMENT_CRM_INFORMATION = Struct__ENLISTMENT_CRM_INFORMATION;

alias PENLISTMENT_CRM_INFORMATION = Pointer[Struct__ENLISTMENT_CRM_INFORMATION];

alias Enum__ENLISTMENT_INFORMATION_CLASS = Int;
alias EnlistmentBasicInformation = 0;
alias EnlistmentRecoveryInformation = 1;
alias EnlistmentCrmInformation = 2;

alias ENLISTMENT_INFORMATION_CLASS = Enum__ENLISTMENT_INFORMATION_CLASS;

record Struct__TRANSACTION_LIST_ENTRY (
    UOW : UOW,
);

alias TRANSACTION_LIST_ENTRY = Struct__TRANSACTION_LIST_ENTRY;

alias PTRANSACTION_LIST_ENTRY = Pointer[Struct__TRANSACTION_LIST_ENTRY];

record Struct__TRANSACTION_LIST_INFORMATION (
    NumberOfTransactions : DWORD,
    TransactionInformation : Array[TRANSACTION_LIST_ENTRY, 1],
);

alias TRANSACTION_LIST_INFORMATION = Struct__TRANSACTION_LIST_INFORMATION;

alias PTRANSACTION_LIST_INFORMATION = Pointer[Struct__TRANSACTION_LIST_INFORMATION];

alias Enum__KTMOBJECT_TYPE = Int;
alias KTMOBJECT_TRANSACTION = 0;
alias KTMOBJECT_TRANSACTION_MANAGER = 1;
alias KTMOBJECT_RESOURCE_MANAGER = 2;
alias KTMOBJECT_ENLISTMENT = 3;
alias KTMOBJECT_INVALID = 4;

alias KTMOBJECT_TYPE = Enum__KTMOBJECT_TYPE;

alias PKTMOBJECT_TYPE = Pointer[Enum__KTMOBJECT_TYPE];

record Struct__KTMOBJECT_CURSOR (
    LastQuery : GUID,
    ObjectIdCount : DWORD,
    ObjectIds : Array[GUID, 1],
);

alias KTMOBJECT_CURSOR = Struct__KTMOBJECT_CURSOR;

alias PKTMOBJECT_CURSOR = Pointer[Struct__KTMOBJECT_CURSOR];

alias TP_VERSION = DWORD;

alias PTP_VERSION = Pointer[DWORD];

alias Struct__TP_CALLBACK_INSTANCE = Opaque;

alias TP_CALLBACK_INSTANCE = Struct__TP_CALLBACK_INSTANCE;

alias PTP_CALLBACK_INSTANCE = Pointer[Struct__TP_CALLBACK_INSTANCE];

alias PTP_SIMPLE_CALLBACK = StdCallCodePointer[[PTP_CALLBACK_INSTANCE, PVOID],[]];

alias Struct__TP_POOL = Opaque;

alias TP_POOL = Struct__TP_POOL;

alias PTP_POOL = Pointer[Struct__TP_POOL];

alias Enum__TP_CALLBACK_PRIORITY = Int;
alias TP_CALLBACK_PRIORITY_HIGH = 0;
alias TP_CALLBACK_PRIORITY_NORMAL = 1;
alias TP_CALLBACK_PRIORITY_LOW = 2;
alias TP_CALLBACK_PRIORITY_INVALID = 3;

alias TP_CALLBACK_PRIORITY = Enum__TP_CALLBACK_PRIORITY;

record Struct__TP_POOL_STACK_INFORMATION (
    StackReserve : SIZE_T,
    StackCommit : SIZE_T,
);

alias TP_POOL_STACK_INFORMATION = Struct__TP_POOL_STACK_INFORMATION;

alias PTP_POOL_STACK_INFORMATION = Pointer[Struct__TP_POOL_STACK_INFORMATION];

alias Struct__TP_CLEANUP_GROUP = Opaque;

alias TP_CLEANUP_GROUP = Struct__TP_CLEANUP_GROUP;

alias PTP_CLEANUP_GROUP = Pointer[Struct__TP_CLEANUP_GROUP];

alias PTP_CLEANUP_GROUP_CANCEL_CALLBACK = StdCallCodePointer[[PVOID, PVOID],[]];

record Struct__TP_CALLBACK_ENVIRON_V3 (
    Version : TP_VERSION,
    Pool : PTP_POOL,
    CleanupGroup : PTP_CLEANUP_GROUP,
    CleanupGroupCancelCallback : PTP_CLEANUP_GROUP_CANCEL_CALLBACK,
    RaceDll : PVOID,
    ActivationContext : Pointer[Struct__ACTIVATION_CONTEXT],
    FinalizationCallback : PTP_SIMPLE_CALLBACK,
    u : Union_Unnamed95,
    CallbackPriority : TP_CALLBACK_PRIORITY,
    Size : DWORD,
);

alias Struct__ACTIVATION_CONTEXT = Opaque;

alias Union_Unnamed95 = Union[
    /* Flags */ DWORD,
    /* s */ Struct_Unnamed96,
];

record Struct_Unnamed96 (
    LongFunction : DWORD,
    Persistent : DWORD,
    Private : DWORD,
);

alias TP_CALLBACK_ENVIRON_V3 = Struct__TP_CALLBACK_ENVIRON_V3;

alias TP_CALLBACK_ENVIRON = TP_CALLBACK_ENVIRON_V3;

alias PTP_CALLBACK_ENVIRON = Pointer[TP_CALLBACK_ENVIRON_V3];

external (cdecl) TpInitializeCallbackEnviron(arg0:PTP_CALLBACK_ENVIRON) : ;

external (cdecl) TpSetCallbackThreadpool(arg0:PTP_CALLBACK_ENVIRON, arg1:PTP_POOL) : ;

external (cdecl) TpSetCallbackCleanupGroup(arg0:PTP_CALLBACK_ENVIRON, arg1:PTP_CLEANUP_GROUP, arg2:PTP_CLEANUP_GROUP_CANCEL_CALLBACK) : ;

external (cdecl) TpSetCallbackActivationContext(arg0:PTP_CALLBACK_ENVIRON, arg1:Pointer[Struct__ACTIVATION_CONTEXT]) : ;

external (cdecl) TpSetCallbackNoActivationContext(arg0:PTP_CALLBACK_ENVIRON) : ;

external (cdecl) TpSetCallbackLongFunction(arg0:PTP_CALLBACK_ENVIRON) : ;

external (cdecl) TpSetCallbackRaceWithDll(arg0:PTP_CALLBACK_ENVIRON, arg1:PVOID) : ;

external (cdecl) TpSetCallbackFinalizationCallback(arg0:PTP_CALLBACK_ENVIRON, arg1:PTP_SIMPLE_CALLBACK) : ;

external (cdecl) TpSetCallbackPriority(arg0:PTP_CALLBACK_ENVIRON, arg1:TP_CALLBACK_PRIORITY) : ;

external (cdecl) TpSetCallbackPersistent(arg0:PTP_CALLBACK_ENVIRON) : ;

external (cdecl) TpDestroyCallbackEnviron(arg0:PTP_CALLBACK_ENVIRON) : ;

alias Struct__TP_WORK = Opaque;

alias TP_WORK = Struct__TP_WORK;

alias PTP_WORK = Pointer[Struct__TP_WORK];

alias PTP_WORK_CALLBACK = StdCallCodePointer[[PTP_CALLBACK_INSTANCE, PVOID, PTP_WORK],[]];

alias Struct__TP_TIMER = Opaque;

alias TP_TIMER = Struct__TP_TIMER;

alias PTP_TIMER = Pointer[Struct__TP_TIMER];

alias PTP_TIMER_CALLBACK = StdCallCodePointer[[PTP_CALLBACK_INSTANCE, PVOID, PTP_TIMER],[]];

alias TP_WAIT_RESULT = DWORD;

alias Struct__TP_WAIT = Opaque;

alias TP_WAIT = Struct__TP_WAIT;

alias PTP_WAIT = Pointer[Struct__TP_WAIT];

alias PTP_WAIT_CALLBACK = StdCallCodePointer[[PTP_CALLBACK_INSTANCE, PVOID, PTP_WAIT, TP_WAIT_RESULT],[]];

alias Struct__TP_IO = Opaque;

alias TP_IO = Struct__TP_IO;

alias PTP_IO = Pointer[Struct__TP_IO];

alias Struct__TEB = Opaque;

external (cdecl) NtCurrentTeb() : Pointer[Struct__TEB];

alias WPARAM = UINT_PTR;

alias LPARAM = LONG_PTR;

alias LRESULT = LONG_PTR;

record Struct_HWND__ (
    unused : Int,
);

alias HWND = Pointer[Struct_HWND__];

record Struct_HHOOK__ (
    unused : Int,
);

alias HHOOK = Pointer[Struct_HHOOK__];

alias ATOM = WORD;

alias SPHANDLE = Pointer[HANDLE];

alias LPHANDLE = Pointer[HANDLE];

alias HGLOBAL = HANDLE;

alias HLOCAL = HANDLE;

alias GLOBALHANDLE = HANDLE;

alias LOCALHANDLE = HANDLE;

alias FARPROC = StdCallCodePointer[[],[Int]];

alias NEARPROC = StdCallCodePointer[[],[Int]];

alias PROC = StdCallCodePointer[[],[Int]];

alias HGDIOBJ = OpaquePointer;

record Struct_HKEY__ (
    unused : Int,
);

alias HKEY = Pointer[Struct_HKEY__];

alias PHKEY = Pointer[HKEY];

record Struct_HACCEL__ (
    unused : Int,
);

alias HACCEL = Pointer[Struct_HACCEL__];

record Struct_HBITMAP__ (
    unused : Int,
);

alias HBITMAP = Pointer[Struct_HBITMAP__];

record Struct_HBRUSH__ (
    unused : Int,
);

alias HBRUSH = Pointer[Struct_HBRUSH__];

record Struct_HCOLORSPACE__ (
    unused : Int,
);

alias HCOLORSPACE = Pointer[Struct_HCOLORSPACE__];

record Struct_HDC__ (
    unused : Int,
);

alias HDC = Pointer[Struct_HDC__];

record Struct_HGLRC__ (
    unused : Int,
);

alias HGLRC = Pointer[Struct_HGLRC__];

record Struct_HDESK__ (
    unused : Int,
);

alias HDESK = Pointer[Struct_HDESK__];

record Struct_HENHMETAFILE__ (
    unused : Int,
);

alias HENHMETAFILE = Pointer[Struct_HENHMETAFILE__];

record Struct_HFONT__ (
    unused : Int,
);

alias HFONT = Pointer[Struct_HFONT__];

record Struct_HICON__ (
    unused : Int,
);

alias HICON = Pointer[Struct_HICON__];

record Struct_HMENU__ (
    unused : Int,
);

alias HMENU = Pointer[Struct_HMENU__];

record Struct_HMETAFILE__ (
    unused : Int,
);

alias HMETAFILE = Pointer[Struct_HMETAFILE__];

record Struct_HINSTANCE__ (
    unused : Int,
);

alias HINSTANCE = Pointer[Struct_HINSTANCE__];

alias HMODULE = HINSTANCE;

record Struct_HPALETTE__ (
    unused : Int,
);

alias HPALETTE = Pointer[Struct_HPALETTE__];

record Struct_HPEN__ (
    unused : Int,
);

alias HPEN = Pointer[Struct_HPEN__];

record Struct_HRGN__ (
    unused : Int,
);

alias HRGN = Pointer[Struct_HRGN__];

record Struct_HRSRC__ (
    unused : Int,
);

alias HRSRC = Pointer[Struct_HRSRC__];

record Struct_HSPRITE__ (
    unused : Int,
);

alias HSPRITE = Pointer[Struct_HSPRITE__];

record Struct_HLSURF__ (
    unused : Int,
);

alias HLSURF = Pointer[Struct_HLSURF__];

record Struct_HSTR__ (
    unused : Int,
);

alias HSTR = Pointer[Struct_HSTR__];

record Struct_HTASK__ (
    unused : Int,
);

alias HTASK = Pointer[Struct_HTASK__];

record Struct_HWINSTA__ (
    unused : Int,
);

alias HWINSTA = Pointer[Struct_HWINSTA__];

record Struct_HKL__ (
    unused : Int,
);

alias HKL = Pointer[Struct_HKL__];

record Struct_HWINEVENTHOOK__ (
    unused : Int,
);

alias HWINEVENTHOOK = Pointer[Struct_HWINEVENTHOOK__];

record Struct_HMONITOR__ (
    unused : Int,
);

alias HMONITOR = Pointer[Struct_HMONITOR__];

record Struct_HUMPD__ (
    unused : Int,
);

alias HUMPD = Pointer[Struct_HUMPD__];

alias HFILE = Int;

alias HCURSOR = HICON;

alias COLORREF = DWORD;

alias LPCOLORREF = Pointer[DWORD];

record Struct_tagRECT (
    left : LONG,
    top : LONG,
    right : LONG,
    bottom : LONG,
);

alias RECT = Struct_tagRECT;

alias PRECT = Pointer[Struct_tagRECT];

alias NPRECT = Pointer[Struct_tagRECT];

alias LPRECT = Pointer[Struct_tagRECT];

alias LPCRECT = Pointer[RECT];

record Struct__RECTL (
    left : LONG,
    top : LONG,
    right : LONG,
    bottom : LONG,
);

alias RECTL = Struct__RECTL;

alias PRECTL = Pointer[Struct__RECTL];

alias LPRECTL = Pointer[Struct__RECTL];

alias LPCRECTL = Pointer[RECTL];

record Struct_tagPOINT (
    x : LONG,
    y : LONG,
);

alias POINT = Struct_tagPOINT;

alias PPOINT = Pointer[Struct_tagPOINT];

alias NPPOINT = Pointer[Struct_tagPOINT];

alias LPPOINT = Pointer[Struct_tagPOINT];

record Struct__POINTL (
    x : LONG,
    y : LONG,
);

alias POINTL = Struct__POINTL;

alias PPOINTL = Pointer[Struct__POINTL];

record Struct_tagSIZE (
    cx : LONG,
    cy : LONG,
);

alias SIZE = Struct_tagSIZE;

alias PSIZE = Pointer[Struct_tagSIZE];

alias LPSIZE = Pointer[Struct_tagSIZE];

alias SIZEL = SIZE;

alias PSIZEL = Pointer[SIZE];

alias LPSIZEL = Pointer[SIZE];

record Struct_tagPOINTS (
    x : SHORT,
    y : SHORT,
);

alias POINTS = Struct_tagPOINTS;

alias PPOINTS = Pointer[Struct_tagPOINTS];

alias LPPOINTS = Pointer[Struct_tagPOINTS];

record Struct__FILETIME (
    dwLowDateTime : DWORD,
    dwHighDateTime : DWORD,
);

alias FILETIME = Struct__FILETIME;

alias PFILETIME = Pointer[Struct__FILETIME];

alias LPFILETIME = Pointer[Struct__FILETIME];

record Struct__OVERLAPPED (
    Internal : ULONG_PTR,
    InternalHigh : ULONG_PTR,
    hEvent : HANDLE,
);

alias Union_Unnamed97 = Union[
    /* Pointer */ PVOID,
];

record Struct_Unnamed98 (
    Offset : DWORD,
    OffsetHigh : DWORD,
);

alias OVERLAPPED = Struct__OVERLAPPED;

alias LPOVERLAPPED = Pointer[Struct__OVERLAPPED];

record Struct__OVERLAPPED_ENTRY (
    lpCompletionKey : ULONG_PTR,
    lpOverlapped : LPOVERLAPPED,
    Internal : ULONG_PTR,
    dwNumberOfBytesTransferred : DWORD,
);

alias OVERLAPPED_ENTRY = Struct__OVERLAPPED_ENTRY;

alias LPOVERLAPPED_ENTRY = Pointer[Struct__OVERLAPPED_ENTRY];

record Struct__SECURITY_ATTRIBUTES (
    nLength : DWORD,
    lpSecurityDescriptor : LPVOID,
    bInheritHandle : BOOL,
);

alias SECURITY_ATTRIBUTES = Struct__SECURITY_ATTRIBUTES;

alias PSECURITY_ATTRIBUTES = Pointer[Struct__SECURITY_ATTRIBUTES];

alias LPSECURITY_ATTRIBUTES = Pointer[Struct__SECURITY_ATTRIBUTES];

record Struct__PROCESS_INFORMATION (
    hProcess : HANDLE,
    hThread : HANDLE,
    dwProcessId : DWORD,
    dwThreadId : DWORD,
);

alias PROCESS_INFORMATION = Struct__PROCESS_INFORMATION;

alias PPROCESS_INFORMATION = Pointer[Struct__PROCESS_INFORMATION];

alias LPPROCESS_INFORMATION = Pointer[Struct__PROCESS_INFORMATION];

record Struct__SYSTEMTIME (
    wYear : WORD,
    wMonth : WORD,
    wDayOfWeek : WORD,
    wDay : WORD,
    wHour : WORD,
    wMinute : WORD,
    wSecond : WORD,
    wMilliseconds : WORD,
);

alias SYSTEMTIME = Struct__SYSTEMTIME;

alias PSYSTEMTIME = Pointer[Struct__SYSTEMTIME];

alias LPSYSTEMTIME = Pointer[Struct__SYSTEMTIME];

alias PTHREAD_START_ROUTINE = StdCallCodePointer[[LPVOID],[DWORD]];

alias LPTHREAD_START_ROUTINE = PTHREAD_START_ROUTINE;

alias PFIBER_START_ROUTINE = StdCallCodePointer[[LPVOID],[]];

alias LPFIBER_START_ROUTINE = PFIBER_START_ROUTINE;

alias CRITICAL_SECTION = RTL_CRITICAL_SECTION;

alias PCRITICAL_SECTION = PRTL_CRITICAL_SECTION;

alias LPCRITICAL_SECTION = PRTL_CRITICAL_SECTION;

alias CRITICAL_SECTION_DEBUG = RTL_CRITICAL_SECTION_DEBUG;

alias PCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG;

alias LPCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG;

alias INIT_ONCE = RTL_RUN_ONCE;

alias PINIT_ONCE = PRTL_RUN_ONCE;

alias LPINIT_ONCE = PRTL_RUN_ONCE;

alias PINIT_ONCE_FN = StdCallCodePointer[[PINIT_ONCE, PVOID, Pointer[PVOID]],[BOOL]];

external (stdcall) InitOnceInitialize(arg0:PINIT_ONCE) : ;

external (stdcall) InitOnceExecuteOnce(arg0:PINIT_ONCE, arg1:PINIT_ONCE_FN, arg2:PVOID, arg3:Pointer[LPVOID]) : BOOL;

external (stdcall) InitOnceBeginInitialize(arg0:LPINIT_ONCE, arg1:DWORD, arg2:PBOOL, arg3:Pointer[LPVOID]) : BOOL;

external (stdcall) InitOnceComplete(arg0:LPINIT_ONCE, arg1:DWORD, arg2:LPVOID) : BOOL;

alias SRWLOCK = RTL_SRWLOCK;

alias PSRWLOCK = Pointer[RTL_SRWLOCK];

external (stdcall) InitializeSRWLock(arg0:PSRWLOCK) : ;

external (stdcall) ReleaseSRWLockExclusive(arg0:PSRWLOCK) : ;

external (stdcall) ReleaseSRWLockShared(arg0:PSRWLOCK) : ;

external (stdcall) AcquireSRWLockExclusive(arg0:PSRWLOCK) : ;

external (stdcall) AcquireSRWLockShared(arg0:PSRWLOCK) : ;

external (stdcall) TryAcquireSRWLockExclusive(arg0:PSRWLOCK) : BOOLEAN;

external (stdcall) TryAcquireSRWLockShared(arg0:PSRWLOCK) : BOOLEAN;

alias CONDITION_VARIABLE = RTL_CONDITION_VARIABLE;

alias PCONDITION_VARIABLE = Pointer[RTL_CONDITION_VARIABLE];

external (stdcall) InitializeConditionVariable(arg0:PCONDITION_VARIABLE) : ;

external (stdcall) WakeConditionVariable(arg0:PCONDITION_VARIABLE) : ;

external (stdcall) WakeAllConditionVariable(arg0:PCONDITION_VARIABLE) : ;

external (stdcall) SleepConditionVariableCS(arg0:PCONDITION_VARIABLE, arg1:PCRITICAL_SECTION, arg2:DWORD) : BOOL;

external (stdcall) SleepConditionVariableSRW(arg0:PCONDITION_VARIABLE, arg1:PSRWLOCK, arg2:DWORD, arg3:ULONG) : BOOL;

external (stdcall) EncodePointer(arg0:PVOID) : PVOID;

external (stdcall) DecodePointer(arg0:PVOID) : PVOID;

external (stdcall) EncodeSystemPointer(arg0:PVOID) : PVOID;

external (stdcall) DecodeSystemPointer(arg0:PVOID) : PVOID;

alias LPLDT_ENTRY = PLDT_ENTRY;

record Struct__COMMPROP (
    wPacketLength : WORD,
    wPacketVersion : WORD,
    dwServiceMask : DWORD,
    dwReserved1 : DWORD,
    dwMaxTxQueue : DWORD,
    dwMaxRxQueue : DWORD,
    dwMaxBaud : DWORD,
    dwProvSubType : DWORD,
    dwProvCapabilities : DWORD,
    dwSettableParams : DWORD,
    dwSettableBaud : DWORD,
    wSettableData : WORD,
    wSettableStopParity : WORD,
    dwCurrentTxQueue : DWORD,
    dwCurrentRxQueue : DWORD,
    dwProvSpec1 : DWORD,
    dwProvSpec2 : DWORD,
    wcProvChar : Array[WCHAR, 1],
);

alias COMMPROP = Struct__COMMPROP;

alias LPCOMMPROP = Pointer[Struct__COMMPROP];

record Struct__COMSTAT (
    fCtsHold : DWORD,
    fDsrHold : DWORD,
    fRlsdHold : DWORD,
    fXoffHold : DWORD,
    fXoffSent : DWORD,
    fEof : DWORD,
    fTxim : DWORD,
    fReserved : DWORD,
    cbInQue : DWORD,
    cbOutQue : DWORD,
);

alias COMSTAT = Struct__COMSTAT;

alias LPCOMSTAT = Pointer[Struct__COMSTAT];

record Struct__DCB (
    DCBlength : DWORD,
    BaudRate : DWORD,
    fBinary : DWORD,
    fParity : DWORD,
    fOutxCtsFlow : DWORD,
    fOutxDsrFlow : DWORD,
    fDtrControl : DWORD,
    fDsrSensitivity : DWORD,
    fTXContinueOnXoff : DWORD,
    fOutX : DWORD,
    fInX : DWORD,
    fErrorChar : DWORD,
    fNull : DWORD,
    fRtsControl : DWORD,
    fAbortOnError : DWORD,
    fDummy2 : DWORD,
    wReserved : WORD,
    XonLim : WORD,
    XoffLim : WORD,
    ByteSize : BYTE,
    Parity : BYTE,
    StopBits : BYTE,
    XonChar : CChar,
    XoffChar : CChar,
    ErrorChar : CChar,
    EofChar : CChar,
    EvtChar : CChar,
    wReserved1 : WORD,
);

alias DCB = Struct__DCB;

alias LPDCB = Pointer[Struct__DCB];

record Struct__COMMTIMEOUTS (
    ReadIntervalTimeout : DWORD,
    ReadTotalTimeoutMultiplier : DWORD,
    ReadTotalTimeoutConstant : DWORD,
    WriteTotalTimeoutMultiplier : DWORD,
    WriteTotalTimeoutConstant : DWORD,
);

alias COMMTIMEOUTS = Struct__COMMTIMEOUTS;

alias LPCOMMTIMEOUTS = Pointer[Struct__COMMTIMEOUTS];

record Struct__COMMCONFIG (
    dwSize : DWORD,
    wVersion : WORD,
    wReserved : WORD,
    dcb : DCB,
    dwProviderSubType : DWORD,
    dwProviderOffset : DWORD,
    dwProviderSize : DWORD,
    wcProviderData : Array[WCHAR, 1],
);

alias COMMCONFIG = Struct__COMMCONFIG;

alias LPCOMMCONFIG = Pointer[Struct__COMMCONFIG];

record Struct__SYSTEM_INFO (
    dwPageSize : DWORD,
    lpMinimumApplicationAddress : LPVOID,
    lpMaximumApplicationAddress : LPVOID,
    dwActiveProcessorMask : DWORD_PTR,
    dwNumberOfProcessors : DWORD,
    dwProcessorType : DWORD,
    dwAllocationGranularity : DWORD,
    wProcessorLevel : WORD,
    wProcessorRevision : WORD,
);

alias Union_Unnamed99 = Union[
    /* dwOemId */ DWORD,
];

record Struct_Unnamed100 (
    wProcessorArchitecture : WORD,
    wReserved : WORD,
);

alias SYSTEM_INFO = Struct__SYSTEM_INFO;

alias LPSYSTEM_INFO = Pointer[Struct__SYSTEM_INFO];

record Struct__MEMORYSTATUS (
    dwLength : DWORD,
    dwMemoryLoad : DWORD,
    dwTotalPhys : SIZE_T,
    dwAvailPhys : SIZE_T,
    dwTotalPageFile : SIZE_T,
    dwAvailPageFile : SIZE_T,
    dwTotalVirtual : SIZE_T,
    dwAvailVirtual : SIZE_T,
);

alias MEMORYSTATUS = Struct__MEMORYSTATUS;

alias LPMEMORYSTATUS = Pointer[Struct__MEMORYSTATUS];

record Struct__EXCEPTION_DEBUG_INFO (
    ExceptionRecord : EXCEPTION_RECORD,
    dwFirstChance : DWORD,
);

alias EXCEPTION_DEBUG_INFO = Struct__EXCEPTION_DEBUG_INFO;

alias LPEXCEPTION_DEBUG_INFO = Pointer[Struct__EXCEPTION_DEBUG_INFO];

record Struct__CREATE_THREAD_DEBUG_INFO (
    hThread : HANDLE,
    lpThreadLocalBase : LPVOID,
    lpStartAddress : LPTHREAD_START_ROUTINE,
);

alias CREATE_THREAD_DEBUG_INFO = Struct__CREATE_THREAD_DEBUG_INFO;

alias LPCREATE_THREAD_DEBUG_INFO = Pointer[Struct__CREATE_THREAD_DEBUG_INFO];

record Struct__CREATE_PROCESS_DEBUG_INFO (
    hFile : HANDLE,
    hProcess : HANDLE,
    hThread : HANDLE,
    lpBaseOfImage : LPVOID,
    dwDebugInfoFileOffset : DWORD,
    nDebugInfoSize : DWORD,
    lpThreadLocalBase : LPVOID,
    lpStartAddress : LPTHREAD_START_ROUTINE,
    lpImageName : LPVOID,
    fUnicode : WORD,
);

alias CREATE_PROCESS_DEBUG_INFO = Struct__CREATE_PROCESS_DEBUG_INFO;

alias LPCREATE_PROCESS_DEBUG_INFO = Pointer[Struct__CREATE_PROCESS_DEBUG_INFO];

record Struct__EXIT_THREAD_DEBUG_INFO (
    dwExitCode : DWORD,
);

alias EXIT_THREAD_DEBUG_INFO = Struct__EXIT_THREAD_DEBUG_INFO;

alias LPEXIT_THREAD_DEBUG_INFO = Pointer[Struct__EXIT_THREAD_DEBUG_INFO];

record Struct__EXIT_PROCESS_DEBUG_INFO (
    dwExitCode : DWORD,
);

alias EXIT_PROCESS_DEBUG_INFO = Struct__EXIT_PROCESS_DEBUG_INFO;

alias LPEXIT_PROCESS_DEBUG_INFO = Pointer[Struct__EXIT_PROCESS_DEBUG_INFO];

record Struct__LOAD_DLL_DEBUG_INFO (
    hFile : HANDLE,
    lpBaseOfDll : LPVOID,
    dwDebugInfoFileOffset : DWORD,
    nDebugInfoSize : DWORD,
    lpImageName : LPVOID,
    fUnicode : WORD,
);

alias LOAD_DLL_DEBUG_INFO = Struct__LOAD_DLL_DEBUG_INFO;

alias LPLOAD_DLL_DEBUG_INFO = Pointer[Struct__LOAD_DLL_DEBUG_INFO];

record Struct__UNLOAD_DLL_DEBUG_INFO (
    lpBaseOfDll : LPVOID,
);

alias UNLOAD_DLL_DEBUG_INFO = Struct__UNLOAD_DLL_DEBUG_INFO;

alias LPUNLOAD_DLL_DEBUG_INFO = Pointer[Struct__UNLOAD_DLL_DEBUG_INFO];

record Struct__OUTPUT_DEBUG_STRING_INFO (
    lpDebugStringData : LPSTR,
    fUnicode : WORD,
    nDebugStringLength : WORD,
);

alias OUTPUT_DEBUG_STRING_INFO = Struct__OUTPUT_DEBUG_STRING_INFO;

alias LPOUTPUT_DEBUG_STRING_INFO = Pointer[Struct__OUTPUT_DEBUG_STRING_INFO];

record Struct__RIP_INFO (
    dwError : DWORD,
    dwType : DWORD,
);

alias RIP_INFO = Struct__RIP_INFO;

alias LPRIP_INFO = Pointer[Struct__RIP_INFO];

record Struct__DEBUG_EVENT (
    dwDebugEventCode : DWORD,
    dwProcessId : DWORD,
    dwThreadId : DWORD,
    u : Union_Unnamed101,
);

alias Union_Unnamed101 = Union[
    /* Exception */ EXCEPTION_DEBUG_INFO,
    /* CreateThread */ CREATE_THREAD_DEBUG_INFO,
    /* CreateProcessInfo */ CREATE_PROCESS_DEBUG_INFO,
    /* ExitThread */ EXIT_THREAD_DEBUG_INFO,
    /* ExitProcess */ EXIT_PROCESS_DEBUG_INFO,
    /* LoadDll */ LOAD_DLL_DEBUG_INFO,
    /* UnloadDll */ UNLOAD_DLL_DEBUG_INFO,
    /* DebugString */ OUTPUT_DEBUG_STRING_INFO,
    /* RipInfo */ RIP_INFO,
];

alias DEBUG_EVENT = Struct__DEBUG_EVENT;

alias LPDEBUG_EVENT = Pointer[Struct__DEBUG_EVENT];

record Struct__JIT_DEBUG_INFO (
    dwSize : DWORD,
    dwProcessorArchitecture : DWORD,
    dwThreadID : DWORD,
    dwReserved0 : DWORD,
    lpExceptionAddress : ULONG64,
    lpExceptionRecord : ULONG64,
    lpContextRecord : ULONG64,
);

alias JIT_DEBUG_INFO = Struct__JIT_DEBUG_INFO;

alias LPJIT_DEBUG_INFO = Pointer[Struct__JIT_DEBUG_INFO];

alias JIT_DEBUG_INFO32 = JIT_DEBUG_INFO;

alias LPJIT_DEBUG_INFO32 = Pointer[JIT_DEBUG_INFO];

alias JIT_DEBUG_INFO64 = JIT_DEBUG_INFO;

alias LPJIT_DEBUG_INFO64 = Pointer[JIT_DEBUG_INFO];

alias LPCONTEXT = PCONTEXT;

alias LPEXCEPTION_RECORD = PEXCEPTION_RECORD;

alias LPEXCEPTION_POINTERS = PEXCEPTION_POINTERS;

record Struct__OFSTRUCT (
    cBytes : BYTE,
    fFixedDisk : BYTE,
    nErrCode : WORD,
    Reserved1 : WORD,
    Reserved2 : WORD,
    szPathName : Array[CHAR, 128],
);

alias OFSTRUCT = Struct__OFSTRUCT;

alias LPOFSTRUCT = Pointer[Struct__OFSTRUCT];

alias POFSTRUCT = Pointer[Struct__OFSTRUCT];

external (stdcall) InterlockedIncrement(arg0:Pointer[LONG]) : LONG;

external (stdcall) InterlockedDecrement(arg0:Pointer[LONG]) : LONG;

external (stdcall) InterlockedExchange(arg0:Pointer[LONG], arg1:LONG) : LONG;

external (stdcall) InterlockedExchangeAdd(arg0:Pointer[LONG], arg1:LONG) : LONG;

external (stdcall) InterlockedCompareExchange(arg0:Pointer[LONG], arg1:LONG, arg2:LONG) : LONG;

external (stdcall) InterlockedCompareExchange64(arg0:Pointer[LONGLONG], arg1:LONGLONG, arg2:LONGLONG) : LONGLONG;

external (cdecl) InterlockedAnd64(arg0:Pointer[LONGLONG], arg1:LONGLONG) : LONGLONG;

external (cdecl) InterlockedOr64(arg0:Pointer[LONGLONG], arg1:LONGLONG) : LONGLONG;

external (cdecl) InterlockedXor64(arg0:Pointer[LONGLONG], arg1:LONGLONG) : LONGLONG;

external (cdecl) InterlockedIncrement64(arg0:Pointer[LONGLONG]) : LONGLONG;

external (cdecl) InterlockedDecrement64(arg0:Pointer[LONGLONG]) : LONGLONG;

external (cdecl) InterlockedExchange64(arg0:Pointer[LONGLONG], arg1:LONGLONG) : LONGLONG;

external (cdecl) InterlockedExchangeAdd64(arg0:Pointer[LONGLONG], arg1:LONGLONG) : LONGLONG;

external (stdcall) InitializeSListHead(arg0:PSLIST_HEADER) : ;

external (stdcall) InterlockedPopEntrySList(arg0:PSLIST_HEADER) : PSINGLE_LIST_ENTRY;

external (stdcall) InterlockedPushEntrySList(arg0:PSLIST_HEADER, arg1:PSINGLE_LIST_ENTRY) : PSINGLE_LIST_ENTRY;

external (stdcall) InterlockedFlushSList(arg0:PSLIST_HEADER) : PSINGLE_LIST_ENTRY;

external (stdcall) QueryDepthSList(arg0:PSLIST_HEADER) : USHORT;

external (stdcall) FreeResource(arg0:HGLOBAL) : BOOL;

external (stdcall) LockResource(arg0:HGLOBAL) : LPVOID;

external (stdcall) WinMain(arg0:HINSTANCE, arg1:HINSTANCE, arg2:LPSTR, arg3:Int) : Int;

external (stdcall) wWinMain(arg0:HINSTANCE, arg1:HINSTANCE, arg2:LPWSTR, arg3:Int) : Int;

external (stdcall) FreeLibrary(arg0:HMODULE) : BOOL;

external (stdcall) FreeLibraryAndExitThread(arg0:HMODULE, arg1:DWORD) : ;

external (stdcall) DisableThreadLibraryCalls(arg0:HMODULE) : BOOL;

external (stdcall) GetProcAddress(arg0:HMODULE, arg1:LPCSTR) : FARPROC;

external (stdcall) GetVersion() : DWORD;

external (stdcall) GlobalAlloc(arg0:UINT, arg1:SIZE_T) : HGLOBAL;

external (stdcall) GlobalReAlloc(arg0:HGLOBAL, arg1:SIZE_T, arg2:UINT) : HGLOBAL;

external (stdcall) GlobalSize(arg0:HGLOBAL) : SIZE_T;

external (stdcall) GlobalFlags(arg0:HGLOBAL) : UINT;

external (stdcall) GlobalLock(arg0:HGLOBAL) : LPVOID;

external (stdcall) GlobalHandle(arg0:LPCVOID) : HGLOBAL;

external (stdcall) GlobalUnlock(arg0:HGLOBAL) : BOOL;

external (stdcall) GlobalFree(arg0:HGLOBAL) : HGLOBAL;

external (stdcall) GlobalCompact(arg0:DWORD) : SIZE_T;

external (stdcall) GlobalFix(arg0:HGLOBAL) : ;

external (stdcall) GlobalUnfix(arg0:HGLOBAL) : ;

external (stdcall) GlobalWire(arg0:HGLOBAL) : LPVOID;

external (stdcall) GlobalUnWire(arg0:HGLOBAL) : BOOL;

external (stdcall) GlobalMemoryStatus(arg0:LPMEMORYSTATUS) : ;

record Struct__MEMORYSTATUSEX (
    dwLength : DWORD,
    dwMemoryLoad : DWORD,
    ullTotalPhys : DWORDLONG,
    ullAvailPhys : DWORDLONG,
    ullTotalPageFile : DWORDLONG,
    ullAvailPageFile : DWORDLONG,
    ullTotalVirtual : DWORDLONG,
    ullAvailVirtual : DWORDLONG,
    ullAvailExtendedVirtual : DWORDLONG,
);

alias MEMORYSTATUSEX = Struct__MEMORYSTATUSEX;

alias LPMEMORYSTATUSEX = Pointer[Struct__MEMORYSTATUSEX];

external (stdcall) GlobalMemoryStatusEx(arg0:LPMEMORYSTATUSEX) : BOOL;

external (stdcall) LocalAlloc(arg0:UINT, arg1:SIZE_T) : HLOCAL;

external (stdcall) LocalReAlloc(arg0:HLOCAL, arg1:SIZE_T, arg2:UINT) : HLOCAL;

external (stdcall) LocalLock(arg0:HLOCAL) : LPVOID;

external (stdcall) LocalHandle(arg0:LPCVOID) : HLOCAL;

external (stdcall) LocalUnlock(arg0:HLOCAL) : BOOL;

external (stdcall) LocalSize(arg0:HLOCAL) : SIZE_T;

external (stdcall) LocalFlags(arg0:HLOCAL) : UINT;

external (stdcall) LocalFree(arg0:HLOCAL) : HLOCAL;

external (stdcall) LocalShrink(arg0:HLOCAL, arg1:UINT) : SIZE_T;

external (stdcall) LocalCompact(arg0:UINT) : SIZE_T;

external (stdcall) FlushInstructionCache(arg0:HANDLE, arg1:LPCVOID, arg2:SIZE_T) : BOOL;

external (stdcall) FlushProcessWriteBuffers() : ;

external (stdcall) QueryThreadCycleTime(arg0:HANDLE, arg1:PULONG64) : BOOL;

external (stdcall) QueryProcessCycleTime(arg0:HANDLE, arg1:PULONG64) : BOOL;

external (stdcall) QueryIdleProcessorCycleTime(arg0:PULONG, arg1:PULONG64) : BOOL;

external (stdcall) QueryIdleProcessorCycleTimeEx(arg0:USHORT, arg1:PULONG, arg2:PULONG64) : BOOL;

external (stdcall) QueryUnbiasedInterruptTime(arg0:PULONGLONG) : BOOL;

external (stdcall) GetProcessorSystemCycleTime(arg0:USHORT, arg1:PSYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION, arg2:PDWORD) : BOOL;

external (stdcall) VirtualAlloc(arg0:LPVOID, arg1:SIZE_T, arg2:DWORD, arg3:DWORD) : LPVOID;

external (stdcall) VirtualFree(arg0:LPVOID, arg1:SIZE_T, arg2:DWORD) : BOOL;

external (stdcall) VirtualProtect(arg0:LPVOID, arg1:SIZE_T, arg2:DWORD, arg3:PDWORD) : BOOL;

external (stdcall) VirtualQuery(arg0:LPCVOID, arg1:PMEMORY_BASIC_INFORMATION, arg2:SIZE_T) : SIZE_T;

external (stdcall) VirtualAllocEx(arg0:HANDLE, arg1:LPVOID, arg2:SIZE_T, arg3:DWORD, arg4:DWORD) : LPVOID;

external (stdcall) VirtualAllocExNuma(arg0:HANDLE, arg1:LPVOID, arg2:SIZE_T, arg3:DWORD, arg4:DWORD, arg5:DWORD) : LPVOID;

external (stdcall) GetWriteWatch(arg0:DWORD, arg1:PVOID, arg2:SIZE_T, arg3:Pointer[PVOID], arg4:Pointer[ULONG_PTR], arg5:PULONG) : UINT;

external (stdcall) ResetWriteWatch(arg0:LPVOID, arg1:SIZE_T) : UINT;

external (stdcall) GetLargePageMinimum() : SIZE_T;

external (stdcall) EnumSystemFirmwareTables(arg0:DWORD, arg1:PVOID, arg2:DWORD) : UINT;

external (stdcall) GetSystemFirmwareTable(arg0:DWORD, arg1:DWORD, arg2:PVOID, arg3:DWORD) : UINT;

external (stdcall) GetPhysicallyInstalledSystemMemory(arg0:PULONGLONG) : BOOL;

external (stdcall) VirtualFreeEx(arg0:HANDLE, arg1:LPVOID, arg2:SIZE_T, arg3:DWORD) : BOOL;

external (stdcall) VirtualProtectEx(arg0:HANDLE, arg1:LPVOID, arg2:SIZE_T, arg3:DWORD, arg4:PDWORD) : BOOL;

external (stdcall) VirtualQueryEx(arg0:HANDLE, arg1:LPCVOID, arg2:PMEMORY_BASIC_INFORMATION, arg3:SIZE_T) : SIZE_T;

external (stdcall) HeapCreate(arg0:DWORD, arg1:SIZE_T, arg2:SIZE_T) : HANDLE;

external (stdcall) HeapDestroy(arg0:HANDLE) : BOOL;

external (stdcall) HeapAlloc(arg0:HANDLE, arg1:DWORD, arg2:SIZE_T) : LPVOID;

external (stdcall) HeapReAlloc(arg0:HANDLE, arg1:DWORD, arg2:LPVOID, arg3:SIZE_T) : LPVOID;

external (stdcall) HeapFree(arg0:HANDLE, arg1:DWORD, arg2:LPVOID) : BOOL;

external (stdcall) HeapSize(arg0:HANDLE, arg1:DWORD, arg2:LPCVOID) : SIZE_T;

external (stdcall) HeapValidate(arg0:HANDLE, arg1:DWORD, arg2:LPCVOID) : BOOL;

external (stdcall) HeapCompact(arg0:HANDLE, arg1:DWORD) : SIZE_T;

external (stdcall) GetProcessHeap() : HANDLE;

external (stdcall) GetProcessHeaps(arg0:DWORD, arg1:PHANDLE) : DWORD;

record Struct__PROCESS_HEAP_ENTRY (
    lpData : PVOID,
    cbData : DWORD,
    cbOverhead : BYTE,
    iRegionIndex : BYTE,
    wFlags : WORD,
);

alias Union_Unnamed102 = Union[
    /* Block */ Struct_Unnamed103,
    /* Region */ Struct_Unnamed104,
];

record Struct_Unnamed103 (
    hMem : HANDLE,
    dwReserved : Array[DWORD, 3],
);

record Struct_Unnamed104 (
    dwCommittedSize : DWORD,
    dwUnCommittedSize : DWORD,
    lpFirstBlock : LPVOID,
    lpLastBlock : LPVOID,
);

alias PROCESS_HEAP_ENTRY = Struct__PROCESS_HEAP_ENTRY;

alias LPPROCESS_HEAP_ENTRY = Pointer[Struct__PROCESS_HEAP_ENTRY];

alias PPROCESS_HEAP_ENTRY = Pointer[Struct__PROCESS_HEAP_ENTRY];

external (stdcall) HeapLock(arg0:HANDLE) : BOOL;

external (stdcall) HeapUnlock(arg0:HANDLE) : BOOL;

external (stdcall) HeapWalk(arg0:HANDLE, arg1:LPPROCESS_HEAP_ENTRY) : BOOL;

external (stdcall) HeapSetInformation(arg0:HANDLE, arg1:HEAP_INFORMATION_CLASS, arg2:PVOID, arg3:SIZE_T) : BOOL;

external (stdcall) HeapQueryInformation(arg0:HANDLE, arg1:HEAP_INFORMATION_CLASS, arg2:PVOID, arg3:SIZE_T, arg4:PSIZE_T) : BOOL;

external (stdcall) GetBinaryTypeA(arg0:LPCSTR, arg1:LPDWORD) : BOOL;

external (stdcall) GetBinaryTypeW(arg0:LPCWSTR, arg1:LPDWORD) : BOOL;

external (stdcall) GetShortPathNameA(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD) : DWORD;

external (stdcall) GetShortPathNameW(arg0:LPCWSTR, arg1:LPWSTR, arg2:DWORD) : DWORD;

external (stdcall) GetLongPathNameA(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD) : DWORD;

external (stdcall) GetLongPathNameW(arg0:LPCWSTR, arg1:LPWSTR, arg2:DWORD) : DWORD;

external (stdcall) GetLongPathNameTransactedA(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD, arg3:HANDLE) : DWORD;

external (stdcall) GetLongPathNameTransactedW(arg0:LPCWSTR, arg1:LPWSTR, arg2:DWORD, arg3:HANDLE) : DWORD;

external (stdcall) GetProcessAffinityMask(arg0:HANDLE, arg1:PDWORD_PTR, arg2:PDWORD_PTR) : BOOL;

external (stdcall) SetProcessAffinityMask(arg0:HANDLE, arg1:DWORD_PTR) : BOOL;

external (stdcall) GetProcessGroupAffinity(arg0:HANDLE, arg1:PUSHORT, arg2:PUSHORT) : BOOL;

external (stdcall) GetProcessHandleCount(arg0:HANDLE, arg1:PDWORD) : BOOL;

external (stdcall) GetProcessTimes(arg0:HANDLE, arg1:LPFILETIME, arg2:LPFILETIME, arg3:LPFILETIME, arg4:LPFILETIME) : BOOL;

external (stdcall) GetProcessIoCounters(arg0:HANDLE, arg1:PIO_COUNTERS) : BOOL;

external (stdcall) GetProcessWorkingSetSize(arg0:HANDLE, arg1:PSIZE_T, arg2:PSIZE_T) : BOOL;

external (stdcall) GetProcessWorkingSetSizeEx(arg0:HANDLE, arg1:PSIZE_T, arg2:PSIZE_T, arg3:PDWORD) : BOOL;

external (stdcall) SetProcessWorkingSetSize(arg0:HANDLE, arg1:SIZE_T, arg2:SIZE_T) : BOOL;

external (stdcall) SetProcessWorkingSetSizeEx(arg0:HANDLE, arg1:SIZE_T, arg2:SIZE_T, arg3:DWORD) : BOOL;

external (stdcall) SetProcessAffinityUpdateMode(arg0:HANDLE, arg1:DWORD) : BOOL;

external (stdcall) QueryProcessAffinityUpdateMode(arg0:HANDLE, arg1:LPDWORD) : BOOL;

external (stdcall) OpenProcess(arg0:DWORD, arg1:BOOL, arg2:DWORD) : HANDLE;

external (stdcall) GetCurrentProcess() : HANDLE;

external (stdcall) GetCurrentProcessId() : DWORD;

external (stdcall) ExitProcess(arg0:UINT) : ;

external (stdcall) TerminateProcess(arg0:HANDLE, arg1:UINT) : BOOL;

external (stdcall) GetExitCodeProcess(arg0:HANDLE, arg1:LPDWORD) : BOOL;

external (stdcall) FatalExit(arg0:Int) : ;

external (stdcall) GetEnvironmentStrings() : LPCH;

external (stdcall) GetEnvironmentStringsW() : LPWCH;

external (stdcall) SetEnvironmentStringsA(arg0:LPCH) : BOOL;

external (stdcall) SetEnvironmentStringsW(arg0:LPWCH) : BOOL;

external (stdcall) FreeEnvironmentStringsA(arg0:LPCH) : BOOL;

external (stdcall) FreeEnvironmentStringsW(arg0:LPWCH) : BOOL;

external (stdcall) RaiseException(arg0:DWORD, arg1:DWORD, arg2:DWORD, arg3:Pointer[ULONG_PTR]) : ;

external (stdcall) RaiseFailFastException(arg0:PEXCEPTION_RECORD, arg1:PCONTEXT, arg2:DWORD) : ;

external (stdcall) UnhandledExceptionFilter(arg0:Pointer[Struct__EXCEPTION_POINTERS]) : LONG;

alias PTOP_LEVEL_EXCEPTION_FILTER = StdCallCodePointer[[Pointer[Struct__EXCEPTION_POINTERS]],[LONG]];

alias LPTOP_LEVEL_EXCEPTION_FILTER = PTOP_LEVEL_EXCEPTION_FILTER;

external (stdcall) SetUnhandledExceptionFilter(arg0:LPTOP_LEVEL_EXCEPTION_FILTER) : LPTOP_LEVEL_EXCEPTION_FILTER;

external (stdcall) CreateFiber(arg0:SIZE_T, arg1:LPFIBER_START_ROUTINE, arg2:LPVOID) : LPVOID;

external (stdcall) CreateFiberEx(arg0:SIZE_T, arg1:SIZE_T, arg2:DWORD, arg3:LPFIBER_START_ROUTINE, arg4:LPVOID) : LPVOID;

external (stdcall) DeleteFiber(arg0:LPVOID) : ;

external (stdcall) ConvertThreadToFiber(arg0:LPVOID) : LPVOID;

external (stdcall) ConvertThreadToFiberEx(arg0:LPVOID, arg1:DWORD) : LPVOID;

external (stdcall) ConvertFiberToThread() : BOOL;

external (stdcall) IsThreadAFiber() : BOOL;

external (stdcall) SwitchToFiber(arg0:LPVOID) : ;

external (stdcall) SwitchToThread() : BOOL;

alias PUMS_CONTEXT = OpaquePointer;

alias PUMS_COMPLETION_LIST = OpaquePointer;

alias UMS_THREAD_INFO_CLASS = Enum__RTL_UMS_THREAD_INFO_CLASS;

alias PUMS_THREAD_INFO_CLASS = Pointer[Enum__RTL_UMS_THREAD_INFO_CLASS];

alias UMS_SCHEDULER_REASON = Enum__RTL_UMS_SCHEDULER_REASON;

alias PUMS_SCHEDULER_ENTRY_POINT = PRTL_UMS_SCHEDULER_ENTRY_POINT;

record Struct__UMS_SCHEDULER_STARTUP_INFO (
    UmsVersion : ULONG,
    CompletionList : PUMS_COMPLETION_LIST,
    SchedulerProc : PUMS_SCHEDULER_ENTRY_POINT,
    SchedulerParam : PVOID,
);

alias UMS_SCHEDULER_STARTUP_INFO = Struct__UMS_SCHEDULER_STARTUP_INFO;

alias PUMS_SCHEDULER_STARTUP_INFO = Pointer[Struct__UMS_SCHEDULER_STARTUP_INFO];

external (stdcall) CreateUmsCompletionList(arg0:Pointer[PUMS_COMPLETION_LIST]) : BOOL;

external (stdcall) DequeueUmsCompletionListItems(arg0:PUMS_COMPLETION_LIST, arg1:DWORD, arg2:Pointer[PUMS_CONTEXT]) : BOOL;

external (stdcall) GetUmsCompletionListEvent(arg0:PUMS_COMPLETION_LIST, arg1:PHANDLE) : BOOL;

external (stdcall) ExecuteUmsThread(arg0:PUMS_CONTEXT) : BOOL;

external (stdcall) UmsThreadYield(arg0:PVOID) : BOOL;

external (stdcall) DeleteUmsCompletionList(arg0:PUMS_COMPLETION_LIST) : BOOL;

external (stdcall) GetCurrentUmsThread() : PUMS_CONTEXT;

external (stdcall) GetNextUmsListItem(arg0:PUMS_CONTEXT) : PUMS_CONTEXT;

external (stdcall) QueryUmsThreadInformation(arg0:PUMS_CONTEXT, arg1:UMS_THREAD_INFO_CLASS, arg2:PVOID, arg3:ULONG, arg4:PULONG) : BOOL;

external (stdcall) SetUmsThreadInformation(arg0:PUMS_CONTEXT, arg1:UMS_THREAD_INFO_CLASS, arg2:PVOID, arg3:ULONG) : BOOL;

external (stdcall) DeleteUmsThreadContext(arg0:PUMS_CONTEXT) : BOOL;

external (stdcall) CreateUmsThreadContext(arg0:Pointer[PUMS_CONTEXT]) : BOOL;

external (stdcall) EnterUmsSchedulingMode(arg0:PUMS_SCHEDULER_STARTUP_INFO) : BOOL;

alias Struct__PROC_THREAD_ATTRIBUTE_LIST = Opaque;

alias PPROC_THREAD_ATTRIBUTE_LIST = Pointer[Struct__PROC_THREAD_ATTRIBUTE_LIST];

alias LPPROC_THREAD_ATTRIBUTE_LIST = Pointer[Struct__PROC_THREAD_ATTRIBUTE_LIST];

external (stdcall) CreateThread(arg0:LPSECURITY_ATTRIBUTES, arg1:SIZE_T, arg2:LPTHREAD_START_ROUTINE, arg3:LPVOID, arg4:DWORD, arg5:LPDWORD) : HANDLE;

external (stdcall) CreateRemoteThread(arg0:HANDLE, arg1:LPSECURITY_ATTRIBUTES, arg2:SIZE_T, arg3:LPTHREAD_START_ROUTINE, arg4:LPVOID, arg5:DWORD, arg6:LPDWORD) : HANDLE;

external (stdcall) CreateRemoteThreadEx(arg0:HANDLE, arg1:LPSECURITY_ATTRIBUTES, arg2:SIZE_T, arg3:LPTHREAD_START_ROUTINE, arg4:LPVOID, arg5:DWORD, arg6:LPPROC_THREAD_ATTRIBUTE_LIST, arg7:LPDWORD) : HANDLE;

external (stdcall) GetCurrentThread() : HANDLE;

external (stdcall) GetCurrentThreadId() : DWORD;

external (stdcall) SetThreadStackGuarantee(arg0:PULONG) : BOOL;

external (stdcall) GetProcessIdOfThread(arg0:HANDLE) : DWORD;

external (stdcall) GetThreadId(arg0:HANDLE) : DWORD;

external (stdcall) GetProcessId(arg0:HANDLE) : DWORD;

external (stdcall) GetCurrentProcessorNumber() : DWORD;

external (stdcall) GetCurrentProcessorNumberEx(arg0:PPROCESSOR_NUMBER) : ;

external (stdcall) GetThreadGroupAffinity(arg0:HANDLE, arg1:PGROUP_AFFINITY) : BOOL;

external (stdcall) SetThreadAffinityMask(arg0:HANDLE, arg1:DWORD_PTR) : DWORD_PTR;

external (stdcall) SetThreadGroupAffinity(arg0:HANDLE, arg1:Pointer[GROUP_AFFINITY], arg2:PGROUP_AFFINITY) : BOOL;

external (stdcall) SetThreadIdealProcessorEx(arg0:HANDLE, arg1:PPROCESSOR_NUMBER, arg2:PPROCESSOR_NUMBER) : BOOL;

external (stdcall) GetThreadIdealProcessorEx(arg0:HANDLE, arg1:PPROCESSOR_NUMBER) : BOOL;

external (stdcall) SetThreadIdealProcessor(arg0:HANDLE, arg1:DWORD) : DWORD;

external (stdcall) SetProcessDEPPolicy(arg0:DWORD) : BOOL;

external (stdcall) GetProcessDEPPolicy(arg0:HANDLE, arg1:LPDWORD, arg2:PBOOL) : BOOL;

external (stdcall) SetProcessPriorityBoost(arg0:HANDLE, arg1:BOOL) : BOOL;

external (stdcall) GetProcessPriorityBoost(arg0:HANDLE, arg1:PBOOL) : BOOL;

external (stdcall) RequestWakeupLatency(arg0:LATENCY_TIME) : BOOL;

external (stdcall) IsSystemResumeAutomatic() : BOOL;

external (stdcall) OpenThread(arg0:DWORD, arg1:BOOL, arg2:DWORD) : HANDLE;

external (stdcall) SetThreadPriority(arg0:HANDLE, arg1:Int) : BOOL;

external (stdcall) SetThreadPriorityBoost(arg0:HANDLE, arg1:BOOL) : BOOL;

external (stdcall) GetThreadPriorityBoost(arg0:HANDLE, arg1:PBOOL) : BOOL;

external (stdcall) GetThreadPriority(arg0:HANDLE) : Int;

external (stdcall) GetThreadTimes(arg0:HANDLE, arg1:LPFILETIME, arg2:LPFILETIME, arg3:LPFILETIME, arg4:LPFILETIME) : BOOL;

external (stdcall) GetThreadIOPendingFlag(arg0:HANDLE, arg1:PBOOL) : BOOL;

external (stdcall) ExitThread(arg0:DWORD) : ;

external (stdcall) TerminateThread(arg0:HANDLE, arg1:DWORD) : BOOL;

external (stdcall) GetExitCodeThread(arg0:HANDLE, arg1:LPDWORD) : BOOL;

external (stdcall) GetThreadSelectorEntry(arg0:HANDLE, arg1:DWORD, arg2:LPLDT_ENTRY) : BOOL;

external (stdcall) SetThreadExecutionState(arg0:EXECUTION_STATE) : EXECUTION_STATE;

record Struct__REASON_CONTEXT (
    Version : ULONG,
    Flags : DWORD,
    Reason : Union_Unnamed105,
);

alias Union_Unnamed105 = Union[
    /* Detailed */ Struct_Unnamed106,
    /* SimpleReasonString */ LPWSTR,
];

record Struct_Unnamed106 (
    LocalizedReasonModule : HMODULE,
    LocalizedReasonId : ULONG,
    ReasonStringCount : ULONG,
    ReasonStrings : Pointer[LPWSTR],
);

alias REASON_CONTEXT = Struct__REASON_CONTEXT;

alias PREASON_CONTEXT = Pointer[Struct__REASON_CONTEXT];

alias POWER_REQUEST_CONTEXT = REASON_CONTEXT;

alias PPOWER_REQUEST_CONTEXT = Pointer[REASON_CONTEXT];

alias LPPOWER_REQUEST_CONTEXT = Pointer[REASON_CONTEXT];

external (stdcall) PowerCreateRequest(arg0:PREASON_CONTEXT) : HANDLE;

external (stdcall) PowerSetRequest(arg0:HANDLE, arg1:POWER_REQUEST_TYPE) : BOOL;

external (stdcall) PowerClearRequest(arg0:HANDLE, arg1:POWER_REQUEST_TYPE) : BOOL;

external (stdcall) GetLastError() : DWORD;

external (stdcall) SetLastError(arg0:DWORD) : ;

external (stdcall) GetOverlappedResult(arg0:HANDLE, arg1:LPOVERLAPPED, arg2:LPDWORD, arg3:BOOL) : BOOL;

external (stdcall) CreateIoCompletionPort(arg0:HANDLE, arg1:HANDLE, arg2:ULONG_PTR, arg3:DWORD) : HANDLE;

external (stdcall) GetQueuedCompletionStatus(arg0:HANDLE, arg1:LPDWORD, arg2:PULONG_PTR, arg3:Pointer[LPOVERLAPPED], arg4:DWORD) : BOOL;

external (stdcall) GetQueuedCompletionStatusEx(arg0:HANDLE, arg1:LPOVERLAPPED_ENTRY, arg2:ULONG, arg3:PULONG, arg4:DWORD, arg5:BOOL) : BOOL;

external (stdcall) PostQueuedCompletionStatus(arg0:HANDLE, arg1:DWORD, arg2:ULONG_PTR, arg3:LPOVERLAPPED) : BOOL;

external (stdcall) SetFileCompletionNotificationModes(arg0:HANDLE, arg1:UCHAR) : BOOL;

external (stdcall) SetFileIoOverlappedRange(arg0:HANDLE, arg1:PUCHAR, arg2:ULONG) : BOOL;

external (stdcall) GetErrorMode() : UINT;

external (stdcall) SetErrorMode(arg0:UINT) : UINT;

external (stdcall) GetThreadErrorMode() : DWORD;

external (stdcall) SetThreadErrorMode(arg0:DWORD, arg1:LPDWORD) : BOOL;

external (stdcall) ReadProcessMemory(arg0:HANDLE, arg1:LPCVOID, arg2:LPVOID, arg3:SIZE_T, arg4:Pointer[SIZE_T]) : BOOL;

external (stdcall) WriteProcessMemory(arg0:HANDLE, arg1:LPVOID, arg2:LPCVOID, arg3:SIZE_T, arg4:Pointer[SIZE_T]) : BOOL;

external (stdcall) GetThreadContext(arg0:HANDLE, arg1:LPCONTEXT) : BOOL;

external (stdcall) SetThreadContext(arg0:HANDLE, arg1:Pointer[CONTEXT]) : BOOL;

external (stdcall) Wow64GetThreadContext(arg0:HANDLE, arg1:PWOW64_CONTEXT) : BOOL;

external (stdcall) Wow64GetThreadSelectorEntry(arg0:HANDLE, arg1:DWORD, arg2:PWOW64_LDT_ENTRY) : BOOL;

external (stdcall) Wow64SetThreadContext(arg0:HANDLE, arg1:Pointer[WOW64_CONTEXT]) : BOOL;

external (stdcall) SuspendThread(arg0:HANDLE) : DWORD;

external (stdcall) Wow64SuspendThread(arg0:HANDLE) : DWORD;

external (stdcall) ResumeThread(arg0:HANDLE) : DWORD;

external (stdcall) QueueUserAPC(arg0:PAPCFUNC, arg1:HANDLE, arg2:ULONG_PTR) : DWORD;

external (stdcall) IsDebuggerPresent() : BOOL;

external (stdcall) CheckRemoteDebuggerPresent(arg0:HANDLE, arg1:PBOOL) : BOOL;

external (stdcall) DebugBreak() : ;

external (stdcall) WaitForDebugEvent(arg0:LPDEBUG_EVENT, arg1:DWORD) : BOOL;

external (stdcall) ContinueDebugEvent(arg0:DWORD, arg1:DWORD, arg2:DWORD) : BOOL;

external (stdcall) DebugActiveProcess(arg0:DWORD) : BOOL;

external (stdcall) DebugActiveProcessStop(arg0:DWORD) : BOOL;

external (stdcall) DebugSetProcessKillOnExit(arg0:BOOL) : BOOL;

external (stdcall) DebugBreakProcess(arg0:HANDLE) : BOOL;

external (stdcall) InitializeCriticalSection(arg0:LPCRITICAL_SECTION) : ;

external (stdcall) EnterCriticalSection(arg0:LPCRITICAL_SECTION) : ;

external (stdcall) LeaveCriticalSection(arg0:LPCRITICAL_SECTION) : ;

external (stdcall) InitializeCriticalSectionAndSpinCount(arg0:LPCRITICAL_SECTION, arg1:DWORD) : BOOL;

external (stdcall) InitializeCriticalSectionEx(arg0:LPCRITICAL_SECTION, arg1:DWORD, arg2:DWORD) : BOOL;

external (stdcall) SetCriticalSectionSpinCount(arg0:LPCRITICAL_SECTION, arg1:DWORD) : DWORD;

external (stdcall) TryEnterCriticalSection(arg0:LPCRITICAL_SECTION) : BOOL;

external (stdcall) DeleteCriticalSection(arg0:LPCRITICAL_SECTION) : ;

external (stdcall) SetEvent(arg0:HANDLE) : BOOL;

external (stdcall) ResetEvent(arg0:HANDLE) : BOOL;

external (stdcall) PulseEvent(arg0:HANDLE) : BOOL;

external (stdcall) ReleaseSemaphore(arg0:HANDLE, arg1:LONG, arg2:LPLONG) : BOOL;

external (stdcall) ReleaseMutex(arg0:HANDLE) : BOOL;

external (stdcall) WaitForSingleObject(arg0:HANDLE, arg1:DWORD) : DWORD;

external (stdcall) WaitForMultipleObjects(arg0:DWORD, arg1:Pointer[HANDLE], arg2:BOOL, arg3:DWORD) : DWORD;

external (stdcall) Sleep(arg0:DWORD) : ;

external (stdcall) LoadResource(arg0:HMODULE, arg1:HRSRC) : HGLOBAL;

external (stdcall) SizeofResource(arg0:HMODULE, arg1:HRSRC) : DWORD;

external (stdcall) GlobalDeleteAtom(arg0:ATOM) : ATOM;

external (stdcall) InitAtomTable(arg0:DWORD) : BOOL;

external (stdcall) DeleteAtom(arg0:ATOM) : ATOM;

external (stdcall) SetHandleCount(arg0:UINT) : UINT;

external (stdcall) GetLogicalDrives() : DWORD;

external (stdcall) LockFile(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:DWORD) : BOOL;

external (stdcall) UnlockFile(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:DWORD) : BOOL;

external (stdcall) LockFileEx(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:DWORD, arg5:LPOVERLAPPED) : BOOL;

external (stdcall) UnlockFileEx(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:LPOVERLAPPED) : BOOL;

record Struct__BY_HANDLE_FILE_INFORMATION (
    dwFileAttributes : DWORD,
    ftCreationTime : FILETIME,
    ftLastAccessTime : FILETIME,
    ftLastWriteTime : FILETIME,
    dwVolumeSerialNumber : DWORD,
    nFileSizeHigh : DWORD,
    nFileSizeLow : DWORD,
    nNumberOfLinks : DWORD,
    nFileIndexHigh : DWORD,
    nFileIndexLow : DWORD,
);

alias BY_HANDLE_FILE_INFORMATION = Struct__BY_HANDLE_FILE_INFORMATION;

alias PBY_HANDLE_FILE_INFORMATION = Pointer[Struct__BY_HANDLE_FILE_INFORMATION];

alias LPBY_HANDLE_FILE_INFORMATION = Pointer[Struct__BY_HANDLE_FILE_INFORMATION];

external (stdcall) GetFileInformationByHandle(arg0:HANDLE, arg1:LPBY_HANDLE_FILE_INFORMATION) : BOOL;

external (stdcall) GetFileType(arg0:HANDLE) : DWORD;

external (stdcall) GetFileSize(arg0:HANDLE, arg1:LPDWORD) : DWORD;

external (stdcall) GetFileSizeEx(arg0:HANDLE, arg1:PLARGE_INTEGER) : BOOL;

external (stdcall) GetStdHandle(arg0:DWORD) : HANDLE;

external (stdcall) SetStdHandle(arg0:DWORD, arg1:HANDLE) : BOOL;

external (stdcall) SetStdHandleEx(arg0:DWORD, arg1:HANDLE, arg2:PHANDLE) : BOOL;

external (stdcall) WriteFile(arg0:HANDLE, arg1:LPCVOID, arg2:DWORD, arg3:LPDWORD, arg4:LPOVERLAPPED) : BOOL;

external (stdcall) ReadFile(arg0:HANDLE, arg1:LPVOID, arg2:DWORD, arg3:LPDWORD, arg4:LPOVERLAPPED) : BOOL;

external (stdcall) FlushFileBuffers(arg0:HANDLE) : BOOL;

external (stdcall) DeviceIoControl(arg0:HANDLE, arg1:DWORD, arg2:LPVOID, arg3:DWORD, arg4:LPVOID, arg5:DWORD, arg6:LPDWORD, arg7:LPOVERLAPPED) : BOOL;

external (stdcall) RequestDeviceWakeup(arg0:HANDLE) : BOOL;

external (stdcall) CancelDeviceWakeupRequest(arg0:HANDLE) : BOOL;

external (stdcall) GetDevicePowerState(arg0:HANDLE, arg1:Pointer[BOOL]) : BOOL;

external (stdcall) SetMessageWaitingIndicator(arg0:HANDLE, arg1:ULONG) : BOOL;

external (stdcall) SetEndOfFile(arg0:HANDLE) : BOOL;

external (stdcall) SetFilePointer(arg0:HANDLE, arg1:LONG, arg2:PLONG, arg3:DWORD) : DWORD;

external (stdcall) SetFilePointerEx(arg0:HANDLE, arg1:LARGE_INTEGER, arg2:PLARGE_INTEGER, arg3:DWORD) : BOOL;

external (stdcall) FindClose(arg0:HANDLE) : BOOL;

external (stdcall) GetFileTime(arg0:HANDLE, arg1:LPFILETIME, arg2:LPFILETIME, arg3:LPFILETIME) : BOOL;

external (stdcall) SetFileTime(arg0:HANDLE, arg1:Pointer[FILETIME], arg2:Pointer[FILETIME], arg3:Pointer[FILETIME]) : BOOL;

external (stdcall) SetFileValidData(arg0:HANDLE, arg1:LONGLONG) : BOOL;

external (stdcall) SetFileShortNameA(arg0:HANDLE, arg1:LPCSTR) : BOOL;

external (stdcall) SetFileShortNameW(arg0:HANDLE, arg1:LPCWSTR) : BOOL;

external (stdcall) CloseHandle(arg0:HANDLE) : BOOL;

external (stdcall) DuplicateHandle(arg0:HANDLE, arg1:HANDLE, arg2:HANDLE, arg3:LPHANDLE, arg4:DWORD, arg5:BOOL, arg6:DWORD) : BOOL;

external (stdcall) GetHandleInformation(arg0:HANDLE, arg1:LPDWORD) : BOOL;

external (stdcall) SetHandleInformation(arg0:HANDLE, arg1:DWORD, arg2:DWORD) : BOOL;

external (stdcall) LoadModule(arg0:LPCSTR, arg1:LPVOID) : DWORD;

external (stdcall) WinExec(arg0:LPCSTR, arg1:UINT) : UINT;

external (stdcall) ClearCommBreak(arg0:HANDLE) : BOOL;

external (stdcall) ClearCommError(arg0:HANDLE, arg1:LPDWORD, arg2:LPCOMSTAT) : BOOL;

external (stdcall) SetupComm(arg0:HANDLE, arg1:DWORD, arg2:DWORD) : BOOL;

external (stdcall) EscapeCommFunction(arg0:HANDLE, arg1:DWORD) : BOOL;

external (stdcall) GetCommConfig(arg0:HANDLE, arg1:LPCOMMCONFIG, arg2:LPDWORD) : BOOL;

external (stdcall) GetCommMask(arg0:HANDLE, arg1:LPDWORD) : BOOL;

external (stdcall) GetCommProperties(arg0:HANDLE, arg1:LPCOMMPROP) : BOOL;

external (stdcall) GetCommModemStatus(arg0:HANDLE, arg1:LPDWORD) : BOOL;

external (stdcall) GetCommState(arg0:HANDLE, arg1:LPDCB) : BOOL;

external (stdcall) GetCommTimeouts(arg0:HANDLE, arg1:LPCOMMTIMEOUTS) : BOOL;

external (stdcall) PurgeComm(arg0:HANDLE, arg1:DWORD) : BOOL;

external (stdcall) SetCommBreak(arg0:HANDLE) : BOOL;

external (stdcall) SetCommConfig(arg0:HANDLE, arg1:LPCOMMCONFIG, arg2:DWORD) : BOOL;

external (stdcall) SetCommMask(arg0:HANDLE, arg1:DWORD) : BOOL;

external (stdcall) SetCommState(arg0:HANDLE, arg1:LPDCB) : BOOL;

external (stdcall) SetCommTimeouts(arg0:HANDLE, arg1:LPCOMMTIMEOUTS) : BOOL;

external (stdcall) TransmitCommChar(arg0:HANDLE, arg1:CChar) : BOOL;

external (stdcall) WaitCommEvent(arg0:HANDLE, arg1:LPDWORD, arg2:LPOVERLAPPED) : BOOL;

external (stdcall) SetTapePosition(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:DWORD, arg5:BOOL) : DWORD;

external (stdcall) GetTapePosition(arg0:HANDLE, arg1:DWORD, arg2:LPDWORD, arg3:LPDWORD, arg4:LPDWORD) : DWORD;

external (stdcall) PrepareTape(arg0:HANDLE, arg1:DWORD, arg2:BOOL) : DWORD;

external (stdcall) EraseTape(arg0:HANDLE, arg1:DWORD, arg2:BOOL) : DWORD;

external (stdcall) CreateTapePartition(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:DWORD) : DWORD;

external (stdcall) WriteTapemark(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:BOOL) : DWORD;

external (stdcall) GetTapeStatus(arg0:HANDLE) : DWORD;

external (stdcall) GetTapeParameters(arg0:HANDLE, arg1:DWORD, arg2:LPDWORD, arg3:LPVOID) : DWORD;

external (stdcall) SetTapeParameters(arg0:HANDLE, arg1:DWORD, arg2:LPVOID) : DWORD;

external (stdcall) Beep(arg0:DWORD, arg1:DWORD) : BOOL;

external (stdcall) MulDiv(arg0:Int, arg1:Int, arg2:Int) : Int;

external (stdcall) GetSystemTime(arg0:LPSYSTEMTIME) : ;

external (stdcall) GetSystemTimeAsFileTime(arg0:LPFILETIME) : ;

external (stdcall) SetSystemTime(arg0:Pointer[SYSTEMTIME]) : BOOL;

external (stdcall) GetLocalTime(arg0:LPSYSTEMTIME) : ;

external (stdcall) SetLocalTime(arg0:Pointer[SYSTEMTIME]) : BOOL;

external (stdcall) GetSystemInfo(arg0:LPSYSTEM_INFO) : ;

alias Enum__DEP_SYSTEM_POLICY_TYPE = Int;
alias DEPPolicyAlwaysOff = 0;
alias DEPPolicyAlwaysOn = 1;
alias DEPPolicyOptIn = 2;
alias DEPPolicyOptOut = 3;
alias DEPTotalPolicyCount = 4;

alias DEP_SYSTEM_POLICY_TYPE = Enum__DEP_SYSTEM_POLICY_TYPE;

external (stdcall) GetSystemDEPPolicy() : DEP_SYSTEM_POLICY_TYPE;

external (stdcall) SetSystemFileCacheSize(arg0:SIZE_T, arg1:SIZE_T, arg2:DWORD) : BOOL;

external (stdcall) GetSystemFileCacheSize(arg0:PSIZE_T, arg1:PSIZE_T, arg2:PDWORD) : BOOL;

external (stdcall) GetSystemRegistryQuota(arg0:PDWORD, arg1:PDWORD) : BOOL;

external (stdcall) GetSystemTimes(arg0:LPFILETIME, arg1:LPFILETIME, arg2:LPFILETIME) : BOOL;

external (stdcall) GetNativeSystemInfo(arg0:LPSYSTEM_INFO) : ;

external (stdcall) IsProcessorFeaturePresent(arg0:DWORD) : BOOL;

record Struct__TIME_ZONE_INFORMATION (
    Bias : LONG,
    StandardName : Array[WCHAR, 32],
    StandardDate : SYSTEMTIME,
    StandardBias : LONG,
    DaylightName : Array[WCHAR, 32],
    DaylightDate : SYSTEMTIME,
    DaylightBias : LONG,
);

alias TIME_ZONE_INFORMATION = Struct__TIME_ZONE_INFORMATION;

alias PTIME_ZONE_INFORMATION = Pointer[Struct__TIME_ZONE_INFORMATION];

alias LPTIME_ZONE_INFORMATION = Pointer[Struct__TIME_ZONE_INFORMATION];

record Struct__TIME_DYNAMIC_ZONE_INFORMATION (
    Bias : LONG,
    StandardName : Array[WCHAR, 32],
    StandardDate : SYSTEMTIME,
    StandardBias : LONG,
    DaylightName : Array[WCHAR, 32],
    DaylightDate : SYSTEMTIME,
    DaylightBias : LONG,
    TimeZoneKeyName : Array[WCHAR, 128],
    DynamicDaylightTimeDisabled : BOOLEAN,
);

alias DYNAMIC_TIME_ZONE_INFORMATION = Struct__TIME_DYNAMIC_ZONE_INFORMATION;

alias PDYNAMIC_TIME_ZONE_INFORMATION = Pointer[Struct__TIME_DYNAMIC_ZONE_INFORMATION];

external (stdcall) SystemTimeToTzSpecificLocalTime(arg0:Pointer[TIME_ZONE_INFORMATION], arg1:Pointer[SYSTEMTIME], arg2:LPSYSTEMTIME) : BOOL;

external (stdcall) TzSpecificLocalTimeToSystemTime(arg0:Pointer[TIME_ZONE_INFORMATION], arg1:Pointer[SYSTEMTIME], arg2:LPSYSTEMTIME) : BOOL;

external (stdcall) GetTimeZoneInformationForYear(arg0:USHORT, arg1:PDYNAMIC_TIME_ZONE_INFORMATION, arg2:LPTIME_ZONE_INFORMATION) : BOOL;

external (stdcall) GetTimeZoneInformation(arg0:LPTIME_ZONE_INFORMATION) : DWORD;

external (stdcall) SetTimeZoneInformation(arg0:Pointer[TIME_ZONE_INFORMATION]) : BOOL;

external (stdcall) GetDynamicTimeZoneInformation(arg0:PDYNAMIC_TIME_ZONE_INFORMATION) : DWORD;

external (stdcall) SetDynamicTimeZoneInformation(arg0:Pointer[DYNAMIC_TIME_ZONE_INFORMATION]) : BOOL;

external (stdcall) SystemTimeToFileTime(arg0:Pointer[SYSTEMTIME], arg1:LPFILETIME) : BOOL;

external (stdcall) FileTimeToLocalFileTime(arg0:Pointer[FILETIME], arg1:LPFILETIME) : BOOL;

external (stdcall) LocalFileTimeToFileTime(arg0:Pointer[FILETIME], arg1:LPFILETIME) : BOOL;

external (stdcall) FileTimeToSystemTime(arg0:Pointer[FILETIME], arg1:LPSYSTEMTIME) : BOOL;

external (stdcall) CompareFileTime(arg0:Pointer[FILETIME], arg1:Pointer[FILETIME]) : LONG;

external (stdcall) FileTimeToDosDateTime(arg0:Pointer[FILETIME], arg1:LPWORD, arg2:LPWORD) : BOOL;

external (stdcall) DosDateTimeToFileTime(arg0:WORD, arg1:WORD, arg2:LPFILETIME) : BOOL;

external (stdcall) GetTickCount() : DWORD;

external (stdcall) GetTickCount64() : ULONGLONG;

external (stdcall) SetSystemTimeAdjustment(arg0:DWORD, arg1:BOOL) : BOOL;

external (stdcall) GetSystemTimeAdjustment(arg0:PDWORD, arg1:PDWORD, arg2:PBOOL) : BOOL;

external (stdcall) FormatMessageA(arg0:DWORD, arg1:LPCVOID, arg2:DWORD, arg3:DWORD, arg4:LPSTR, arg5:DWORD, arg6:Pointer[va_list]) : DWORD;

external (stdcall) FormatMessageW(arg0:DWORD, arg1:LPCVOID, arg2:DWORD, arg3:DWORD, arg4:LPWSTR, arg5:DWORD, arg6:Pointer[va_list]) : DWORD;

external (stdcall) CreatePipe(arg0:PHANDLE, arg1:PHANDLE, arg2:LPSECURITY_ATTRIBUTES, arg3:DWORD) : BOOL;

external (stdcall) ConnectNamedPipe(arg0:HANDLE, arg1:LPOVERLAPPED) : BOOL;

external (stdcall) DisconnectNamedPipe(arg0:HANDLE) : BOOL;

external (stdcall) SetNamedPipeHandleState(arg0:HANDLE, arg1:LPDWORD, arg2:LPDWORD, arg3:LPDWORD) : BOOL;

external (stdcall) GetNamedPipeInfo(arg0:HANDLE, arg1:LPDWORD, arg2:LPDWORD, arg3:LPDWORD, arg4:LPDWORD) : BOOL;

external (stdcall) PeekNamedPipe(arg0:HANDLE, arg1:LPVOID, arg2:DWORD, arg3:LPDWORD, arg4:LPDWORD, arg5:LPDWORD) : BOOL;

external (stdcall) TransactNamedPipe(arg0:HANDLE, arg1:LPVOID, arg2:DWORD, arg3:LPVOID, arg4:DWORD, arg5:LPDWORD, arg6:LPOVERLAPPED) : BOOL;

external (stdcall) CreateMailslotA(arg0:LPCSTR, arg1:DWORD, arg2:DWORD, arg3:LPSECURITY_ATTRIBUTES) : HANDLE;

external (stdcall) CreateMailslotW(arg0:LPCWSTR, arg1:DWORD, arg2:DWORD, arg3:LPSECURITY_ATTRIBUTES) : HANDLE;

external (stdcall) GetMailslotInfo(arg0:HANDLE, arg1:LPDWORD, arg2:LPDWORD, arg3:LPDWORD, arg4:LPDWORD) : BOOL;

external (stdcall) SetMailslotInfo(arg0:HANDLE, arg1:DWORD) : BOOL;

external (stdcall) MapViewOfFile(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:SIZE_T) : LPVOID;

external (stdcall) FlushViewOfFile(arg0:LPCVOID, arg1:SIZE_T) : BOOL;

external (stdcall) UnmapViewOfFile(arg0:LPCVOID) : BOOL;

external (stdcall) EncryptFileA(arg0:LPCSTR) : BOOL;

external (stdcall) EncryptFileW(arg0:LPCWSTR) : BOOL;

external (stdcall) DecryptFileA(arg0:LPCSTR, arg1:DWORD) : BOOL;

external (stdcall) DecryptFileW(arg0:LPCWSTR, arg1:DWORD) : BOOL;

external (stdcall) FileEncryptionStatusA(arg0:LPCSTR, arg1:LPDWORD) : BOOL;

external (stdcall) FileEncryptionStatusW(arg0:LPCWSTR, arg1:LPDWORD) : BOOL;

alias PFE_EXPORT_FUNC = StdCallCodePointer[[PBYTE, PVOID, ULONG],[DWORD]];

alias PFE_IMPORT_FUNC = StdCallCodePointer[[PBYTE, PVOID, PULONG],[DWORD]];

external (stdcall) OpenEncryptedFileRawA(arg0:LPCSTR, arg1:ULONG, arg2:Pointer[PVOID]) : DWORD;

external (stdcall) OpenEncryptedFileRawW(arg0:LPCWSTR, arg1:ULONG, arg2:Pointer[PVOID]) : DWORD;

external (stdcall) ReadEncryptedFileRaw(arg0:PFE_EXPORT_FUNC, arg1:PVOID, arg2:PVOID) : DWORD;

external (stdcall) WriteEncryptedFileRaw(arg0:PFE_IMPORT_FUNC, arg1:PVOID, arg2:PVOID) : DWORD;

external (stdcall) CloseEncryptedFileRaw(arg0:PVOID) : ;

external (stdcall) lstrcmpA(arg0:LPCSTR, arg1:LPCSTR) : Int;

external (stdcall) lstrcmpW(arg0:LPCWSTR, arg1:LPCWSTR) : Int;

external (stdcall) lstrcmpiA(arg0:LPCSTR, arg1:LPCSTR) : Int;

external (stdcall) lstrcmpiW(arg0:LPCWSTR, arg1:LPCWSTR) : Int;

external (stdcall) lstrcpynA(arg0:LPSTR, arg1:LPCSTR, arg2:Int) : LPSTR;

external (stdcall) lstrcpynW(arg0:LPWSTR, arg1:LPCWSTR, arg2:Int) : LPWSTR;

external (stdcall) lstrcpyA(arg0:LPSTR, arg1:LPCSTR) : LPSTR;

external (stdcall) lstrcpyW(arg0:LPWSTR, arg1:LPCWSTR) : LPWSTR;

external (stdcall) lstrcatA(arg0:LPSTR, arg1:LPCSTR) : LPSTR;

external (stdcall) lstrcatW(arg0:LPWSTR, arg1:LPCWSTR) : LPWSTR;

external (stdcall) lstrlenA(arg0:LPCSTR) : Int;

external (stdcall) lstrlenW(arg0:LPCWSTR) : Int;

external (stdcall) OpenFile(arg0:LPCSTR, arg1:LPOFSTRUCT, arg2:UINT) : HFILE;

external (stdcall) _lopen(arg0:LPCSTR, arg1:Int) : HFILE;

external (stdcall) _lcreat(arg0:LPCSTR, arg1:Int) : HFILE;

external (stdcall) _lread(arg0:HFILE, arg1:LPVOID, arg2:UINT) : UINT;

external (stdcall) _lwrite(arg0:HFILE, arg1:LPCCH, arg2:UINT) : UINT;

external (stdcall) _hread(arg0:HFILE, arg1:LPVOID, arg2:CLong) : CLong;

external (stdcall) _hwrite(arg0:HFILE, arg1:LPCCH, arg2:CLong) : CLong;

external (stdcall) _lclose(arg0:HFILE) : HFILE;

external (stdcall) _llseek(arg0:HFILE, arg1:LONG, arg2:Int) : LONG;

external (stdcall) IsTextUnicode(arg0:OpaquePointer, arg1:Int, arg2:LPINT) : BOOL;

external (stdcall) FlsAlloc(arg0:PFLS_CALLBACK_FUNCTION) : DWORD;

external (stdcall) FlsGetValue(arg0:DWORD) : PVOID;

external (stdcall) FlsSetValue(arg0:DWORD, arg1:PVOID) : BOOL;

external (stdcall) FlsFree(arg0:DWORD) : BOOL;

external (stdcall) TlsAlloc() : DWORD;

external (stdcall) TlsGetValue(arg0:DWORD) : LPVOID;

external (stdcall) TlsSetValue(arg0:DWORD, arg1:LPVOID) : BOOL;

external (stdcall) TlsFree(arg0:DWORD) : BOOL;

alias LPOVERLAPPED_COMPLETION_ROUTINE = StdCallCodePointer[[DWORD, DWORD, LPOVERLAPPED],[]];

external (stdcall) SleepEx(arg0:DWORD, arg1:BOOL) : DWORD;

external (stdcall) WaitForSingleObjectEx(arg0:HANDLE, arg1:DWORD, arg2:BOOL) : DWORD;

external (stdcall) WaitForMultipleObjectsEx(arg0:DWORD, arg1:Pointer[HANDLE], arg2:BOOL, arg3:DWORD, arg4:BOOL) : DWORD;

external (stdcall) SignalObjectAndWait(arg0:HANDLE, arg1:HANDLE, arg2:DWORD, arg3:BOOL) : DWORD;

external (stdcall) ReadFileEx(arg0:HANDLE, arg1:LPVOID, arg2:DWORD, arg3:LPOVERLAPPED, arg4:LPOVERLAPPED_COMPLETION_ROUTINE) : BOOL;

external (stdcall) WriteFileEx(arg0:HANDLE, arg1:LPCVOID, arg2:DWORD, arg3:LPOVERLAPPED, arg4:LPOVERLAPPED_COMPLETION_ROUTINE) : BOOL;

external (stdcall) BackupRead(arg0:HANDLE, arg1:LPBYTE, arg2:DWORD, arg3:LPDWORD, arg4:BOOL, arg5:BOOL, arg6:Pointer[LPVOID]) : BOOL;

external (stdcall) BackupSeek(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:LPDWORD, arg4:LPDWORD, arg5:Pointer[LPVOID]) : BOOL;

external (stdcall) BackupWrite(arg0:HANDLE, arg1:LPBYTE, arg2:DWORD, arg3:LPDWORD, arg4:BOOL, arg5:BOOL, arg6:Pointer[LPVOID]) : BOOL;

record Struct__WIN32_STREAM_ID (
    dwStreamId : DWORD,
    dwStreamAttributes : DWORD,
    Size : LARGE_INTEGER,
    dwStreamNameSize : DWORD,
    cStreamName : Array[WCHAR, 1],
);

alias WIN32_STREAM_ID = Struct__WIN32_STREAM_ID;

alias LPWIN32_STREAM_ID = Pointer[Struct__WIN32_STREAM_ID];

external (stdcall) ReadFileScatter(arg0:HANDLE, arg1:Pointer[FILE_SEGMENT_ELEMENT], arg2:DWORD, arg3:LPDWORD, arg4:LPOVERLAPPED) : BOOL;

external (stdcall) WriteFileGather(arg0:HANDLE, arg1:Pointer[FILE_SEGMENT_ELEMENT], arg2:DWORD, arg3:LPDWORD, arg4:LPOVERLAPPED) : BOOL;

record Struct__STARTUPINFOA (
    cb : DWORD,
    lpReserved : LPSTR,
    lpDesktop : LPSTR,
    lpTitle : LPSTR,
    dwX : DWORD,
    dwY : DWORD,
    dwXSize : DWORD,
    dwYSize : DWORD,
    dwXCountChars : DWORD,
    dwYCountChars : DWORD,
    dwFillAttribute : DWORD,
    dwFlags : DWORD,
    wShowWindow : WORD,
    cbReserved2 : WORD,
    lpReserved2 : LPBYTE,
    hStdInput : HANDLE,
    hStdOutput : HANDLE,
    hStdError : HANDLE,
);

alias STARTUPINFOA = Struct__STARTUPINFOA;

alias LPSTARTUPINFOA = Pointer[Struct__STARTUPINFOA];

record Struct__STARTUPINFOW (
    cb : DWORD,
    lpReserved : LPWSTR,
    lpDesktop : LPWSTR,
    lpTitle : LPWSTR,
    dwX : DWORD,
    dwY : DWORD,
    dwXSize : DWORD,
    dwYSize : DWORD,
    dwXCountChars : DWORD,
    dwYCountChars : DWORD,
    dwFillAttribute : DWORD,
    dwFlags : DWORD,
    wShowWindow : WORD,
    cbReserved2 : WORD,
    lpReserved2 : LPBYTE,
    hStdInput : HANDLE,
    hStdOutput : HANDLE,
    hStdError : HANDLE,
);

alias STARTUPINFOW = Struct__STARTUPINFOW;

alias LPSTARTUPINFOW = Pointer[Struct__STARTUPINFOW];

alias STARTUPINFO = STARTUPINFOA;

alias LPSTARTUPINFO = LPSTARTUPINFOA;

record Struct__STARTUPINFOEXA (
    StartupInfo : STARTUPINFOA,
    lpAttributeList : LPPROC_THREAD_ATTRIBUTE_LIST,
);

alias STARTUPINFOEXA = Struct__STARTUPINFOEXA;

alias LPSTARTUPINFOEXA = Pointer[Struct__STARTUPINFOEXA];

record Struct__STARTUPINFOEXW (
    StartupInfo : STARTUPINFOW,
    lpAttributeList : LPPROC_THREAD_ATTRIBUTE_LIST,
);

alias STARTUPINFOEXW = Struct__STARTUPINFOEXW;

alias LPSTARTUPINFOEXW = Pointer[Struct__STARTUPINFOEXW];

alias STARTUPINFOEX = STARTUPINFOEXA;

alias LPSTARTUPINFOEX = LPSTARTUPINFOEXA;

record Struct__WIN32_FIND_DATAA (
    dwFileAttributes : DWORD,
    ftCreationTime : FILETIME,
    ftLastAccessTime : FILETIME,
    ftLastWriteTime : FILETIME,
    nFileSizeHigh : DWORD,
    nFileSizeLow : DWORD,
    dwReserved0 : DWORD,
    dwReserved1 : DWORD,
    cFileName : Array[CHAR, 260],
    cAlternateFileName : Array[CHAR, 14],
);

alias WIN32_FIND_DATAA = Struct__WIN32_FIND_DATAA;

alias PWIN32_FIND_DATAA = Pointer[Struct__WIN32_FIND_DATAA];

alias LPWIN32_FIND_DATAA = Pointer[Struct__WIN32_FIND_DATAA];

record Struct__WIN32_FIND_DATAW (
    dwFileAttributes : DWORD,
    ftCreationTime : FILETIME,
    ftLastAccessTime : FILETIME,
    ftLastWriteTime : FILETIME,
    nFileSizeHigh : DWORD,
    nFileSizeLow : DWORD,
    dwReserved0 : DWORD,
    dwReserved1 : DWORD,
    cFileName : Array[WCHAR, 260],
    cAlternateFileName : Array[WCHAR, 14],
);

alias WIN32_FIND_DATAW = Struct__WIN32_FIND_DATAW;

alias PWIN32_FIND_DATAW = Pointer[Struct__WIN32_FIND_DATAW];

alias LPWIN32_FIND_DATAW = Pointer[Struct__WIN32_FIND_DATAW];

alias WIN32_FIND_DATA = WIN32_FIND_DATAA;

alias PWIN32_FIND_DATA = PWIN32_FIND_DATAA;

alias LPWIN32_FIND_DATA = LPWIN32_FIND_DATAA;

record Struct__WIN32_FILE_ATTRIBUTE_DATA (
    dwFileAttributes : DWORD,
    ftCreationTime : FILETIME,
    ftLastAccessTime : FILETIME,
    ftLastWriteTime : FILETIME,
    nFileSizeHigh : DWORD,
    nFileSizeLow : DWORD,
);

alias WIN32_FILE_ATTRIBUTE_DATA = Struct__WIN32_FILE_ATTRIBUTE_DATA;

alias LPWIN32_FILE_ATTRIBUTE_DATA = Pointer[Struct__WIN32_FILE_ATTRIBUTE_DATA];

external (stdcall) CreateMutexA(arg0:LPSECURITY_ATTRIBUTES, arg1:BOOL, arg2:LPCSTR) : HANDLE;

external (stdcall) CreateMutexW(arg0:LPSECURITY_ATTRIBUTES, arg1:BOOL, arg2:LPCWSTR) : HANDLE;

external (stdcall) OpenMutexA(arg0:DWORD, arg1:BOOL, arg2:LPCSTR) : HANDLE;

external (stdcall) OpenMutexW(arg0:DWORD, arg1:BOOL, arg2:LPCWSTR) : HANDLE;

external (stdcall) CreateEventA(arg0:LPSECURITY_ATTRIBUTES, arg1:BOOL, arg2:BOOL, arg3:LPCSTR) : HANDLE;

external (stdcall) CreateEventW(arg0:LPSECURITY_ATTRIBUTES, arg1:BOOL, arg2:BOOL, arg3:LPCWSTR) : HANDLE;

external (stdcall) OpenEventA(arg0:DWORD, arg1:BOOL, arg2:LPCSTR) : HANDLE;

external (stdcall) OpenEventW(arg0:DWORD, arg1:BOOL, arg2:LPCWSTR) : HANDLE;

external (stdcall) CreateSemaphoreA(arg0:LPSECURITY_ATTRIBUTES, arg1:LONG, arg2:LONG, arg3:LPCSTR) : HANDLE;

external (stdcall) CreateSemaphoreW(arg0:LPSECURITY_ATTRIBUTES, arg1:LONG, arg2:LONG, arg3:LPCWSTR) : HANDLE;

external (stdcall) OpenSemaphoreA(arg0:DWORD, arg1:BOOL, arg2:LPCSTR) : HANDLE;

external (stdcall) OpenSemaphoreW(arg0:DWORD, arg1:BOOL, arg2:LPCWSTR) : HANDLE;

alias PTIMERAPCROUTINE = StdCallCodePointer[[LPVOID, DWORD, DWORD],[]];

external (stdcall) CreateWaitableTimerA(arg0:LPSECURITY_ATTRIBUTES, arg1:BOOL, arg2:LPCSTR) : HANDLE;

external (stdcall) CreateWaitableTimerW(arg0:LPSECURITY_ATTRIBUTES, arg1:BOOL, arg2:LPCWSTR) : HANDLE;

external (stdcall) OpenWaitableTimerA(arg0:DWORD, arg1:BOOL, arg2:LPCSTR) : HANDLE;

external (stdcall) OpenWaitableTimerW(arg0:DWORD, arg1:BOOL, arg2:LPCWSTR) : HANDLE;

external (stdcall) SetWaitableTimerEx(arg0:HANDLE, arg1:Pointer[LARGE_INTEGER], arg2:LONG, arg3:PTIMERAPCROUTINE, arg4:LPVOID, arg5:PREASON_CONTEXT, arg6:ULONG) : BOOL;

external (stdcall) SetWaitableTimer(arg0:HANDLE, arg1:Pointer[LARGE_INTEGER], arg2:LONG, arg3:PTIMERAPCROUTINE, arg4:LPVOID, arg5:BOOL) : BOOL;

external (stdcall) CancelWaitableTimer(arg0:HANDLE) : BOOL;

external (stdcall) CreateMutexExA(arg0:LPSECURITY_ATTRIBUTES, arg1:LPCSTR, arg2:DWORD, arg3:DWORD) : HANDLE;

external (stdcall) CreateMutexExW(arg0:LPSECURITY_ATTRIBUTES, arg1:LPCWSTR, arg2:DWORD, arg3:DWORD) : HANDLE;

external (stdcall) CreateEventExA(arg0:LPSECURITY_ATTRIBUTES, arg1:LPCSTR, arg2:DWORD, arg3:DWORD) : HANDLE;

external (stdcall) CreateEventExW(arg0:LPSECURITY_ATTRIBUTES, arg1:LPCWSTR, arg2:DWORD, arg3:DWORD) : HANDLE;

external (stdcall) CreateSemaphoreExA(arg0:LPSECURITY_ATTRIBUTES, arg1:LONG, arg2:LONG, arg3:LPCSTR, arg4:DWORD, arg5:DWORD) : HANDLE;

external (stdcall) CreateSemaphoreExW(arg0:LPSECURITY_ATTRIBUTES, arg1:LONG, arg2:LONG, arg3:LPCWSTR, arg4:DWORD, arg5:DWORD) : HANDLE;

external (stdcall) CreateWaitableTimerExA(arg0:LPSECURITY_ATTRIBUTES, arg1:LPCSTR, arg2:DWORD, arg3:DWORD) : HANDLE;

external (stdcall) CreateWaitableTimerExW(arg0:LPSECURITY_ATTRIBUTES, arg1:LPCWSTR, arg2:DWORD, arg3:DWORD) : HANDLE;

external (stdcall) CreateFileMappingA(arg0:HANDLE, arg1:LPSECURITY_ATTRIBUTES, arg2:DWORD, arg3:DWORD, arg4:DWORD, arg5:LPCSTR) : HANDLE;

external (stdcall) CreateFileMappingW(arg0:HANDLE, arg1:LPSECURITY_ATTRIBUTES, arg2:DWORD, arg3:DWORD, arg4:DWORD, arg5:LPCWSTR) : HANDLE;

external (stdcall) CreateFileMappingNumaA(arg0:HANDLE, arg1:LPSECURITY_ATTRIBUTES, arg2:DWORD, arg3:DWORD, arg4:DWORD, arg5:LPCSTR, arg6:DWORD) : HANDLE;

external (stdcall) CreateFileMappingNumaW(arg0:HANDLE, arg1:LPSECURITY_ATTRIBUTES, arg2:DWORD, arg3:DWORD, arg4:DWORD, arg5:LPCWSTR, arg6:DWORD) : HANDLE;

external (stdcall) OpenFileMappingA(arg0:DWORD, arg1:BOOL, arg2:LPCSTR) : HANDLE;

external (stdcall) OpenFileMappingW(arg0:DWORD, arg1:BOOL, arg2:LPCWSTR) : HANDLE;

external (stdcall) GetLogicalDriveStringsA(arg0:DWORD, arg1:LPSTR) : DWORD;

external (stdcall) GetLogicalDriveStringsW(arg0:DWORD, arg1:LPWSTR) : DWORD;

alias Enum__MEMORY_RESOURCE_NOTIFICATION_TYPE = Int;
alias LowMemoryResourceNotification = 0;
alias HighMemoryResourceNotification = 1;

alias MEMORY_RESOURCE_NOTIFICATION_TYPE = Enum__MEMORY_RESOURCE_NOTIFICATION_TYPE;

external (stdcall) CreateMemoryResourceNotification(arg0:MEMORY_RESOURCE_NOTIFICATION_TYPE) : HANDLE;

external (stdcall) QueryMemoryResourceNotification(arg0:HANDLE, arg1:PBOOL) : BOOL;

external (stdcall) LoadLibraryA(arg0:LPCSTR) : HMODULE;

external (stdcall) LoadLibraryW(arg0:LPCWSTR) : HMODULE;

external (stdcall) LoadLibraryExA(arg0:LPCSTR, arg1:HANDLE, arg2:DWORD) : HMODULE;

external (stdcall) LoadLibraryExW(arg0:LPCWSTR, arg1:HANDLE, arg2:DWORD) : HMODULE;

external (stdcall) GetModuleFileNameA(arg0:HMODULE, arg1:LPSTR, arg2:DWORD) : DWORD;

external (stdcall) GetModuleFileNameW(arg0:HMODULE, arg1:LPWSTR, arg2:DWORD) : DWORD;

external (stdcall) GetModuleHandleA(arg0:LPCSTR) : HMODULE;

external (stdcall) GetModuleHandleW(arg0:LPCWSTR) : HMODULE;

alias PGET_MODULE_HANDLE_EXA = StdCallCodePointer[[DWORD, LPCSTR, Pointer[HMODULE]],[BOOL]];

alias PGET_MODULE_HANDLE_EXW = StdCallCodePointer[[DWORD, LPCWSTR, Pointer[HMODULE]],[BOOL]];

external (stdcall) GetModuleHandleExA(arg0:DWORD, arg1:LPCSTR, arg2:Pointer[HMODULE]) : BOOL;

external (stdcall) GetModuleHandleExW(arg0:DWORD, arg1:LPCWSTR, arg2:Pointer[HMODULE]) : BOOL;

external (stdcall) NeedCurrentDirectoryForExePathA(arg0:LPCSTR) : BOOL;

external (stdcall) NeedCurrentDirectoryForExePathW(arg0:LPCWSTR) : BOOL;

external (stdcall) QueryFullProcessImageNameA(arg0:HANDLE, arg1:DWORD, arg2:LPSTR, arg3:PDWORD) : BOOL;

external (stdcall) QueryFullProcessImageNameW(arg0:HANDLE, arg1:DWORD, arg2:LPWSTR, arg3:PDWORD) : BOOL;

alias Enum__PROC_THREAD_ATTRIBUTE_NUM = Int;
alias ProcThreadAttributeParentProcess = 0;
alias ProcThreadAttributeExtendedFlags = 1;
alias ProcThreadAttributeHandleList = 2;
alias ProcThreadAttributeGroupAffinity = 3;
alias ProcThreadAttributePreferredNode = 4;
alias ProcThreadAttributeIdealProcessor = 5;
alias ProcThreadAttributeUmsThread = 6;
alias ProcThreadAttributeMitigationPolicy = 7;
alias ProcThreadAttributeMax = 8;

alias PROC_THREAD_ATTRIBUTE_NUM = Enum__PROC_THREAD_ATTRIBUTE_NUM;

external (stdcall) InitializeProcThreadAttributeList(arg0:LPPROC_THREAD_ATTRIBUTE_LIST, arg1:DWORD, arg2:DWORD, arg3:PSIZE_T) : BOOL;

external (stdcall) DeleteProcThreadAttributeList(arg0:LPPROC_THREAD_ATTRIBUTE_LIST) : ;

external (stdcall) UpdateProcThreadAttribute(arg0:LPPROC_THREAD_ATTRIBUTE_LIST, arg1:DWORD, arg2:DWORD_PTR, arg3:PVOID, arg4:SIZE_T, arg5:PVOID, arg6:PSIZE_T) : BOOL;

external (stdcall) CreateProcessA(arg0:LPCSTR, arg1:LPSTR, arg2:LPSECURITY_ATTRIBUTES, arg3:LPSECURITY_ATTRIBUTES, arg4:BOOL, arg5:DWORD, arg6:LPVOID, arg7:LPCSTR, arg8:LPSTARTUPINFOA, arg9:LPPROCESS_INFORMATION) : BOOL;

external (stdcall) CreateProcessW(arg0:LPCWSTR, arg1:LPWSTR, arg2:LPSECURITY_ATTRIBUTES, arg3:LPSECURITY_ATTRIBUTES, arg4:BOOL, arg5:DWORD, arg6:LPVOID, arg7:LPCWSTR, arg8:LPSTARTUPINFOW, arg9:LPPROCESS_INFORMATION) : BOOL;

external (stdcall) SetProcessShutdownParameters(arg0:DWORD, arg1:DWORD) : BOOL;

external (stdcall) GetProcessShutdownParameters(arg0:LPDWORD, arg1:LPDWORD) : BOOL;

external (stdcall) GetProcessVersion(arg0:DWORD) : DWORD;

external (stdcall) FatalAppExitA(arg0:UINT, arg1:LPCSTR) : ;

external (stdcall) FatalAppExitW(arg0:UINT, arg1:LPCWSTR) : ;

external (stdcall) GetStartupInfoA(arg0:LPSTARTUPINFOA) : ;

external (stdcall) GetStartupInfoW(arg0:LPSTARTUPINFOW) : ;

external (stdcall) GetCommandLineA() : LPSTR;

external (stdcall) GetCommandLineW() : LPWSTR;

external (stdcall) GetEnvironmentVariableA(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD) : DWORD;

external (stdcall) GetEnvironmentVariableW(arg0:LPCWSTR, arg1:LPWSTR, arg2:DWORD) : DWORD;

external (stdcall) SetEnvironmentVariableA(arg0:LPCSTR, arg1:LPCSTR) : BOOL;

external (stdcall) SetEnvironmentVariableW(arg0:LPCWSTR, arg1:LPCWSTR) : BOOL;

external (stdcall) ExpandEnvironmentStringsA(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD) : DWORD;

external (stdcall) ExpandEnvironmentStringsW(arg0:LPCWSTR, arg1:LPWSTR, arg2:DWORD) : DWORD;

external (stdcall) GetFirmwareEnvironmentVariableA(arg0:LPCSTR, arg1:LPCSTR, arg2:PVOID, arg3:DWORD) : DWORD;

external (stdcall) GetFirmwareEnvironmentVariableW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:PVOID, arg3:DWORD) : DWORD;

external (stdcall) SetFirmwareEnvironmentVariableA(arg0:LPCSTR, arg1:LPCSTR, arg2:PVOID, arg3:DWORD) : BOOL;

external (stdcall) SetFirmwareEnvironmentVariableW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:PVOID, arg3:DWORD) : BOOL;

external (stdcall) OutputDebugStringA(arg0:LPCSTR) : ;

external (stdcall) OutputDebugStringW(arg0:LPCWSTR) : ;

external (stdcall) FindResourceA(arg0:HMODULE, arg1:LPCSTR, arg2:LPCSTR) : HRSRC;

external (stdcall) FindResourceW(arg0:HMODULE, arg1:LPCWSTR, arg2:LPCWSTR) : HRSRC;

external (stdcall) FindResourceExA(arg0:HMODULE, arg1:LPCSTR, arg2:LPCSTR, arg3:WORD) : HRSRC;

external (stdcall) FindResourceExW(arg0:HMODULE, arg1:LPCWSTR, arg2:LPCWSTR, arg3:WORD) : HRSRC;

alias ENUMRESTYPEPROCA = StdCallCodePointer[[HMODULE, LPSTR, LONG_PTR],[BOOL]];

alias ENUMRESTYPEPROCW = StdCallCodePointer[[HMODULE, LPWSTR, LONG_PTR],[BOOL]];

alias ENUMRESNAMEPROCA = StdCallCodePointer[[HMODULE, LPCSTR, LPSTR, LONG_PTR],[BOOL]];

alias ENUMRESNAMEPROCW = StdCallCodePointer[[HMODULE, LPCWSTR, LPWSTR, LONG_PTR],[BOOL]];

alias ENUMRESLANGPROCA = StdCallCodePointer[[HMODULE, LPCSTR, LPCSTR, WORD, LONG_PTR],[BOOL]];

alias ENUMRESLANGPROCW = StdCallCodePointer[[HMODULE, LPCWSTR, LPCWSTR, WORD, LONG_PTR],[BOOL]];

external (stdcall) EnumResourceTypesA(arg0:HMODULE, arg1:ENUMRESTYPEPROCA, arg2:LONG_PTR) : BOOL;

external (stdcall) EnumResourceTypesW(arg0:HMODULE, arg1:ENUMRESTYPEPROCW, arg2:LONG_PTR) : BOOL;

external (stdcall) EnumResourceNamesA(arg0:HMODULE, arg1:LPCSTR, arg2:ENUMRESNAMEPROCA, arg3:LONG_PTR) : BOOL;

external (stdcall) EnumResourceNamesW(arg0:HMODULE, arg1:LPCWSTR, arg2:ENUMRESNAMEPROCW, arg3:LONG_PTR) : BOOL;

external (stdcall) EnumResourceLanguagesA(arg0:HMODULE, arg1:LPCSTR, arg2:LPCSTR, arg3:ENUMRESLANGPROCA, arg4:LONG_PTR) : BOOL;

external (stdcall) EnumResourceLanguagesW(arg0:HMODULE, arg1:LPCWSTR, arg2:LPCWSTR, arg3:ENUMRESLANGPROCW, arg4:LONG_PTR) : BOOL;

external (stdcall) EnumResourceTypesExA(arg0:HMODULE, arg1:ENUMRESTYPEPROCA, arg2:LONG_PTR, arg3:DWORD, arg4:LANGID) : BOOL;

external (stdcall) EnumResourceTypesExW(arg0:HMODULE, arg1:ENUMRESTYPEPROCW, arg2:LONG_PTR, arg3:DWORD, arg4:LANGID) : BOOL;

external (stdcall) EnumResourceNamesExA(arg0:HMODULE, arg1:LPCSTR, arg2:ENUMRESNAMEPROCA, arg3:LONG_PTR, arg4:DWORD, arg5:LANGID) : BOOL;

external (stdcall) EnumResourceNamesExW(arg0:HMODULE, arg1:LPCWSTR, arg2:ENUMRESNAMEPROCW, arg3:LONG_PTR, arg4:DWORD, arg5:LANGID) : BOOL;

external (stdcall) EnumResourceLanguagesExA(arg0:HMODULE, arg1:LPCSTR, arg2:LPCSTR, arg3:ENUMRESLANGPROCA, arg4:LONG_PTR, arg5:DWORD, arg6:LANGID) : BOOL;

external (stdcall) EnumResourceLanguagesExW(arg0:HMODULE, arg1:LPCWSTR, arg2:LPCWSTR, arg3:ENUMRESLANGPROCW, arg4:LONG_PTR, arg5:DWORD, arg6:LANGID) : BOOL;

external (stdcall) BeginUpdateResourceA(arg0:LPCSTR, arg1:BOOL) : HANDLE;

external (stdcall) BeginUpdateResourceW(arg0:LPCWSTR, arg1:BOOL) : HANDLE;

external (stdcall) UpdateResourceA(arg0:HANDLE, arg1:LPCSTR, arg2:LPCSTR, arg3:WORD, arg4:LPVOID, arg5:DWORD) : BOOL;

external (stdcall) UpdateResourceW(arg0:HANDLE, arg1:LPCWSTR, arg2:LPCWSTR, arg3:WORD, arg4:LPVOID, arg5:DWORD) : BOOL;

external (stdcall) EndUpdateResourceA(arg0:HANDLE, arg1:BOOL) : BOOL;

external (stdcall) EndUpdateResourceW(arg0:HANDLE, arg1:BOOL) : BOOL;

external (stdcall) GlobalAddAtomA(arg0:LPCSTR) : ATOM;

external (stdcall) GlobalAddAtomW(arg0:LPCWSTR) : ATOM;

external (stdcall) GlobalFindAtomA(arg0:LPCSTR) : ATOM;

external (stdcall) GlobalFindAtomW(arg0:LPCWSTR) : ATOM;

external (stdcall) GlobalGetAtomNameA(arg0:ATOM, arg1:LPSTR, arg2:Int) : UINT;

external (stdcall) GlobalGetAtomNameW(arg0:ATOM, arg1:LPWSTR, arg2:Int) : UINT;

external (stdcall) AddAtomA(arg0:LPCSTR) : ATOM;

external (stdcall) AddAtomW(arg0:LPCWSTR) : ATOM;

external (stdcall) FindAtomA(arg0:LPCSTR) : ATOM;

external (stdcall) FindAtomW(arg0:LPCWSTR) : ATOM;

external (stdcall) GetAtomNameA(arg0:ATOM, arg1:LPSTR, arg2:Int) : UINT;

external (stdcall) GetAtomNameW(arg0:ATOM, arg1:LPWSTR, arg2:Int) : UINT;

external (stdcall) GetProfileIntA(arg0:LPCSTR, arg1:LPCSTR, arg2:INT) : UINT;

external (stdcall) GetProfileIntW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:INT) : UINT;

external (stdcall) GetProfileStringA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPCSTR, arg3:LPSTR, arg4:DWORD) : DWORD;

external (stdcall) GetProfileStringW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPCWSTR, arg3:LPWSTR, arg4:DWORD) : DWORD;

external (stdcall) WriteProfileStringA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPCSTR) : BOOL;

external (stdcall) WriteProfileStringW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPCWSTR) : BOOL;

external (stdcall) GetProfileSectionA(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD) : DWORD;

external (stdcall) GetProfileSectionW(arg0:LPCWSTR, arg1:LPWSTR, arg2:DWORD) : DWORD;

external (stdcall) WriteProfileSectionA(arg0:LPCSTR, arg1:LPCSTR) : BOOL;

external (stdcall) WriteProfileSectionW(arg0:LPCWSTR, arg1:LPCWSTR) : BOOL;

external (stdcall) GetPrivateProfileIntA(arg0:LPCSTR, arg1:LPCSTR, arg2:INT, arg3:LPCSTR) : UINT;

external (stdcall) GetPrivateProfileIntW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:INT, arg3:LPCWSTR) : UINT;

external (stdcall) GetPrivateProfileStringA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPCSTR, arg3:LPSTR, arg4:DWORD, arg5:LPCSTR) : DWORD;

external (stdcall) GetPrivateProfileStringW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPCWSTR, arg3:LPWSTR, arg4:DWORD, arg5:LPCWSTR) : DWORD;

external (stdcall) WritePrivateProfileStringA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPCSTR, arg3:LPCSTR) : BOOL;

external (stdcall) WritePrivateProfileStringW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPCWSTR, arg3:LPCWSTR) : BOOL;

external (stdcall) GetPrivateProfileSectionA(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD, arg3:LPCSTR) : DWORD;

external (stdcall) GetPrivateProfileSectionW(arg0:LPCWSTR, arg1:LPWSTR, arg2:DWORD, arg3:LPCWSTR) : DWORD;

external (stdcall) WritePrivateProfileSectionA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPCSTR) : BOOL;

external (stdcall) WritePrivateProfileSectionW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPCWSTR) : BOOL;

external (stdcall) GetPrivateProfileSectionNamesA(arg0:LPSTR, arg1:DWORD, arg2:LPCSTR) : DWORD;

external (stdcall) GetPrivateProfileSectionNamesW(arg0:LPWSTR, arg1:DWORD, arg2:LPCWSTR) : DWORD;

external (stdcall) GetPrivateProfileStructA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPVOID, arg3:UINT, arg4:LPCSTR) : BOOL;

external (stdcall) GetPrivateProfileStructW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPVOID, arg3:UINT, arg4:LPCWSTR) : BOOL;

external (stdcall) WritePrivateProfileStructA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPVOID, arg3:UINT, arg4:LPCSTR) : BOOL;

external (stdcall) WritePrivateProfileStructW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPVOID, arg3:UINT, arg4:LPCWSTR) : BOOL;

external (stdcall) GetDriveTypeA(arg0:LPCSTR) : UINT;

external (stdcall) GetDriveTypeW(arg0:LPCWSTR) : UINT;

external (stdcall) GetSystemDirectoryA(arg0:LPSTR, arg1:UINT) : UINT;

external (stdcall) GetSystemDirectoryW(arg0:LPWSTR, arg1:UINT) : UINT;

external (stdcall) GetTempPathA(arg0:DWORD, arg1:LPSTR) : DWORD;

external (stdcall) GetTempPathW(arg0:DWORD, arg1:LPWSTR) : DWORD;

external (stdcall) GetTempFileNameA(arg0:LPCSTR, arg1:LPCSTR, arg2:UINT, arg3:LPSTR) : UINT;

external (stdcall) GetTempFileNameW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:UINT, arg3:LPWSTR) : UINT;

external (stdcall) GetWindowsDirectoryA(arg0:LPSTR, arg1:UINT) : UINT;

external (stdcall) GetWindowsDirectoryW(arg0:LPWSTR, arg1:UINT) : UINT;

external (stdcall) GetSystemWindowsDirectoryA(arg0:LPSTR, arg1:UINT) : UINT;

external (stdcall) GetSystemWindowsDirectoryW(arg0:LPWSTR, arg1:UINT) : UINT;

external (stdcall) GetSystemWow64DirectoryA(arg0:LPSTR, arg1:UINT) : UINT;

external (stdcall) GetSystemWow64DirectoryW(arg0:LPWSTR, arg1:UINT) : UINT;

external (stdcall) Wow64EnableWow64FsRedirection(arg0:BOOLEAN) : BOOLEAN;

external (stdcall) Wow64DisableWow64FsRedirection(arg0:Pointer[PVOID]) : BOOL;

external (stdcall) Wow64RevertWow64FsRedirection(arg0:PVOID) : BOOL;

alias PGET_SYSTEM_WOW64_DIRECTORY_A = StdCallCodePointer[[LPSTR, UINT],[UINT]];

alias PGET_SYSTEM_WOW64_DIRECTORY_W = StdCallCodePointer[[LPWSTR, UINT],[UINT]];

external (stdcall) SetCurrentDirectoryA(arg0:LPCSTR) : BOOL;

external (stdcall) SetCurrentDirectoryW(arg0:LPCWSTR) : BOOL;

external (stdcall) GetCurrentDirectoryA(arg0:DWORD, arg1:LPSTR) : DWORD;

external (stdcall) GetCurrentDirectoryW(arg0:DWORD, arg1:LPWSTR) : DWORD;

external (stdcall) SetDllDirectoryA(arg0:LPCSTR) : BOOL;

external (stdcall) SetDllDirectoryW(arg0:LPCWSTR) : BOOL;

external (stdcall) GetDllDirectoryA(arg0:DWORD, arg1:LPSTR) : DWORD;

external (stdcall) GetDllDirectoryW(arg0:DWORD, arg1:LPWSTR) : DWORD;

external (stdcall) SetSearchPathMode(arg0:DWORD) : BOOL;

external (stdcall) GetDiskFreeSpaceA(arg0:LPCSTR, arg1:LPDWORD, arg2:LPDWORD, arg3:LPDWORD, arg4:LPDWORD) : BOOL;

external (stdcall) GetDiskFreeSpaceW(arg0:LPCWSTR, arg1:LPDWORD, arg2:LPDWORD, arg3:LPDWORD, arg4:LPDWORD) : BOOL;

external (stdcall) GetDiskFreeSpaceExA(arg0:LPCSTR, arg1:PULARGE_INTEGER, arg2:PULARGE_INTEGER, arg3:PULARGE_INTEGER) : BOOL;

external (stdcall) GetDiskFreeSpaceExW(arg0:LPCWSTR, arg1:PULARGE_INTEGER, arg2:PULARGE_INTEGER, arg3:PULARGE_INTEGER) : BOOL;

external (stdcall) CreateDirectoryA(arg0:LPCSTR, arg1:LPSECURITY_ATTRIBUTES) : BOOL;

external (stdcall) CreateDirectoryW(arg0:LPCWSTR, arg1:LPSECURITY_ATTRIBUTES) : BOOL;

external (stdcall) CreateDirectoryExA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPSECURITY_ATTRIBUTES) : BOOL;

external (stdcall) CreateDirectoryExW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPSECURITY_ATTRIBUTES) : BOOL;

external (stdcall) CreateDirectoryTransactedA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPSECURITY_ATTRIBUTES, arg3:HANDLE) : BOOL;

external (stdcall) CreateDirectoryTransactedW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPSECURITY_ATTRIBUTES, arg3:HANDLE) : BOOL;

external (stdcall) RemoveDirectoryA(arg0:LPCSTR) : BOOL;

external (stdcall) RemoveDirectoryW(arg0:LPCWSTR) : BOOL;

external (stdcall) RemoveDirectoryTransactedA(arg0:LPCSTR, arg1:HANDLE) : BOOL;

external (stdcall) RemoveDirectoryTransactedW(arg0:LPCWSTR, arg1:HANDLE) : BOOL;

external (stdcall) GetFullPathNameA(arg0:LPCSTR, arg1:DWORD, arg2:LPSTR, arg3:Pointer[LPSTR]) : DWORD;

external (stdcall) GetFullPathNameW(arg0:LPCWSTR, arg1:DWORD, arg2:LPWSTR, arg3:Pointer[LPWSTR]) : DWORD;

external (stdcall) GetFullPathNameTransactedA(arg0:LPCSTR, arg1:DWORD, arg2:LPSTR, arg3:Pointer[LPSTR], arg4:HANDLE) : DWORD;

external (stdcall) GetFullPathNameTransactedW(arg0:LPCWSTR, arg1:DWORD, arg2:LPWSTR, arg3:Pointer[LPWSTR], arg4:HANDLE) : DWORD;

external (stdcall) DefineDosDeviceA(arg0:DWORD, arg1:LPCSTR, arg2:LPCSTR) : BOOL;

external (stdcall) DefineDosDeviceW(arg0:DWORD, arg1:LPCWSTR, arg2:LPCWSTR) : BOOL;

external (stdcall) QueryDosDeviceA(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD) : DWORD;

external (stdcall) QueryDosDeviceW(arg0:LPCWSTR, arg1:LPWSTR, arg2:DWORD) : DWORD;

external (stdcall) CreateFileA(arg0:LPCSTR, arg1:DWORD, arg2:DWORD, arg3:LPSECURITY_ATTRIBUTES, arg4:DWORD, arg5:DWORD, arg6:HANDLE) : HANDLE;

external (stdcall) CreateFileW(arg0:LPCWSTR, arg1:DWORD, arg2:DWORD, arg3:LPSECURITY_ATTRIBUTES, arg4:DWORD, arg5:DWORD, arg6:HANDLE) : HANDLE;

external (stdcall) CreateFileTransactedA(arg0:LPCSTR, arg1:DWORD, arg2:DWORD, arg3:LPSECURITY_ATTRIBUTES, arg4:DWORD, arg5:DWORD, arg6:HANDLE, arg7:HANDLE, arg8:PUSHORT, arg9:PVOID) : HANDLE;

external (stdcall) CreateFileTransactedW(arg0:LPCWSTR, arg1:DWORD, arg2:DWORD, arg3:LPSECURITY_ATTRIBUTES, arg4:DWORD, arg5:DWORD, arg6:HANDLE, arg7:HANDLE, arg8:PUSHORT, arg9:PVOID) : HANDLE;

external (stdcall) ReOpenFile(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:DWORD) : HANDLE;

external (stdcall) SetFileAttributesA(arg0:LPCSTR, arg1:DWORD) : BOOL;

external (stdcall) SetFileAttributesW(arg0:LPCWSTR, arg1:DWORD) : BOOL;

external (stdcall) GetFileAttributesA(arg0:LPCSTR) : DWORD;

external (stdcall) GetFileAttributesW(arg0:LPCWSTR) : DWORD;

external (stdcall) SetFileAttributesTransactedA(arg0:LPCSTR, arg1:DWORD, arg2:HANDLE) : BOOL;

external (stdcall) SetFileAttributesTransactedW(arg0:LPCWSTR, arg1:DWORD, arg2:HANDLE) : BOOL;

alias Enum__GET_FILEEX_INFO_LEVELS = Int;
alias GetFileExInfoStandard = 0;
alias GetFileExMaxInfoLevel = 1;

alias GET_FILEEX_INFO_LEVELS = Enum__GET_FILEEX_INFO_LEVELS;

external (stdcall) GetFileAttributesTransactedA(arg0:LPCSTR, arg1:GET_FILEEX_INFO_LEVELS, arg2:LPVOID, arg3:HANDLE) : BOOL;

external (stdcall) GetFileAttributesTransactedW(arg0:LPCWSTR, arg1:GET_FILEEX_INFO_LEVELS, arg2:LPVOID, arg3:HANDLE) : BOOL;

external (stdcall) GetFileAttributesExA(arg0:LPCSTR, arg1:GET_FILEEX_INFO_LEVELS, arg2:LPVOID) : BOOL;

external (stdcall) GetFileAttributesExW(arg0:LPCWSTR, arg1:GET_FILEEX_INFO_LEVELS, arg2:LPVOID) : BOOL;

external (stdcall) GetCompressedFileSizeA(arg0:LPCSTR, arg1:LPDWORD) : DWORD;

external (stdcall) GetCompressedFileSizeW(arg0:LPCWSTR, arg1:LPDWORD) : DWORD;

external (stdcall) GetCompressedFileSizeTransactedA(arg0:LPCSTR, arg1:LPDWORD, arg2:HANDLE) : DWORD;

external (stdcall) GetCompressedFileSizeTransactedW(arg0:LPCWSTR, arg1:LPDWORD, arg2:HANDLE) : DWORD;

external (stdcall) DeleteFileA(arg0:LPCSTR) : BOOL;

external (stdcall) DeleteFileW(arg0:LPCWSTR) : BOOL;

external (stdcall) DeleteFileTransactedA(arg0:LPCSTR, arg1:HANDLE) : BOOL;

external (stdcall) DeleteFileTransactedW(arg0:LPCWSTR, arg1:HANDLE) : BOOL;

external (stdcall) CheckNameLegalDOS8Dot3A(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD, arg3:PBOOL, arg4:PBOOL) : BOOL;

external (stdcall) CheckNameLegalDOS8Dot3W(arg0:LPCWSTR, arg1:LPSTR, arg2:DWORD, arg3:PBOOL, arg4:PBOOL) : BOOL;

alias Enum__FINDEX_INFO_LEVELS = Int;
alias FindExInfoStandard = 0;
alias FindExInfoBasic = 1;
alias FindExInfoMaxInfoLevel = 2;

alias FINDEX_INFO_LEVELS = Enum__FINDEX_INFO_LEVELS;

alias Enum__FINDEX_SEARCH_OPS = Int;
alias FindExSearchNameMatch = 0;
alias FindExSearchLimitToDirectories = 1;
alias FindExSearchLimitToDevices = 2;
alias FindExSearchMaxSearchOp = 3;

alias FINDEX_SEARCH_OPS = Enum__FINDEX_SEARCH_OPS;

external (stdcall) FindFirstFileExA(arg0:LPCSTR, arg1:FINDEX_INFO_LEVELS, arg2:LPVOID, arg3:FINDEX_SEARCH_OPS, arg4:LPVOID, arg5:DWORD) : HANDLE;

external (stdcall) FindFirstFileExW(arg0:LPCWSTR, arg1:FINDEX_INFO_LEVELS, arg2:LPVOID, arg3:FINDEX_SEARCH_OPS, arg4:LPVOID, arg5:DWORD) : HANDLE;

external (stdcall) FindFirstFileTransactedA(arg0:LPCSTR, arg1:FINDEX_INFO_LEVELS, arg2:LPVOID, arg3:FINDEX_SEARCH_OPS, arg4:LPVOID, arg5:DWORD, arg6:HANDLE) : HANDLE;

external (stdcall) FindFirstFileTransactedW(arg0:LPCWSTR, arg1:FINDEX_INFO_LEVELS, arg2:LPVOID, arg3:FINDEX_SEARCH_OPS, arg4:LPVOID, arg5:DWORD, arg6:HANDLE) : HANDLE;

external (stdcall) FindFirstFileA(arg0:LPCSTR, arg1:LPWIN32_FIND_DATAA) : HANDLE;

external (stdcall) FindFirstFileW(arg0:LPCWSTR, arg1:LPWIN32_FIND_DATAW) : HANDLE;

external (stdcall) FindNextFileA(arg0:HANDLE, arg1:LPWIN32_FIND_DATAA) : BOOL;

external (stdcall) FindNextFileW(arg0:HANDLE, arg1:LPWIN32_FIND_DATAW) : BOOL;

external (stdcall) SearchPathA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPCSTR, arg3:DWORD, arg4:LPSTR, arg5:Pointer[LPSTR]) : DWORD;

external (stdcall) SearchPathW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPCWSTR, arg3:DWORD, arg4:LPWSTR, arg5:Pointer[LPWSTR]) : DWORD;

external (stdcall) CopyFileA(arg0:LPCSTR, arg1:LPCSTR, arg2:BOOL) : BOOL;

external (stdcall) CopyFileW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:BOOL) : BOOL;

alias LPPROGRESS_ROUTINE = StdCallCodePointer[[LARGE_INTEGER, LARGE_INTEGER, LARGE_INTEGER, LARGE_INTEGER, DWORD, DWORD, HANDLE, HANDLE, LPVOID],[DWORD]];

external (stdcall) CopyFileExA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPPROGRESS_ROUTINE, arg3:LPVOID, arg4:LPBOOL, arg5:DWORD) : BOOL;

external (stdcall) CopyFileExW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPPROGRESS_ROUTINE, arg3:LPVOID, arg4:LPBOOL, arg5:DWORD) : BOOL;

external (stdcall) CopyFileTransactedA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPPROGRESS_ROUTINE, arg3:LPVOID, arg4:LPBOOL, arg5:DWORD, arg6:HANDLE) : BOOL;

external (stdcall) CopyFileTransactedW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPPROGRESS_ROUTINE, arg3:LPVOID, arg4:LPBOOL, arg5:DWORD, arg6:HANDLE) : BOOL;

external (stdcall) MoveFileA(arg0:LPCSTR, arg1:LPCSTR) : BOOL;

external (stdcall) MoveFileW(arg0:LPCWSTR, arg1:LPCWSTR) : BOOL;

external (stdcall) MoveFileExA(arg0:LPCSTR, arg1:LPCSTR, arg2:DWORD) : BOOL;

external (stdcall) MoveFileExW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:DWORD) : BOOL;

external (stdcall) MoveFileWithProgressA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPPROGRESS_ROUTINE, arg3:LPVOID, arg4:DWORD) : BOOL;

external (stdcall) MoveFileWithProgressW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPPROGRESS_ROUTINE, arg3:LPVOID, arg4:DWORD) : BOOL;

external (stdcall) MoveFileTransactedA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPPROGRESS_ROUTINE, arg3:LPVOID, arg4:DWORD, arg5:HANDLE) : BOOL;

external (stdcall) MoveFileTransactedW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPPROGRESS_ROUTINE, arg3:LPVOID, arg4:DWORD, arg5:HANDLE) : BOOL;

external (stdcall) ReplaceFileA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPCSTR, arg3:DWORD, arg4:LPVOID, arg5:LPVOID) : BOOL;

external (stdcall) ReplaceFileW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPCWSTR, arg3:DWORD, arg4:LPVOID, arg5:LPVOID) : BOOL;

external (stdcall) CreateHardLinkA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPSECURITY_ATTRIBUTES) : BOOL;

external (stdcall) CreateHardLinkW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPSECURITY_ATTRIBUTES) : BOOL;

external (stdcall) CreateHardLinkTransactedA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPSECURITY_ATTRIBUTES, arg3:HANDLE) : BOOL;

external (stdcall) CreateHardLinkTransactedW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPSECURITY_ATTRIBUTES, arg3:HANDLE) : BOOL;

alias Enum__STREAM_INFO_LEVELS = Int;
alias FindStreamInfoStandard = 0;
alias FindStreamInfoMaxInfoLevel = 1;

alias STREAM_INFO_LEVELS = Enum__STREAM_INFO_LEVELS;

record Struct__WIN32_FIND_STREAM_DATA (
    StreamSize : LARGE_INTEGER,
    cStreamName : Array[WCHAR, 296],
);

alias WIN32_FIND_STREAM_DATA = Struct__WIN32_FIND_STREAM_DATA;

alias PWIN32_FIND_STREAM_DATA = Pointer[Struct__WIN32_FIND_STREAM_DATA];

external (stdcall) FindFirstStreamW(arg0:LPCWSTR, arg1:STREAM_INFO_LEVELS, arg2:LPVOID, arg3:DWORD) : HANDLE;

external (stdcall) FindFirstStreamTransactedW(arg0:LPCWSTR, arg1:STREAM_INFO_LEVELS, arg2:LPVOID, arg3:DWORD, arg4:HANDLE) : HANDLE;

external (stdcall) FindNextStreamW(arg0:HANDLE, arg1:LPVOID) : BOOL;

external (stdcall) FindFirstFileNameW(arg0:LPCWSTR, arg1:DWORD, arg2:LPDWORD, arg3:PWCHAR) : HANDLE;

external (stdcall) FindNextFileNameW(arg0:HANDLE, arg1:LPDWORD, arg2:PWCHAR) : BOOL;

external (stdcall) FindFirstFileNameTransactedW(arg0:LPCWSTR, arg1:DWORD, arg2:LPDWORD, arg3:PWCHAR, arg4:HANDLE) : HANDLE;

external (stdcall) CreateNamedPipeA(arg0:LPCSTR, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:DWORD, arg5:DWORD, arg6:DWORD, arg7:LPSECURITY_ATTRIBUTES) : HANDLE;

external (stdcall) CreateNamedPipeW(arg0:LPCWSTR, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:DWORD, arg5:DWORD, arg6:DWORD, arg7:LPSECURITY_ATTRIBUTES) : HANDLE;

external (stdcall) GetNamedPipeHandleStateA(arg0:HANDLE, arg1:LPDWORD, arg2:LPDWORD, arg3:LPDWORD, arg4:LPDWORD, arg5:LPSTR, arg6:DWORD) : BOOL;

external (stdcall) GetNamedPipeHandleStateW(arg0:HANDLE, arg1:LPDWORD, arg2:LPDWORD, arg3:LPDWORD, arg4:LPDWORD, arg5:LPWSTR, arg6:DWORD) : BOOL;

external (stdcall) CallNamedPipeA(arg0:LPCSTR, arg1:LPVOID, arg2:DWORD, arg3:LPVOID, arg4:DWORD, arg5:LPDWORD, arg6:DWORD) : BOOL;

external (stdcall) CallNamedPipeW(arg0:LPCWSTR, arg1:LPVOID, arg2:DWORD, arg3:LPVOID, arg4:DWORD, arg5:LPDWORD, arg6:DWORD) : BOOL;

external (stdcall) WaitNamedPipeA(arg0:LPCSTR, arg1:DWORD) : BOOL;

external (stdcall) WaitNamedPipeW(arg0:LPCWSTR, arg1:DWORD) : BOOL;

alias Enum_Unnamed107 = Int;
alias PipeAttribute = 0;
alias PipeConnectionAttribute = 1;
alias PipeHandleAttribute = 2;

alias PIPE_ATTRIBUTE_TYPE = Enum_Unnamed107;

external (stdcall) GetNamedPipeAttribute(arg0:HANDLE, arg1:PIPE_ATTRIBUTE_TYPE, arg2:PSTR, arg3:PVOID, arg4:PSIZE_T) : BOOL;

external (stdcall) SetNamedPipeAttribute(arg0:HANDLE, arg1:PIPE_ATTRIBUTE_TYPE, arg2:PSTR, arg3:PVOID, arg4:SIZE_T) : BOOL;

external (stdcall) GetNamedPipeClientComputerNameA(arg0:HANDLE, arg1:LPSTR, arg2:ULONG) : BOOL;

external (stdcall) GetNamedPipeClientComputerNameW(arg0:HANDLE, arg1:LPWSTR, arg2:ULONG) : BOOL;

external (stdcall) GetNamedPipeClientProcessId(arg0:HANDLE, arg1:PULONG) : BOOL;

external (stdcall) GetNamedPipeClientSessionId(arg0:HANDLE, arg1:PULONG) : BOOL;

external (stdcall) GetNamedPipeServerProcessId(arg0:HANDLE, arg1:PULONG) : BOOL;

external (stdcall) GetNamedPipeServerSessionId(arg0:HANDLE, arg1:PULONG) : BOOL;

external (stdcall) SetVolumeLabelA(arg0:LPCSTR, arg1:LPCSTR) : BOOL;

external (stdcall) SetVolumeLabelW(arg0:LPCWSTR, arg1:LPCWSTR) : BOOL;

external (stdcall) SetFileApisToOEM() : ;

external (stdcall) SetFileApisToANSI() : ;

external (stdcall) AreFileApisANSI() : BOOL;

external (stdcall) GetVolumeInformationA(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD, arg3:LPDWORD, arg4:LPDWORD, arg5:LPDWORD, arg6:LPSTR, arg7:DWORD) : BOOL;

external (stdcall) GetVolumeInformationW(arg0:LPCWSTR, arg1:LPWSTR, arg2:DWORD, arg3:LPDWORD, arg4:LPDWORD, arg5:LPDWORD, arg6:LPWSTR, arg7:DWORD) : BOOL;

external (stdcall) GetVolumeInformationByHandleW(arg0:HANDLE, arg1:LPWSTR, arg2:DWORD, arg3:LPDWORD, arg4:LPDWORD, arg5:LPDWORD, arg6:LPWSTR, arg7:DWORD) : BOOL;

external (stdcall) CancelSynchronousIo(arg0:HANDLE) : BOOL;

external (stdcall) CancelIoEx(arg0:HANDLE, arg1:LPOVERLAPPED) : BOOL;

external (stdcall) CancelIo(arg0:HANDLE) : BOOL;

external (stdcall) SetFileBandwidthReservation(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:BOOL, arg4:LPDWORD, arg5:LPDWORD) : BOOL;

external (stdcall) GetFileBandwidthReservation(arg0:HANDLE, arg1:LPDWORD, arg2:LPDWORD, arg3:LPBOOL, arg4:LPDWORD, arg5:LPDWORD) : BOOL;

external (stdcall) ClearEventLogA(arg0:HANDLE, arg1:LPCSTR) : BOOL;

external (stdcall) ClearEventLogW(arg0:HANDLE, arg1:LPCWSTR) : BOOL;

external (stdcall) BackupEventLogA(arg0:HANDLE, arg1:LPCSTR) : BOOL;

external (stdcall) BackupEventLogW(arg0:HANDLE, arg1:LPCWSTR) : BOOL;

external (stdcall) CloseEventLog(arg0:HANDLE) : BOOL;

external (stdcall) DeregisterEventSource(arg0:HANDLE) : BOOL;

external (stdcall) NotifyChangeEventLog(arg0:HANDLE, arg1:HANDLE) : BOOL;

external (stdcall) GetNumberOfEventLogRecords(arg0:HANDLE, arg1:PDWORD) : BOOL;

external (stdcall) GetOldestEventLogRecord(arg0:HANDLE, arg1:PDWORD) : BOOL;

external (stdcall) OpenEventLogA(arg0:LPCSTR, arg1:LPCSTR) : HANDLE;

external (stdcall) OpenEventLogW(arg0:LPCWSTR, arg1:LPCWSTR) : HANDLE;

external (stdcall) RegisterEventSourceA(arg0:LPCSTR, arg1:LPCSTR) : HANDLE;

external (stdcall) RegisterEventSourceW(arg0:LPCWSTR, arg1:LPCWSTR) : HANDLE;

external (stdcall) OpenBackupEventLogA(arg0:LPCSTR, arg1:LPCSTR) : HANDLE;

external (stdcall) OpenBackupEventLogW(arg0:LPCWSTR, arg1:LPCWSTR) : HANDLE;

external (stdcall) ReadEventLogA(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:LPVOID, arg4:DWORD, arg5:Pointer[DWORD], arg6:Pointer[DWORD]) : BOOL;

external (stdcall) ReadEventLogW(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:LPVOID, arg4:DWORD, arg5:Pointer[DWORD], arg6:Pointer[DWORD]) : BOOL;

external (stdcall) ReportEventA(arg0:HANDLE, arg1:WORD, arg2:WORD, arg3:DWORD, arg4:PSID, arg5:WORD, arg6:DWORD, arg7:Pointer[LPCSTR], arg8:LPVOID) : BOOL;

external (stdcall) ReportEventW(arg0:HANDLE, arg1:WORD, arg2:WORD, arg3:DWORD, arg4:PSID, arg5:WORD, arg6:DWORD, arg7:Pointer[LPCWSTR], arg8:LPVOID) : BOOL;

record Struct__EVENTLOG_FULL_INFORMATION (
    dwFull : DWORD,
);

alias EVENTLOG_FULL_INFORMATION = Struct__EVENTLOG_FULL_INFORMATION;

alias LPEVENTLOG_FULL_INFORMATION = Pointer[Struct__EVENTLOG_FULL_INFORMATION];

external (stdcall) GetEventLogInformation(arg0:HANDLE, arg1:DWORD, arg2:LPVOID, arg3:DWORD, arg4:LPDWORD) : BOOL;

external (stdcall) DuplicateToken(arg0:HANDLE, arg1:SECURITY_IMPERSONATION_LEVEL, arg2:PHANDLE) : BOOL;

external (stdcall) GetKernelObjectSecurity(arg0:HANDLE, arg1:SECURITY_INFORMATION, arg2:PSECURITY_DESCRIPTOR, arg3:DWORD, arg4:LPDWORD) : BOOL;

external (stdcall) ImpersonateNamedPipeClient(arg0:HANDLE) : BOOL;

external (stdcall) ImpersonateSelf(arg0:SECURITY_IMPERSONATION_LEVEL) : BOOL;

external (stdcall) RevertToSelf() : BOOL;

external (stdcall) SetThreadToken(arg0:PHANDLE, arg1:HANDLE) : BOOL;

external (stdcall) AccessCheck(arg0:PSECURITY_DESCRIPTOR, arg1:HANDLE, arg2:DWORD, arg3:PGENERIC_MAPPING, arg4:PPRIVILEGE_SET, arg5:LPDWORD, arg6:LPDWORD, arg7:LPBOOL) : BOOL;

external (stdcall) AccessCheckByType(arg0:PSECURITY_DESCRIPTOR, arg1:PSID, arg2:HANDLE, arg3:DWORD, arg4:POBJECT_TYPE_LIST, arg5:DWORD, arg6:PGENERIC_MAPPING, arg7:PPRIVILEGE_SET, arg8:LPDWORD, arg9:LPDWORD, arg10:LPBOOL) : BOOL;

external (stdcall) AccessCheckByTypeResultList(arg0:PSECURITY_DESCRIPTOR, arg1:PSID, arg2:HANDLE, arg3:DWORD, arg4:POBJECT_TYPE_LIST, arg5:DWORD, arg6:PGENERIC_MAPPING, arg7:PPRIVILEGE_SET, arg8:LPDWORD, arg9:LPDWORD, arg10:LPDWORD) : BOOL;

external (stdcall) OpenProcessToken(arg0:HANDLE, arg1:DWORD, arg2:PHANDLE) : BOOL;

external (stdcall) OpenThreadToken(arg0:HANDLE, arg1:DWORD, arg2:BOOL, arg3:PHANDLE) : BOOL;

external (stdcall) GetTokenInformation(arg0:HANDLE, arg1:TOKEN_INFORMATION_CLASS, arg2:LPVOID, arg3:DWORD, arg4:PDWORD) : BOOL;

external (stdcall) SetTokenInformation(arg0:HANDLE, arg1:TOKEN_INFORMATION_CLASS, arg2:LPVOID, arg3:DWORD) : BOOL;

external (stdcall) AdjustTokenPrivileges(arg0:HANDLE, arg1:BOOL, arg2:PTOKEN_PRIVILEGES, arg3:DWORD, arg4:PTOKEN_PRIVILEGES, arg5:PDWORD) : BOOL;

external (stdcall) AdjustTokenGroups(arg0:HANDLE, arg1:BOOL, arg2:PTOKEN_GROUPS, arg3:DWORD, arg4:PTOKEN_GROUPS, arg5:PDWORD) : BOOL;

external (stdcall) PrivilegeCheck(arg0:HANDLE, arg1:PPRIVILEGE_SET, arg2:LPBOOL) : BOOL;

external (stdcall) AccessCheckAndAuditAlarmA(arg0:LPCSTR, arg1:LPVOID, arg2:LPSTR, arg3:LPSTR, arg4:PSECURITY_DESCRIPTOR, arg5:DWORD, arg6:PGENERIC_MAPPING, arg7:BOOL, arg8:LPDWORD, arg9:LPBOOL, arg10:LPBOOL) : BOOL;

external (stdcall) AccessCheckAndAuditAlarmW(arg0:LPCWSTR, arg1:LPVOID, arg2:LPWSTR, arg3:LPWSTR, arg4:PSECURITY_DESCRIPTOR, arg5:DWORD, arg6:PGENERIC_MAPPING, arg7:BOOL, arg8:LPDWORD, arg9:LPBOOL, arg10:LPBOOL) : BOOL;

external (stdcall) AccessCheckByTypeAndAuditAlarmA(arg0:LPCSTR, arg1:LPVOID, arg2:LPCSTR, arg3:LPCSTR, arg4:PSECURITY_DESCRIPTOR, arg5:PSID, arg6:DWORD, arg7:AUDIT_EVENT_TYPE, arg8:DWORD, arg9:POBJECT_TYPE_LIST, arg10:DWORD, arg11:PGENERIC_MAPPING, arg12:BOOL, arg13:LPDWORD, arg14:LPBOOL, arg15:LPBOOL) : BOOL;

external (stdcall) AccessCheckByTypeAndAuditAlarmW(arg0:LPCWSTR, arg1:LPVOID, arg2:LPCWSTR, arg3:LPCWSTR, arg4:PSECURITY_DESCRIPTOR, arg5:PSID, arg6:DWORD, arg7:AUDIT_EVENT_TYPE, arg8:DWORD, arg9:POBJECT_TYPE_LIST, arg10:DWORD, arg11:PGENERIC_MAPPING, arg12:BOOL, arg13:LPDWORD, arg14:LPBOOL, arg15:LPBOOL) : BOOL;

external (stdcall) AccessCheckByTypeResultListAndAuditAlarmA(arg0:LPCSTR, arg1:LPVOID, arg2:LPCSTR, arg3:LPCSTR, arg4:PSECURITY_DESCRIPTOR, arg5:PSID, arg6:DWORD, arg7:AUDIT_EVENT_TYPE, arg8:DWORD, arg9:POBJECT_TYPE_LIST, arg10:DWORD, arg11:PGENERIC_MAPPING, arg12:BOOL, arg13:LPDWORD, arg14:LPDWORD, arg15:LPBOOL) : BOOL;

external (stdcall) AccessCheckByTypeResultListAndAuditAlarmW(arg0:LPCWSTR, arg1:LPVOID, arg2:LPCWSTR, arg3:LPCWSTR, arg4:PSECURITY_DESCRIPTOR, arg5:PSID, arg6:DWORD, arg7:AUDIT_EVENT_TYPE, arg8:DWORD, arg9:POBJECT_TYPE_LIST, arg10:DWORD, arg11:PGENERIC_MAPPING, arg12:BOOL, arg13:LPDWORD, arg14:LPDWORD, arg15:LPBOOL) : BOOL;

external (stdcall) AccessCheckByTypeResultListAndAuditAlarmByHandleA(arg0:LPCSTR, arg1:LPVOID, arg2:HANDLE, arg3:LPCSTR, arg4:LPCSTR, arg5:PSECURITY_DESCRIPTOR, arg6:PSID, arg7:DWORD, arg8:AUDIT_EVENT_TYPE, arg9:DWORD, arg10:POBJECT_TYPE_LIST, arg11:DWORD, arg12:PGENERIC_MAPPING, arg13:BOOL, arg14:LPDWORD, arg15:LPDWORD, arg16:LPBOOL) : BOOL;

external (stdcall) AccessCheckByTypeResultListAndAuditAlarmByHandleW(arg0:LPCWSTR, arg1:LPVOID, arg2:HANDLE, arg3:LPCWSTR, arg4:LPCWSTR, arg5:PSECURITY_DESCRIPTOR, arg6:PSID, arg7:DWORD, arg8:AUDIT_EVENT_TYPE, arg9:DWORD, arg10:POBJECT_TYPE_LIST, arg11:DWORD, arg12:PGENERIC_MAPPING, arg13:BOOL, arg14:LPDWORD, arg15:LPDWORD, arg16:LPBOOL) : BOOL;

external (stdcall) ObjectOpenAuditAlarmA(arg0:LPCSTR, arg1:LPVOID, arg2:LPSTR, arg3:LPSTR, arg4:PSECURITY_DESCRIPTOR, arg5:HANDLE, arg6:DWORD, arg7:DWORD, arg8:PPRIVILEGE_SET, arg9:BOOL, arg10:BOOL, arg11:LPBOOL) : BOOL;

external (stdcall) ObjectOpenAuditAlarmW(arg0:LPCWSTR, arg1:LPVOID, arg2:LPWSTR, arg3:LPWSTR, arg4:PSECURITY_DESCRIPTOR, arg5:HANDLE, arg6:DWORD, arg7:DWORD, arg8:PPRIVILEGE_SET, arg9:BOOL, arg10:BOOL, arg11:LPBOOL) : BOOL;

external (stdcall) ObjectPrivilegeAuditAlarmA(arg0:LPCSTR, arg1:LPVOID, arg2:HANDLE, arg3:DWORD, arg4:PPRIVILEGE_SET, arg5:BOOL) : BOOL;

external (stdcall) ObjectPrivilegeAuditAlarmW(arg0:LPCWSTR, arg1:LPVOID, arg2:HANDLE, arg3:DWORD, arg4:PPRIVILEGE_SET, arg5:BOOL) : BOOL;

external (stdcall) ObjectCloseAuditAlarmA(arg0:LPCSTR, arg1:LPVOID, arg2:BOOL) : BOOL;

external (stdcall) ObjectCloseAuditAlarmW(arg0:LPCWSTR, arg1:LPVOID, arg2:BOOL) : BOOL;

external (stdcall) ObjectDeleteAuditAlarmA(arg0:LPCSTR, arg1:LPVOID, arg2:BOOL) : BOOL;

external (stdcall) ObjectDeleteAuditAlarmW(arg0:LPCWSTR, arg1:LPVOID, arg2:BOOL) : BOOL;

external (stdcall) PrivilegedServiceAuditAlarmA(arg0:LPCSTR, arg1:LPCSTR, arg2:HANDLE, arg3:PPRIVILEGE_SET, arg4:BOOL) : BOOL;

external (stdcall) PrivilegedServiceAuditAlarmW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:HANDLE, arg3:PPRIVILEGE_SET, arg4:BOOL) : BOOL;

external (stdcall) IsWellKnownSid(arg0:PSID, arg1:WELL_KNOWN_SID_TYPE) : BOOL;

external (stdcall) CreateWellKnownSid(arg0:WELL_KNOWN_SID_TYPE, arg1:PSID, arg2:PSID, arg3:Pointer[DWORD]) : BOOL;

external (stdcall) EqualDomainSid(arg0:PSID, arg1:PSID, arg2:Pointer[BOOL]) : BOOL;

external (stdcall) GetWindowsAccountDomainSid(arg0:PSID, arg1:PSID, arg2:Pointer[DWORD]) : BOOL;

external (stdcall) IsValidSid(arg0:PSID) : BOOL;

external (stdcall) EqualSid(arg0:PSID, arg1:PSID) : BOOL;

external (stdcall) EqualPrefixSid(arg0:PSID, arg1:PSID) : BOOL;

external (stdcall) GetSidLengthRequired(arg0:UCHAR) : DWORD;

external (stdcall) AllocateAndInitializeSid(arg0:PSID_IDENTIFIER_AUTHORITY, arg1:BYTE, arg2:DWORD, arg3:DWORD, arg4:DWORD, arg5:DWORD, arg6:DWORD, arg7:DWORD, arg8:DWORD, arg9:DWORD, arg10:Pointer[PSID]) : BOOL;

external (stdcall) FreeSid(arg0:PSID) : PVOID;

external (stdcall) InitializeSid(arg0:PSID, arg1:PSID_IDENTIFIER_AUTHORITY, arg2:BYTE) : BOOL;

external (stdcall) GetSidIdentifierAuthority(arg0:PSID) : PSID_IDENTIFIER_AUTHORITY;

external (stdcall) GetSidSubAuthority(arg0:PSID, arg1:DWORD) : PDWORD;

external (stdcall) GetSidSubAuthorityCount(arg0:PSID) : PUCHAR;

external (stdcall) GetLengthSid(arg0:PSID) : DWORD;

external (stdcall) CopySid(arg0:DWORD, arg1:PSID, arg2:PSID) : BOOL;

external (stdcall) AreAllAccessesGranted(arg0:DWORD, arg1:DWORD) : BOOL;

external (stdcall) AreAnyAccessesGranted(arg0:DWORD, arg1:DWORD) : BOOL;

external (stdcall) MapGenericMask(arg0:PDWORD, arg1:PGENERIC_MAPPING) : ;

external (stdcall) IsValidAcl(arg0:PACL) : BOOL;

external (stdcall) InitializeAcl(arg0:PACL, arg1:DWORD, arg2:DWORD) : BOOL;

external (stdcall) GetAclInformation(arg0:PACL, arg1:LPVOID, arg2:DWORD, arg3:ACL_INFORMATION_CLASS) : BOOL;

external (stdcall) SetAclInformation(arg0:PACL, arg1:LPVOID, arg2:DWORD, arg3:ACL_INFORMATION_CLASS) : BOOL;

external (stdcall) AddAce(arg0:PACL, arg1:DWORD, arg2:DWORD, arg3:LPVOID, arg4:DWORD) : BOOL;

external (stdcall) DeleteAce(arg0:PACL, arg1:DWORD) : BOOL;

external (stdcall) GetAce(arg0:PACL, arg1:DWORD, arg2:Pointer[LPVOID]) : BOOL;

external (stdcall) AddAccessAllowedAce(arg0:PACL, arg1:DWORD, arg2:DWORD, arg3:PSID) : BOOL;

external (stdcall) AddAccessAllowedAceEx(arg0:PACL, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:PSID) : BOOL;

external (stdcall) AddMandatoryAce(arg0:PACL, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:PSID) : BOOL;

external (stdcall) AddConditionalAce(arg0:PACL, arg1:DWORD, arg2:DWORD, arg3:UCHAR, arg4:DWORD, arg5:PSID, arg6:PWCHAR, arg7:Pointer[DWORD]) : BOOL;

external (stdcall) AddAccessDeniedAce(arg0:PACL, arg1:DWORD, arg2:DWORD, arg3:PSID) : BOOL;

external (stdcall) AddAccessDeniedAceEx(arg0:PACL, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:PSID) : BOOL;

external (stdcall) AddAuditAccessAce(arg0:PACL, arg1:DWORD, arg2:DWORD, arg3:PSID, arg4:BOOL, arg5:BOOL) : BOOL;

external (stdcall) AddAuditAccessAceEx(arg0:PACL, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:PSID, arg5:BOOL, arg6:BOOL) : BOOL;

external (stdcall) AddAccessAllowedObjectAce(arg0:PACL, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:Pointer[GUID], arg5:Pointer[GUID], arg6:PSID) : BOOL;

external (stdcall) AddAccessDeniedObjectAce(arg0:PACL, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:Pointer[GUID], arg5:Pointer[GUID], arg6:PSID) : BOOL;

external (stdcall) AddAuditAccessObjectAce(arg0:PACL, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:Pointer[GUID], arg5:Pointer[GUID], arg6:PSID, arg7:BOOL, arg8:BOOL) : BOOL;

external (stdcall) FindFirstFreeAce(arg0:PACL, arg1:Pointer[LPVOID]) : BOOL;

external (stdcall) InitializeSecurityDescriptor(arg0:PSECURITY_DESCRIPTOR, arg1:DWORD) : BOOL;

external (stdcall) IsValidSecurityDescriptor(arg0:PSECURITY_DESCRIPTOR) : BOOL;

external (stdcall) IsValidRelativeSecurityDescriptor(arg0:PSECURITY_DESCRIPTOR, arg1:ULONG, arg2:SECURITY_INFORMATION) : BOOL;

external (stdcall) GetSecurityDescriptorLength(arg0:PSECURITY_DESCRIPTOR) : DWORD;

external (stdcall) GetSecurityDescriptorControl(arg0:PSECURITY_DESCRIPTOR, arg1:PSECURITY_DESCRIPTOR_CONTROL, arg2:LPDWORD) : BOOL;

external (stdcall) SetSecurityDescriptorControl(arg0:PSECURITY_DESCRIPTOR, arg1:SECURITY_DESCRIPTOR_CONTROL, arg2:SECURITY_DESCRIPTOR_CONTROL) : BOOL;

external (stdcall) SetSecurityDescriptorDacl(arg0:PSECURITY_DESCRIPTOR, arg1:BOOL, arg2:PACL, arg3:BOOL) : BOOL;

external (stdcall) GetSecurityDescriptorDacl(arg0:PSECURITY_DESCRIPTOR, arg1:LPBOOL, arg2:Pointer[PACL], arg3:LPBOOL) : BOOL;

external (stdcall) SetSecurityDescriptorSacl(arg0:PSECURITY_DESCRIPTOR, arg1:BOOL, arg2:PACL, arg3:BOOL) : BOOL;

external (stdcall) GetSecurityDescriptorSacl(arg0:PSECURITY_DESCRIPTOR, arg1:LPBOOL, arg2:Pointer[PACL], arg3:LPBOOL) : BOOL;

external (stdcall) SetSecurityDescriptorOwner(arg0:PSECURITY_DESCRIPTOR, arg1:PSID, arg2:BOOL) : BOOL;

external (stdcall) GetSecurityDescriptorOwner(arg0:PSECURITY_DESCRIPTOR, arg1:Pointer[PSID], arg2:LPBOOL) : BOOL;

external (stdcall) SetSecurityDescriptorGroup(arg0:PSECURITY_DESCRIPTOR, arg1:PSID, arg2:BOOL) : BOOL;

external (stdcall) GetSecurityDescriptorGroup(arg0:PSECURITY_DESCRIPTOR, arg1:Pointer[PSID], arg2:LPBOOL) : BOOL;

external (stdcall) SetSecurityDescriptorRMControl(arg0:PSECURITY_DESCRIPTOR, arg1:PUCHAR) : DWORD;

external (stdcall) GetSecurityDescriptorRMControl(arg0:PSECURITY_DESCRIPTOR, arg1:PUCHAR) : DWORD;

external (stdcall) CreatePrivateObjectSecurity(arg0:PSECURITY_DESCRIPTOR, arg1:PSECURITY_DESCRIPTOR, arg2:Pointer[PSECURITY_DESCRIPTOR], arg3:BOOL, arg4:HANDLE, arg5:PGENERIC_MAPPING) : BOOL;

external (stdcall) ConvertToAutoInheritPrivateObjectSecurity(arg0:PSECURITY_DESCRIPTOR, arg1:PSECURITY_DESCRIPTOR, arg2:Pointer[PSECURITY_DESCRIPTOR], arg3:Pointer[GUID], arg4:BOOLEAN, arg5:PGENERIC_MAPPING) : BOOL;

external (stdcall) CreatePrivateObjectSecurityEx(arg0:PSECURITY_DESCRIPTOR, arg1:PSECURITY_DESCRIPTOR, arg2:Pointer[PSECURITY_DESCRIPTOR], arg3:Pointer[GUID], arg4:BOOL, arg5:ULONG, arg6:HANDLE, arg7:PGENERIC_MAPPING) : BOOL;

external (stdcall) CreatePrivateObjectSecurityWithMultipleInheritance(arg0:PSECURITY_DESCRIPTOR, arg1:PSECURITY_DESCRIPTOR, arg2:Pointer[PSECURITY_DESCRIPTOR], arg3:Pointer[Pointer[GUID]], arg4:ULONG, arg5:BOOL, arg6:ULONG, arg7:HANDLE, arg8:PGENERIC_MAPPING) : BOOL;

external (stdcall) SetPrivateObjectSecurity(arg0:SECURITY_INFORMATION, arg1:PSECURITY_DESCRIPTOR, arg2:Pointer[PSECURITY_DESCRIPTOR], arg3:PGENERIC_MAPPING, arg4:HANDLE) : BOOL;

external (stdcall) SetPrivateObjectSecurityEx(arg0:SECURITY_INFORMATION, arg1:PSECURITY_DESCRIPTOR, arg2:Pointer[PSECURITY_DESCRIPTOR], arg3:ULONG, arg4:PGENERIC_MAPPING, arg5:HANDLE) : BOOL;

external (stdcall) GetPrivateObjectSecurity(arg0:PSECURITY_DESCRIPTOR, arg1:SECURITY_INFORMATION, arg2:PSECURITY_DESCRIPTOR, arg3:DWORD, arg4:PDWORD) : BOOL;

external (stdcall) DestroyPrivateObjectSecurity(arg0:Pointer[PSECURITY_DESCRIPTOR]) : BOOL;

external (stdcall) MakeSelfRelativeSD(arg0:PSECURITY_DESCRIPTOR, arg1:PSECURITY_DESCRIPTOR, arg2:LPDWORD) : BOOL;

external (stdcall) MakeAbsoluteSD(arg0:PSECURITY_DESCRIPTOR, arg1:PSECURITY_DESCRIPTOR, arg2:LPDWORD, arg3:PACL, arg4:LPDWORD, arg5:PACL, arg6:LPDWORD, arg7:PSID, arg8:LPDWORD, arg9:PSID, arg10:LPDWORD) : BOOL;

external (stdcall) MakeAbsoluteSD2(arg0:PSECURITY_DESCRIPTOR, arg1:LPDWORD) : BOOL;

external (stdcall) QuerySecurityAccessMask(arg0:SECURITY_INFORMATION, arg1:LPDWORD) : ;

external (stdcall) SetSecurityAccessMask(arg0:SECURITY_INFORMATION, arg1:LPDWORD) : ;

external (stdcall) SetFileSecurityA(arg0:LPCSTR, arg1:SECURITY_INFORMATION, arg2:PSECURITY_DESCRIPTOR) : BOOL;

external (stdcall) SetFileSecurityW(arg0:LPCWSTR, arg1:SECURITY_INFORMATION, arg2:PSECURITY_DESCRIPTOR) : BOOL;

external (stdcall) GetFileSecurityA(arg0:LPCSTR, arg1:SECURITY_INFORMATION, arg2:PSECURITY_DESCRIPTOR, arg3:DWORD, arg4:LPDWORD) : BOOL;

external (stdcall) GetFileSecurityW(arg0:LPCWSTR, arg1:SECURITY_INFORMATION, arg2:PSECURITY_DESCRIPTOR, arg3:DWORD, arg4:LPDWORD) : BOOL;

external (stdcall) SetKernelObjectSecurity(arg0:HANDLE, arg1:SECURITY_INFORMATION, arg2:PSECURITY_DESCRIPTOR) : BOOL;

external (stdcall) FindFirstChangeNotificationA(arg0:LPCSTR, arg1:BOOL, arg2:DWORD) : HANDLE;

external (stdcall) FindFirstChangeNotificationW(arg0:LPCWSTR, arg1:BOOL, arg2:DWORD) : HANDLE;

external (stdcall) FindNextChangeNotification(arg0:HANDLE) : BOOL;

external (stdcall) FindCloseChangeNotification(arg0:HANDLE) : BOOL;

external (stdcall) ReadDirectoryChangesW(arg0:HANDLE, arg1:LPVOID, arg2:DWORD, arg3:BOOL, arg4:DWORD, arg5:LPDWORD, arg6:LPOVERLAPPED, arg7:LPOVERLAPPED_COMPLETION_ROUTINE) : BOOL;

external (stdcall) VirtualLock(arg0:LPVOID, arg1:SIZE_T) : BOOL;

external (stdcall) VirtualUnlock(arg0:LPVOID, arg1:SIZE_T) : BOOL;

external (stdcall) MapViewOfFileEx(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:SIZE_T, arg5:LPVOID) : LPVOID;

external (stdcall) MapViewOfFileExNuma(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:SIZE_T, arg5:LPVOID, arg6:DWORD) : LPVOID;

external (stdcall) SetPriorityClass(arg0:HANDLE, arg1:DWORD) : BOOL;

external (stdcall) GetPriorityClass(arg0:HANDLE) : DWORD;

external (stdcall) IsBadReadPtr(arg0:OpaquePointer, arg1:UINT_PTR) : BOOL;

external (stdcall) IsBadWritePtr(arg0:LPVOID, arg1:UINT_PTR) : BOOL;

external (stdcall) IsBadHugeReadPtr(arg0:OpaquePointer, arg1:UINT_PTR) : BOOL;

external (stdcall) IsBadHugeWritePtr(arg0:LPVOID, arg1:UINT_PTR) : BOOL;

external (stdcall) IsBadCodePtr(arg0:FARPROC) : BOOL;

external (stdcall) IsBadStringPtrA(arg0:LPCSTR, arg1:UINT_PTR) : BOOL;

external (stdcall) IsBadStringPtrW(arg0:LPCWSTR, arg1:UINT_PTR) : BOOL;

external (stdcall) LookupAccountSidA(arg0:LPCSTR, arg1:PSID, arg2:LPSTR, arg3:LPDWORD, arg4:LPSTR, arg5:LPDWORD, arg6:PSID_NAME_USE) : BOOL;

external (stdcall) LookupAccountSidW(arg0:LPCWSTR, arg1:PSID, arg2:LPWSTR, arg3:LPDWORD, arg4:LPWSTR, arg5:LPDWORD, arg6:PSID_NAME_USE) : BOOL;

external (stdcall) LookupAccountSidLocalA(arg0:PSID, arg1:LPSTR, arg2:LPDWORD, arg3:LPSTR, arg4:LPDWORD, arg5:PSID_NAME_USE) : BOOL;

external (stdcall) LookupAccountSidLocalW(arg0:PSID, arg1:LPWSTR, arg2:LPDWORD, arg3:LPWSTR, arg4:LPDWORD, arg5:PSID_NAME_USE) : BOOL;

external (stdcall) LookupAccountNameA(arg0:LPCSTR, arg1:LPCSTR, arg2:PSID, arg3:LPDWORD, arg4:LPSTR, arg5:LPDWORD, arg6:PSID_NAME_USE) : BOOL;

external (stdcall) LookupAccountNameW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:PSID, arg3:LPDWORD, arg4:LPWSTR, arg5:LPDWORD, arg6:PSID_NAME_USE) : BOOL;

external (stdcall) LookupAccountNameLocalA(arg0:LPCSTR, arg1:PSID, arg2:LPDWORD, arg3:LPSTR, arg4:LPDWORD, arg5:PSID_NAME_USE) : BOOL;

external (stdcall) LookupAccountNameLocalW(arg0:LPCWSTR, arg1:PSID, arg2:LPDWORD, arg3:LPWSTR, arg4:LPDWORD, arg5:PSID_NAME_USE) : BOOL;

external (stdcall) LookupPrivilegeValueA(arg0:LPCSTR, arg1:LPCSTR, arg2:PLUID) : BOOL;

external (stdcall) LookupPrivilegeValueW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:PLUID) : BOOL;

external (stdcall) LookupPrivilegeNameA(arg0:LPCSTR, arg1:PLUID, arg2:LPSTR, arg3:LPDWORD) : BOOL;

external (stdcall) LookupPrivilegeNameW(arg0:LPCWSTR, arg1:PLUID, arg2:LPWSTR, arg3:LPDWORD) : BOOL;

external (stdcall) LookupPrivilegeDisplayNameA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPSTR, arg3:LPDWORD, arg4:LPDWORD) : BOOL;

external (stdcall) LookupPrivilegeDisplayNameW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPWSTR, arg3:LPDWORD, arg4:LPDWORD) : BOOL;

external (stdcall) AllocateLocallyUniqueId(arg0:PLUID) : BOOL;

external (stdcall) BuildCommDCBA(arg0:LPCSTR, arg1:LPDCB) : BOOL;

external (stdcall) BuildCommDCBW(arg0:LPCWSTR, arg1:LPDCB) : BOOL;

external (stdcall) BuildCommDCBAndTimeoutsA(arg0:LPCSTR, arg1:LPDCB, arg2:LPCOMMTIMEOUTS) : BOOL;

external (stdcall) BuildCommDCBAndTimeoutsW(arg0:LPCWSTR, arg1:LPDCB, arg2:LPCOMMTIMEOUTS) : BOOL;

external (stdcall) CommConfigDialogA(arg0:LPCSTR, arg1:HWND, arg2:LPCOMMCONFIG) : BOOL;

external (stdcall) CommConfigDialogW(arg0:LPCWSTR, arg1:HWND, arg2:LPCOMMCONFIG) : BOOL;

external (stdcall) GetDefaultCommConfigA(arg0:LPCSTR, arg1:LPCOMMCONFIG, arg2:LPDWORD) : BOOL;

external (stdcall) GetDefaultCommConfigW(arg0:LPCWSTR, arg1:LPCOMMCONFIG, arg2:LPDWORD) : BOOL;

external (stdcall) SetDefaultCommConfigA(arg0:LPCSTR, arg1:LPCOMMCONFIG, arg2:DWORD) : BOOL;

external (stdcall) SetDefaultCommConfigW(arg0:LPCWSTR, arg1:LPCOMMCONFIG, arg2:DWORD) : BOOL;

external (stdcall) GetComputerNameA(arg0:LPSTR, arg1:LPDWORD) : BOOL;

external (stdcall) GetComputerNameW(arg0:LPWSTR, arg1:LPDWORD) : BOOL;

external (stdcall) SetComputerNameA(arg0:LPCSTR) : BOOL;

external (stdcall) SetComputerNameW(arg0:LPCWSTR) : BOOL;

alias Enum__COMPUTER_NAME_FORMAT = Int;
alias ComputerNameNetBIOS = 0;
alias ComputerNameDnsHostname = 1;
alias ComputerNameDnsDomain = 2;
alias ComputerNameDnsFullyQualified = 3;
alias ComputerNamePhysicalNetBIOS = 4;
alias ComputerNamePhysicalDnsHostname = 5;
alias ComputerNamePhysicalDnsDomain = 6;
alias ComputerNamePhysicalDnsFullyQualified = 7;
alias ComputerNameMax = 8;

alias COMPUTER_NAME_FORMAT = Enum__COMPUTER_NAME_FORMAT;

external (stdcall) GetComputerNameExA(arg0:COMPUTER_NAME_FORMAT, arg1:LPSTR, arg2:LPDWORD) : BOOL;

external (stdcall) GetComputerNameExW(arg0:COMPUTER_NAME_FORMAT, arg1:LPWSTR, arg2:LPDWORD) : BOOL;

external (stdcall) SetComputerNameExA(arg0:COMPUTER_NAME_FORMAT, arg1:LPCSTR) : BOOL;

external (stdcall) SetComputerNameExW(arg0:COMPUTER_NAME_FORMAT, arg1:LPCWSTR) : BOOL;

external (stdcall) DnsHostnameToComputerNameA(arg0:LPCSTR, arg1:LPSTR, arg2:LPDWORD) : BOOL;

external (stdcall) DnsHostnameToComputerNameW(arg0:LPCWSTR, arg1:LPWSTR, arg2:LPDWORD) : BOOL;

external (stdcall) GetUserNameA(arg0:LPSTR, arg1:LPDWORD) : BOOL;

external (stdcall) GetUserNameW(arg0:LPWSTR, arg1:LPDWORD) : BOOL;

external (stdcall) LogonUserA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPCSTR, arg3:DWORD, arg4:DWORD, arg5:PHANDLE) : BOOL;

external (stdcall) LogonUserW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPCWSTR, arg3:DWORD, arg4:DWORD, arg5:PHANDLE) : BOOL;

external (stdcall) LogonUserExA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPCSTR, arg3:DWORD, arg4:DWORD, arg5:PHANDLE, arg6:Pointer[PSID], arg7:Pointer[PVOID], arg8:LPDWORD, arg9:PQUOTA_LIMITS) : BOOL;

external (stdcall) LogonUserExW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPCWSTR, arg3:DWORD, arg4:DWORD, arg5:PHANDLE, arg6:Pointer[PSID], arg7:Pointer[PVOID], arg8:LPDWORD, arg9:PQUOTA_LIMITS) : BOOL;

external (stdcall) ImpersonateLoggedOnUser(arg0:HANDLE) : BOOL;

external (stdcall) CreateProcessAsUserA(arg0:HANDLE, arg1:LPCSTR, arg2:LPSTR, arg3:LPSECURITY_ATTRIBUTES, arg4:LPSECURITY_ATTRIBUTES, arg5:BOOL, arg6:DWORD, arg7:LPVOID, arg8:LPCSTR, arg9:LPSTARTUPINFOA, arg10:LPPROCESS_INFORMATION) : BOOL;

external (stdcall) CreateProcessAsUserW(arg0:HANDLE, arg1:LPCWSTR, arg2:LPWSTR, arg3:LPSECURITY_ATTRIBUTES, arg4:LPSECURITY_ATTRIBUTES, arg5:BOOL, arg6:DWORD, arg7:LPVOID, arg8:LPCWSTR, arg9:LPSTARTUPINFOW, arg10:LPPROCESS_INFORMATION) : BOOL;

external (stdcall) CreateProcessWithLogonW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPCWSTR, arg3:DWORD, arg4:LPCWSTR, arg5:LPWSTR, arg6:DWORD, arg7:LPVOID, arg8:LPCWSTR, arg9:LPSTARTUPINFOW, arg10:LPPROCESS_INFORMATION) : BOOL;

external (stdcall) CreateProcessWithTokenW(arg0:HANDLE, arg1:DWORD, arg2:LPCWSTR, arg3:LPWSTR, arg4:DWORD, arg5:LPVOID, arg6:LPCWSTR, arg7:LPSTARTUPINFOW, arg8:LPPROCESS_INFORMATION) : BOOL;

external (stdcall) ImpersonateAnonymousToken(arg0:HANDLE) : BOOL;

external (stdcall) DuplicateTokenEx(arg0:HANDLE, arg1:DWORD, arg2:LPSECURITY_ATTRIBUTES, arg3:SECURITY_IMPERSONATION_LEVEL, arg4:TOKEN_TYPE, arg5:PHANDLE) : BOOL;

external (stdcall) CreateRestrictedToken(arg0:HANDLE, arg1:DWORD, arg2:DWORD, arg3:PSID_AND_ATTRIBUTES, arg4:DWORD, arg5:PLUID_AND_ATTRIBUTES, arg6:DWORD, arg7:PSID_AND_ATTRIBUTES, arg8:PHANDLE) : BOOL;

external (stdcall) IsTokenRestricted(arg0:HANDLE) : BOOL;

external (stdcall) IsTokenUntrusted(arg0:HANDLE) : BOOL;

external (stdcall) CheckTokenMembership(arg0:HANDLE, arg1:PSID, arg2:PBOOL) : BOOL;

alias WAITORTIMERCALLBACK = WAITORTIMERCALLBACKFUNC;

external (stdcall) RegisterWaitForSingleObject(arg0:PHANDLE, arg1:HANDLE, arg2:WAITORTIMERCALLBACK, arg3:PVOID, arg4:ULONG, arg5:ULONG) : BOOL;

external (stdcall) RegisterWaitForSingleObjectEx(arg0:HANDLE, arg1:WAITORTIMERCALLBACK, arg2:PVOID, arg3:ULONG, arg4:ULONG) : HANDLE;

external (stdcall) UnregisterWait(arg0:HANDLE) : BOOL;

external (stdcall) UnregisterWaitEx(arg0:HANDLE, arg1:HANDLE) : BOOL;

external (stdcall) QueueUserWorkItem(arg0:LPTHREAD_START_ROUTINE, arg1:PVOID, arg2:ULONG) : BOOL;

external (stdcall) BindIoCompletionCallback(arg0:HANDLE, arg1:LPOVERLAPPED_COMPLETION_ROUTINE, arg2:ULONG) : BOOL;

external (stdcall) CreateTimerQueue() : HANDLE;

external (stdcall) CreateTimerQueueTimer(arg0:PHANDLE, arg1:HANDLE, arg2:WAITORTIMERCALLBACK, arg3:PVOID, arg4:DWORD, arg5:DWORD, arg6:ULONG) : BOOL;

external (stdcall) ChangeTimerQueueTimer(arg0:HANDLE, arg1:HANDLE, arg2:ULONG, arg3:ULONG) : BOOL;

external (stdcall) DeleteTimerQueueTimer(arg0:HANDLE, arg1:HANDLE, arg2:HANDLE) : BOOL;

external (stdcall) DeleteTimerQueueEx(arg0:HANDLE, arg1:HANDLE) : BOOL;

external (stdcall) SetTimerQueueTimer(arg0:HANDLE, arg1:WAITORTIMERCALLBACK, arg2:PVOID, arg3:DWORD, arg4:DWORD, arg5:BOOL) : HANDLE;

external (stdcall) CancelTimerQueueTimer(arg0:HANDLE, arg1:HANDLE) : BOOL;

external (stdcall) DeleteTimerQueue(arg0:HANDLE) : BOOL;

alias PTP_WIN32_IO_CALLBACK = StdCallCodePointer[[PTP_CALLBACK_INSTANCE, PVOID, PVOID, ULONG, ULONG_PTR, PTP_IO],[]];

external (stdcall) CreateThreadpool(arg0:PVOID) : PTP_POOL;

external (stdcall) SetThreadpoolThreadMaximum(arg0:PTP_POOL, arg1:DWORD) : ;

external (stdcall) SetThreadpoolThreadMinimum(arg0:PTP_POOL, arg1:DWORD) : BOOL;

external (stdcall) SetThreadpoolStackInformation(arg0:PTP_POOL, arg1:PTP_POOL_STACK_INFORMATION) : BOOL;

external (stdcall) QueryThreadpoolStackInformation(arg0:PTP_POOL, arg1:PTP_POOL_STACK_INFORMATION) : BOOL;

external (stdcall) CloseThreadpool(arg0:PTP_POOL) : ;

external (stdcall) CreateThreadpoolCleanupGroup() : PTP_CLEANUP_GROUP;

external (stdcall) CloseThreadpoolCleanupGroupMembers(arg0:PTP_CLEANUP_GROUP, arg1:BOOL, arg2:PVOID) : ;

external (stdcall) CloseThreadpoolCleanupGroup(arg0:PTP_CLEANUP_GROUP) : ;

external (cdecl) InitializeThreadpoolEnvironment(arg0:PTP_CALLBACK_ENVIRON) : ;

external (cdecl) SetThreadpoolCallbackPool(arg0:PTP_CALLBACK_ENVIRON, arg1:PTP_POOL) : ;

external (cdecl) SetThreadpoolCallbackCleanupGroup(arg0:PTP_CALLBACK_ENVIRON, arg1:PTP_CLEANUP_GROUP, arg2:PTP_CLEANUP_GROUP_CANCEL_CALLBACK) : ;

external (cdecl) SetThreadpoolCallbackRunsLong(arg0:PTP_CALLBACK_ENVIRON) : ;

external (cdecl) SetThreadpoolCallbackLibrary(arg0:PTP_CALLBACK_ENVIRON, arg1:PVOID) : ;

external (cdecl) SetThreadpoolCallbackPriority(arg0:PTP_CALLBACK_ENVIRON, arg1:TP_CALLBACK_PRIORITY) : ;

external (cdecl) SetThreadpoolCallbackPersistent(arg0:PTP_CALLBACK_ENVIRON) : ;

external (cdecl) DestroyThreadpoolEnvironment(arg0:PTP_CALLBACK_ENVIRON) : ;

external (stdcall) SetEventWhenCallbackReturns(arg0:PTP_CALLBACK_INSTANCE, arg1:HANDLE) : ;

external (stdcall) ReleaseSemaphoreWhenCallbackReturns(arg0:PTP_CALLBACK_INSTANCE, arg1:HANDLE, arg2:DWORD) : ;

external (stdcall) ReleaseMutexWhenCallbackReturns(arg0:PTP_CALLBACK_INSTANCE, arg1:HANDLE) : ;

external (stdcall) LeaveCriticalSectionWhenCallbackReturns(arg0:PTP_CALLBACK_INSTANCE, arg1:PCRITICAL_SECTION) : ;

external (stdcall) FreeLibraryWhenCallbackReturns(arg0:PTP_CALLBACK_INSTANCE, arg1:HMODULE) : ;

external (stdcall) CallbackMayRunLong(arg0:PTP_CALLBACK_INSTANCE) : BOOL;

external (stdcall) DisassociateCurrentThreadFromCallback(arg0:PTP_CALLBACK_INSTANCE) : ;

external (stdcall) TrySubmitThreadpoolCallback(arg0:PTP_SIMPLE_CALLBACK, arg1:PVOID, arg2:PTP_CALLBACK_ENVIRON) : BOOL;

external (stdcall) CreateThreadpoolWork(arg0:PTP_WORK_CALLBACK, arg1:PVOID, arg2:PTP_CALLBACK_ENVIRON) : PTP_WORK;

external (stdcall) SubmitThreadpoolWork(arg0:PTP_WORK) : ;

external (stdcall) WaitForThreadpoolWorkCallbacks(arg0:PTP_WORK, arg1:BOOL) : ;

external (stdcall) CloseThreadpoolWork(arg0:PTP_WORK) : ;

external (stdcall) CreateThreadpoolTimer(arg0:PTP_TIMER_CALLBACK, arg1:PVOID, arg2:PTP_CALLBACK_ENVIRON) : PTP_TIMER;

external (stdcall) SetThreadpoolTimer(arg0:PTP_TIMER, arg1:PFILETIME, arg2:DWORD, arg3:DWORD) : ;

external (stdcall) IsThreadpoolTimerSet(arg0:PTP_TIMER) : BOOL;

external (stdcall) WaitForThreadpoolTimerCallbacks(arg0:PTP_TIMER, arg1:BOOL) : ;

external (stdcall) CloseThreadpoolTimer(arg0:PTP_TIMER) : ;

external (stdcall) CreateThreadpoolWait(arg0:PTP_WAIT_CALLBACK, arg1:PVOID, arg2:PTP_CALLBACK_ENVIRON) : PTP_WAIT;

external (stdcall) SetThreadpoolWait(arg0:PTP_WAIT, arg1:HANDLE, arg2:PFILETIME) : ;

external (stdcall) WaitForThreadpoolWaitCallbacks(arg0:PTP_WAIT, arg1:BOOL) : ;

external (stdcall) CloseThreadpoolWait(arg0:PTP_WAIT) : ;

external (stdcall) CreateThreadpoolIo(arg0:HANDLE, arg1:PTP_WIN32_IO_CALLBACK, arg2:PVOID, arg3:PTP_CALLBACK_ENVIRON) : PTP_IO;

external (stdcall) StartThreadpoolIo(arg0:PTP_IO) : ;

external (stdcall) CancelThreadpoolIo(arg0:PTP_IO) : ;

external (stdcall) WaitForThreadpoolIoCallbacks(arg0:PTP_IO, arg1:BOOL) : ;

external (stdcall) CloseThreadpoolIo(arg0:PTP_IO) : ;

external (stdcall) CreatePrivateNamespaceA(arg0:LPSECURITY_ATTRIBUTES, arg1:LPVOID, arg2:LPCSTR) : HANDLE;

external (stdcall) CreatePrivateNamespaceW(arg0:LPSECURITY_ATTRIBUTES, arg1:LPVOID, arg2:LPCWSTR) : HANDLE;

external (stdcall) OpenPrivateNamespaceA(arg0:LPVOID, arg1:LPCSTR) : HANDLE;

external (stdcall) OpenPrivateNamespaceW(arg0:LPVOID, arg1:LPCWSTR) : HANDLE;

external (stdcall) ClosePrivateNamespace(arg0:HANDLE, arg1:ULONG) : BOOLEAN;

external (stdcall) CreateBoundaryDescriptorA(arg0:LPCSTR, arg1:ULONG) : HANDLE;

external (stdcall) CreateBoundaryDescriptorW(arg0:LPCWSTR, arg1:ULONG) : HANDLE;

external (stdcall) AddSIDToBoundaryDescriptor(arg0:Pointer[HANDLE], arg1:PSID) : BOOL;

external (stdcall) AddIntegrityLabelToBoundaryDescriptor(arg0:Pointer[HANDLE], arg1:PSID) : BOOL;

external (stdcall) DeleteBoundaryDescriptor(arg0:HANDLE) : ;

record Struct_tagHW_PROFILE_INFOA (
    dwDockInfo : DWORD,
    szHwProfileGuid : Array[CHAR, 39],
    szHwProfileName : Array[CHAR, 80],
);

alias HW_PROFILE_INFOA = Struct_tagHW_PROFILE_INFOA;

alias LPHW_PROFILE_INFOA = Pointer[Struct_tagHW_PROFILE_INFOA];

record Struct_tagHW_PROFILE_INFOW (
    dwDockInfo : DWORD,
    szHwProfileGuid : Array[WCHAR, 39],
    szHwProfileName : Array[WCHAR, 80],
);

alias HW_PROFILE_INFOW = Struct_tagHW_PROFILE_INFOW;

alias LPHW_PROFILE_INFOW = Pointer[Struct_tagHW_PROFILE_INFOW];

alias HW_PROFILE_INFO = HW_PROFILE_INFOA;

alias LPHW_PROFILE_INFO = LPHW_PROFILE_INFOA;

external (stdcall) GetCurrentHwProfileA(arg0:LPHW_PROFILE_INFOA) : BOOL;

external (stdcall) GetCurrentHwProfileW(arg0:LPHW_PROFILE_INFOW) : BOOL;

external (stdcall) QueryPerformanceCounter(arg0:Pointer[LARGE_INTEGER]) : BOOL;

external (stdcall) QueryPerformanceFrequency(arg0:Pointer[LARGE_INTEGER]) : BOOL;

external (stdcall) GetVersionExA(arg0:LPOSVERSIONINFOA) : BOOL;

external (stdcall) GetVersionExW(arg0:LPOSVERSIONINFOW) : BOOL;

external (stdcall) VerifyVersionInfoA(arg0:LPOSVERSIONINFOEXA, arg1:DWORD, arg2:DWORDLONG) : BOOL;

external (stdcall) VerifyVersionInfoW(arg0:LPOSVERSIONINFOEXW, arg1:DWORD, arg2:DWORDLONG) : BOOL;

external (stdcall) GetProductInfo(arg0:DWORD, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:PDWORD) : BOOL;

external (cdecl) HRESULT_FROM_WIN32(arg0:CULong) : HRESULT;

record Struct__SYSTEM_POWER_STATUS (
    ACLineStatus : BYTE,
    BatteryFlag : BYTE,
    BatteryLifePercent : BYTE,
    Reserved1 : BYTE,
    BatteryLifeTime : DWORD,
    BatteryFullLifeTime : DWORD,
);

alias SYSTEM_POWER_STATUS = Struct__SYSTEM_POWER_STATUS;

alias LPSYSTEM_POWER_STATUS = Pointer[Struct__SYSTEM_POWER_STATUS];

external (stdcall) GetSystemPowerStatus(arg0:LPSYSTEM_POWER_STATUS) : BOOL;

external (stdcall) SetSystemPowerState(arg0:BOOL, arg1:BOOL) : BOOL;

external (stdcall) AllocateUserPhysicalPages(arg0:HANDLE, arg1:PULONG_PTR, arg2:PULONG_PTR) : BOOL;

external (stdcall) AllocateUserPhysicalPagesNuma(arg0:HANDLE, arg1:PULONG_PTR, arg2:PULONG_PTR, arg3:DWORD) : BOOL;

external (stdcall) FreeUserPhysicalPages(arg0:HANDLE, arg1:PULONG_PTR, arg2:PULONG_PTR) : BOOL;

external (stdcall) MapUserPhysicalPages(arg0:PVOID, arg1:ULONG_PTR, arg2:PULONG_PTR) : BOOL;

external (stdcall) MapUserPhysicalPagesScatter(arg0:Pointer[PVOID], arg1:ULONG_PTR, arg2:PULONG_PTR) : BOOL;

external (stdcall) CreateJobObjectA(arg0:LPSECURITY_ATTRIBUTES, arg1:LPCSTR) : HANDLE;

external (stdcall) CreateJobObjectW(arg0:LPSECURITY_ATTRIBUTES, arg1:LPCWSTR) : HANDLE;

external (stdcall) OpenJobObjectA(arg0:DWORD, arg1:BOOL, arg2:LPCSTR) : HANDLE;

external (stdcall) OpenJobObjectW(arg0:DWORD, arg1:BOOL, arg2:LPCWSTR) : HANDLE;

external (stdcall) AssignProcessToJobObject(arg0:HANDLE, arg1:HANDLE) : BOOL;

external (stdcall) TerminateJobObject(arg0:HANDLE, arg1:UINT) : BOOL;

external (stdcall) QueryInformationJobObject(arg0:HANDLE, arg1:JOBOBJECTINFOCLASS, arg2:LPVOID, arg3:DWORD, arg4:LPDWORD) : BOOL;

external (stdcall) SetInformationJobObject(arg0:HANDLE, arg1:JOBOBJECTINFOCLASS, arg2:LPVOID, arg3:DWORD) : BOOL;

external (stdcall) IsProcessInJob(arg0:HANDLE, arg1:HANDLE, arg2:PBOOL) : BOOL;

external (stdcall) CreateJobSet(arg0:ULONG, arg1:PJOB_SET_ARRAY, arg2:ULONG) : BOOL;

external (stdcall) AddVectoredExceptionHandler(arg0:ULONG, arg1:PVECTORED_EXCEPTION_HANDLER) : PVOID;

external (stdcall) RemoveVectoredExceptionHandler(arg0:PVOID) : ULONG;

external (stdcall) AddVectoredContinueHandler(arg0:ULONG, arg1:PVECTORED_EXCEPTION_HANDLER) : PVOID;

external (stdcall) RemoveVectoredContinueHandler(arg0:PVOID) : ULONG;

external (stdcall) FindFirstVolumeA(arg0:LPSTR, arg1:DWORD) : HANDLE;

external (stdcall) FindFirstVolumeW(arg0:LPWSTR, arg1:DWORD) : HANDLE;

external (stdcall) FindNextVolumeA(arg0:HANDLE, arg1:LPSTR, arg2:DWORD) : BOOL;

external (stdcall) FindNextVolumeW(arg0:HANDLE, arg1:LPWSTR, arg2:DWORD) : BOOL;

external (stdcall) FindVolumeClose(arg0:HANDLE) : BOOL;

external (stdcall) FindFirstVolumeMountPointA(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD) : HANDLE;

external (stdcall) FindFirstVolumeMountPointW(arg0:LPCWSTR, arg1:LPWSTR, arg2:DWORD) : HANDLE;

external (stdcall) FindNextVolumeMountPointA(arg0:HANDLE, arg1:LPSTR, arg2:DWORD) : BOOL;

external (stdcall) FindNextVolumeMountPointW(arg0:HANDLE, arg1:LPWSTR, arg2:DWORD) : BOOL;

external (stdcall) FindVolumeMountPointClose(arg0:HANDLE) : BOOL;

external (stdcall) SetVolumeMountPointA(arg0:LPCSTR, arg1:LPCSTR) : BOOL;

external (stdcall) SetVolumeMountPointW(arg0:LPCWSTR, arg1:LPCWSTR) : BOOL;

external (stdcall) DeleteVolumeMountPointA(arg0:LPCSTR) : BOOL;

external (stdcall) DeleteVolumeMountPointW(arg0:LPCWSTR) : BOOL;

external (stdcall) GetVolumeNameForVolumeMountPointA(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD) : BOOL;

external (stdcall) GetVolumeNameForVolumeMountPointW(arg0:LPCWSTR, arg1:LPWSTR, arg2:DWORD) : BOOL;

external (stdcall) GetVolumePathNameA(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD) : BOOL;

external (stdcall) GetVolumePathNameW(arg0:LPCWSTR, arg1:LPWSTR, arg2:DWORD) : BOOL;

external (stdcall) GetVolumePathNamesForVolumeNameA(arg0:LPCSTR, arg1:LPCH, arg2:DWORD, arg3:PDWORD) : BOOL;

external (stdcall) GetVolumePathNamesForVolumeNameW(arg0:LPCWSTR, arg1:LPWCH, arg2:DWORD, arg3:PDWORD) : BOOL;

record Struct_tagACTCTXA (
    cbSize : ULONG,
    dwFlags : DWORD,
    lpSource : LPCSTR,
    wProcessorArchitecture : USHORT,
    wLangId : LANGID,
    lpAssemblyDirectory : LPCSTR,
    lpResourceName : LPCSTR,
    lpApplicationName : LPCSTR,
    hModule : HMODULE,
);

alias ACTCTXA = Struct_tagACTCTXA;

alias PACTCTXA = Pointer[Struct_tagACTCTXA];

record Struct_tagACTCTXW (
    cbSize : ULONG,
    dwFlags : DWORD,
    lpSource : LPCWSTR,
    wProcessorArchitecture : USHORT,
    wLangId : LANGID,
    lpAssemblyDirectory : LPCWSTR,
    lpResourceName : LPCWSTR,
    lpApplicationName : LPCWSTR,
    hModule : HMODULE,
);

alias ACTCTXW = Struct_tagACTCTXW;

alias PACTCTXW = Pointer[Struct_tagACTCTXW];

alias ACTCTX = ACTCTXA;

alias PACTCTX = PACTCTXA;

alias PCACTCTXA = Pointer[ACTCTXA];

alias PCACTCTXW = Pointer[ACTCTXW];

alias PCACTCTX = PCACTCTXA;

external (stdcall) CreateActCtxA(arg0:PCACTCTXA) : HANDLE;

external (stdcall) CreateActCtxW(arg0:PCACTCTXW) : HANDLE;

external (stdcall) AddRefActCtx(arg0:HANDLE) : ;

external (stdcall) ReleaseActCtx(arg0:HANDLE) : ;

external (stdcall) ZombifyActCtx(arg0:HANDLE) : BOOL;

external (stdcall) ActivateActCtx(arg0:HANDLE, arg1:Pointer[ULONG_PTR]) : BOOL;

external (stdcall) DeactivateActCtx(arg0:DWORD, arg1:ULONG_PTR) : BOOL;

external (stdcall) GetCurrentActCtx(arg0:Pointer[HANDLE]) : BOOL;

record Struct_tagACTCTX_SECTION_KEYED_DATA_2600 (
    cbSize : ULONG,
    ulDataFormatVersion : ULONG,
    lpData : PVOID,
    ulLength : ULONG,
    lpSectionGlobalData : PVOID,
    ulSectionGlobalDataLength : ULONG,
    lpSectionBase : PVOID,
    ulSectionTotalLength : ULONG,
    hActCtx : HANDLE,
    ulAssemblyRosterIndex : ULONG,
);

alias ACTCTX_SECTION_KEYED_DATA_2600 = Struct_tagACTCTX_SECTION_KEYED_DATA_2600;

alias PACTCTX_SECTION_KEYED_DATA_2600 = Pointer[Struct_tagACTCTX_SECTION_KEYED_DATA_2600];

alias PCACTCTX_SECTION_KEYED_DATA_2600 = Pointer[ACTCTX_SECTION_KEYED_DATA_2600];

record Struct_tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA (
    lpInformation : PVOID,
    lpSectionBase : PVOID,
    ulSectionLength : ULONG,
    lpSectionGlobalDataBase : PVOID,
    ulSectionGlobalDataLength : ULONG,
);

alias ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = Struct_tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;

alias PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = Pointer[Struct_tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA];

alias PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = Pointer[ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA];

record Struct_tagACTCTX_SECTION_KEYED_DATA (
    cbSize : ULONG,
    ulDataFormatVersion : ULONG,
    lpData : PVOID,
    ulLength : ULONG,
    lpSectionGlobalData : PVOID,
    ulSectionGlobalDataLength : ULONG,
    lpSectionBase : PVOID,
    ulSectionTotalLength : ULONG,
    hActCtx : HANDLE,
    ulAssemblyRosterIndex : ULONG,
    ulFlags : ULONG,
    AssemblyMetadata : ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA,
);

alias ACTCTX_SECTION_KEYED_DATA = Struct_tagACTCTX_SECTION_KEYED_DATA;

alias PACTCTX_SECTION_KEYED_DATA = Pointer[Struct_tagACTCTX_SECTION_KEYED_DATA];

alias PCACTCTX_SECTION_KEYED_DATA = Pointer[ACTCTX_SECTION_KEYED_DATA];

external (stdcall) FindActCtxSectionStringA(arg0:DWORD, arg1:Pointer[GUID], arg2:ULONG, arg3:LPCSTR, arg4:PACTCTX_SECTION_KEYED_DATA) : BOOL;

external (stdcall) FindActCtxSectionStringW(arg0:DWORD, arg1:Pointer[GUID], arg2:ULONG, arg3:LPCWSTR, arg4:PACTCTX_SECTION_KEYED_DATA) : BOOL;

external (stdcall) FindActCtxSectionGuid(arg0:DWORD, arg1:Pointer[GUID], arg2:ULONG, arg3:Pointer[GUID], arg4:PACTCTX_SECTION_KEYED_DATA) : BOOL;

record Struct__ACTIVATION_CONTEXT_BASIC_INFORMATION (
    hActCtx : HANDLE,
    dwFlags : DWORD,
);

alias ACTIVATION_CONTEXT_BASIC_INFORMATION = Struct__ACTIVATION_CONTEXT_BASIC_INFORMATION;

alias PACTIVATION_CONTEXT_BASIC_INFORMATION = Pointer[Struct__ACTIVATION_CONTEXT_BASIC_INFORMATION];

alias PCACTIVATION_CONTEXT_BASIC_INFORMATION = Pointer[Struct__ACTIVATION_CONTEXT_BASIC_INFORMATION];

external (stdcall) QueryActCtxW(arg0:DWORD, arg1:HANDLE, arg2:PVOID, arg3:ULONG, arg4:PVOID, arg5:SIZE_T, arg6:Pointer[SIZE_T]) : BOOL;

alias PQUERYACTCTXW_FUNC = StdCallCodePointer[[DWORD, HANDLE, PVOID, ULONG, PVOID, SIZE_T, Pointer[SIZE_T]],[BOOL]];

external (stdcall) ProcessIdToSessionId(arg0:DWORD, arg1:Pointer[DWORD]) : BOOL;

external (stdcall) WTSGetActiveConsoleSessionId() : DWORD;

external (stdcall) IsWow64Process(arg0:HANDLE, arg1:PBOOL) : BOOL;

external (stdcall) GetLogicalProcessorInformation(arg0:PSYSTEM_LOGICAL_PROCESSOR_INFORMATION, arg1:PDWORD) : BOOL;

external (stdcall) GetLogicalProcessorInformationEx(arg0:LOGICAL_PROCESSOR_RELATIONSHIP, arg1:PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX, arg2:PDWORD) : BOOL;

external (stdcall) GetActiveProcessorGroupCount() : WORD;

external (stdcall) GetMaximumProcessorGroupCount() : WORD;

external (stdcall) GetActiveProcessorCount(arg0:WORD) : DWORD;

external (stdcall) GetMaximumProcessorCount(arg0:WORD) : DWORD;

external (stdcall) GetNumaHighestNodeNumber(arg0:PULONG) : BOOL;

external (stdcall) GetNumaProcessorNode(arg0:UCHAR, arg1:PUCHAR) : BOOL;

external (stdcall) GetNumaNodeNumberFromHandle(arg0:HANDLE, arg1:PUSHORT) : BOOL;

external (stdcall) GetNumaProcessorNodeEx(arg0:PPROCESSOR_NUMBER, arg1:PUSHORT) : BOOL;

external (stdcall) GetNumaNodeProcessorMask(arg0:UCHAR, arg1:PULONGLONG) : BOOL;

external (stdcall) GetNumaNodeProcessorMaskEx(arg0:USHORT, arg1:PGROUP_AFFINITY) : BOOL;

external (stdcall) GetNumaAvailableMemoryNode(arg0:UCHAR, arg1:PULONGLONG) : BOOL;

external (stdcall) GetNumaAvailableMemoryNodeEx(arg0:USHORT, arg1:PULONGLONG) : BOOL;

external (stdcall) GetNumaProximityNode(arg0:ULONG, arg1:PUCHAR) : BOOL;

external (stdcall) GetNumaProximityNodeEx(arg0:ULONG, arg1:PUSHORT) : BOOL;

alias APPLICATION_RECOVERY_CALLBACK = StdCallCodePointer[[PVOID],[DWORD]];

external (stdcall) RegisterApplicationRecoveryCallback(arg0:APPLICATION_RECOVERY_CALLBACK, arg1:PVOID, arg2:DWORD, arg3:DWORD) : HRESULT;

external (stdcall) UnregisterApplicationRecoveryCallback() : HRESULT;

external (stdcall) RegisterApplicationRestart(arg0:PCWSTR, arg1:DWORD) : HRESULT;

external (stdcall) UnregisterApplicationRestart() : HRESULT;

external (stdcall) GetApplicationRecoveryCallback(arg0:HANDLE, arg1:Pointer[APPLICATION_RECOVERY_CALLBACK], arg2:Pointer[PVOID], arg3:PDWORD, arg4:PDWORD) : HRESULT;

external (stdcall) GetApplicationRestartSettings(arg0:HANDLE, arg1:PWSTR, arg2:PDWORD, arg3:PDWORD) : HRESULT;

external (stdcall) ApplicationRecoveryInProgress(arg0:PBOOL) : HRESULT;

external (stdcall) ApplicationRecoveryFinished(arg0:BOOL) : ;

alias Enum__FILE_INFO_BY_HANDLE_CLASS = Int;
alias FileBasicInfo = 0;
alias FileStandardInfo = 1;
alias FileNameInfo = 2;
alias FileRenameInfo = 3;
alias FileDispositionInfo = 4;
alias FileAllocationInfo = 5;
alias FileEndOfFileInfo = 6;
alias FileStreamInfo = 7;
alias FileCompressionInfo = 8;
alias FileAttributeTagInfo = 9;
alias FileIdBothDirectoryInfo = 10;
alias FileIdBothDirectoryRestartInfo = 11;
alias FileIoPriorityHintInfo = 12;
alias FileRemoteProtocolInfo = 13;
alias MaximumFileInfoByHandleClass = 14;

alias FILE_INFO_BY_HANDLE_CLASS = Enum__FILE_INFO_BY_HANDLE_CLASS;

alias PFILE_INFO_BY_HANDLE_CLASS = Pointer[Enum__FILE_INFO_BY_HANDLE_CLASS];

record Struct__FILE_BASIC_INFO (
    CreationTime : LARGE_INTEGER,
    LastAccessTime : LARGE_INTEGER,
    LastWriteTime : LARGE_INTEGER,
    ChangeTime : LARGE_INTEGER,
    FileAttributes : DWORD,
);

alias FILE_BASIC_INFO = Struct__FILE_BASIC_INFO;

alias PFILE_BASIC_INFO = Pointer[Struct__FILE_BASIC_INFO];

record Struct__FILE_STANDARD_INFO (
    AllocationSize : LARGE_INTEGER,
    EndOfFile : LARGE_INTEGER,
    NumberOfLinks : DWORD,
    DeletePending : BOOLEAN,
    Directory : BOOLEAN,
);

alias FILE_STANDARD_INFO = Struct__FILE_STANDARD_INFO;

alias PFILE_STANDARD_INFO = Pointer[Struct__FILE_STANDARD_INFO];

record Struct__FILE_NAME_INFO (
    FileNameLength : DWORD,
    FileName : Array[WCHAR, 1],
);

alias FILE_NAME_INFO = Struct__FILE_NAME_INFO;

alias PFILE_NAME_INFO = Pointer[Struct__FILE_NAME_INFO];

record Struct__FILE_RENAME_INFO (
    ReplaceIfExists : BOOLEAN,
    RootDirectory : HANDLE,
    FileNameLength : DWORD,
    FileName : Array[WCHAR, 1],
);

alias FILE_RENAME_INFO = Struct__FILE_RENAME_INFO;

alias PFILE_RENAME_INFO = Pointer[Struct__FILE_RENAME_INFO];

record Struct__FILE_ALLOCATION_INFO (
    AllocationSize : LARGE_INTEGER,
);

alias FILE_ALLOCATION_INFO = Struct__FILE_ALLOCATION_INFO;

alias PFILE_ALLOCATION_INFO = Pointer[Struct__FILE_ALLOCATION_INFO];

record Struct__FILE_END_OF_FILE_INFO (
    EndOfFile : LARGE_INTEGER,
);

alias FILE_END_OF_FILE_INFO = Struct__FILE_END_OF_FILE_INFO;

alias PFILE_END_OF_FILE_INFO = Pointer[Struct__FILE_END_OF_FILE_INFO];

record Struct__FILE_STREAM_INFO (
    NextEntryOffset : DWORD,
    StreamNameLength : DWORD,
    StreamSize : LARGE_INTEGER,
    StreamAllocationSize : LARGE_INTEGER,
    StreamName : Array[WCHAR, 1],
);

alias FILE_STREAM_INFO = Struct__FILE_STREAM_INFO;

alias PFILE_STREAM_INFO = Pointer[Struct__FILE_STREAM_INFO];

record Struct__FILE_COMPRESSION_INFO (
    CompressedFileSize : LARGE_INTEGER,
    CompressionFormat : WORD,
    CompressionUnitShift : UCHAR,
    ChunkShift : UCHAR,
    ClusterShift : UCHAR,
    Reserved : Array[UCHAR, 3],
);

alias FILE_COMPRESSION_INFO = Struct__FILE_COMPRESSION_INFO;

alias PFILE_COMPRESSION_INFO = Pointer[Struct__FILE_COMPRESSION_INFO];

record Struct__FILE_ATTRIBUTE_TAG_INFO (
    FileAttributes : DWORD,
    ReparseTag : DWORD,
);

alias FILE_ATTRIBUTE_TAG_INFO = Struct__FILE_ATTRIBUTE_TAG_INFO;

alias PFILE_ATTRIBUTE_TAG_INFO = Pointer[Struct__FILE_ATTRIBUTE_TAG_INFO];

record Struct__FILE_DISPOSITION_INFO (
    DeleteFileA : BOOLEAN,
);

alias FILE_DISPOSITION_INFO = Struct__FILE_DISPOSITION_INFO;

alias PFILE_DISPOSITION_INFO = Pointer[Struct__FILE_DISPOSITION_INFO];

record Struct__FILE_ID_BOTH_DIR_INFO (
    NextEntryOffset : DWORD,
    FileIndex : DWORD,
    CreationTime : LARGE_INTEGER,
    LastAccessTime : LARGE_INTEGER,
    LastWriteTime : LARGE_INTEGER,
    ChangeTime : LARGE_INTEGER,
    EndOfFile : LARGE_INTEGER,
    AllocationSize : LARGE_INTEGER,
    FileAttributes : DWORD,
    FileNameLength : DWORD,
    EaSize : DWORD,
    ShortNameLength : CCHAR,
    ShortName : Array[WCHAR, 12],
    FileId : LARGE_INTEGER,
    FileName : Array[WCHAR, 1],
);

alias FILE_ID_BOTH_DIR_INFO = Struct__FILE_ID_BOTH_DIR_INFO;

alias PFILE_ID_BOTH_DIR_INFO = Pointer[Struct__FILE_ID_BOTH_DIR_INFO];

alias Enum__PRIORITY_HINT = Int;
alias IoPriorityHintVeryLow = 0;
alias IoPriorityHintLow = 1;
alias IoPriorityHintNormal = 2;
alias MaximumIoPriorityHintType = 3;

alias PRIORITY_HINT = Enum__PRIORITY_HINT;

record Struct__FILE_IO_PRIORITY_HINT_INFO (
    PriorityHint : PRIORITY_HINT,
);

alias FILE_IO_PRIORITY_HINT_INFO = Struct__FILE_IO_PRIORITY_HINT_INFO;

alias PFILE_IO_PRIORITY_HINT_INFO = Pointer[Struct__FILE_IO_PRIORITY_HINT_INFO];

record Struct__FILE_REMOTE_PROTOCOL_INFO (
    StructureVersion : USHORT,
    StructureSize : USHORT,
    Protocol : DWORD,
    ProtocolMajorVersion : USHORT,
    ProtocolMinorVersion : USHORT,
    ProtocolRevision : USHORT,
    Reserved : USHORT,
    Flags : DWORD,
    GenericReserved : Struct_Unnamed108,
    ProtocolSpecificReserved : Struct_Unnamed109,
);

record Struct_Unnamed108 (
    Reserved : Array[DWORD, 8],
);

record Struct_Unnamed109 (
    Reserved : Array[DWORD, 16],
);

alias FILE_REMOTE_PROTOCOL_INFO = Struct__FILE_REMOTE_PROTOCOL_INFO;

alias PFILE_REMOTE_PROTOCOL_INFO = Pointer[Struct__FILE_REMOTE_PROTOCOL_INFO];

external (stdcall) SetFileInformationByHandle(arg0:HANDLE, arg1:FILE_INFO_BY_HANDLE_CLASS, arg2:LPVOID, arg3:DWORD) : BOOL;

external (stdcall) GetFileInformationByHandleEx(arg0:HANDLE, arg1:FILE_INFO_BY_HANDLE_CLASS, arg2:LPVOID, arg3:DWORD) : BOOL;

alias Enum__FILE_ID_TYPE = Int;
alias FileIdType = 0;
alias ObjectIdType = 1;
alias MaximumFileIdType = 2;

alias FILE_ID_TYPE = Enum__FILE_ID_TYPE;

alias PFILE_ID_TYPE = Pointer[Enum__FILE_ID_TYPE];

record Struct_FILE_ID_DESCRIPTOR (
    dwSize : DWORD,
    Type : FILE_ID_TYPE,
);

alias Union_Unnamed110 = Union[
    /* FileId */ LARGE_INTEGER,
    /* ObjectId */ GUID,
];

alias FILE_ID_DESCRIPTOR = Struct_FILE_ID_DESCRIPTOR;

alias LPFILE_ID_DESCRIPTOR = Pointer[Struct_FILE_ID_DESCRIPTOR];

external (stdcall) OpenFileById(arg0:HANDLE, arg1:LPFILE_ID_DESCRIPTOR, arg2:DWORD, arg3:DWORD, arg4:LPSECURITY_ATTRIBUTES, arg5:DWORD) : HANDLE;

external (stdcall) CreateSymbolicLinkA(arg0:LPCSTR, arg1:LPCSTR, arg2:DWORD) : BOOLEAN;

external (stdcall) CreateSymbolicLinkW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:DWORD) : BOOLEAN;

external (stdcall) CreateSymbolicLinkTransactedA(arg0:LPCSTR, arg1:LPCSTR, arg2:DWORD, arg3:HANDLE) : BOOLEAN;

external (stdcall) CreateSymbolicLinkTransactedW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:DWORD, arg3:HANDLE) : BOOLEAN;

external (stdcall) GetFinalPathNameByHandleA(arg0:HANDLE, arg1:LPSTR, arg2:DWORD, arg3:DWORD) : DWORD;

external (stdcall) GetFinalPathNameByHandleW(arg0:HANDLE, arg1:LPWSTR, arg2:DWORD, arg3:DWORD) : DWORD;

external (stdcall) QueryActCtxSettingsW(arg0:DWORD, arg1:HANDLE, arg2:PCWSTR, arg3:PCWSTR, arg4:PWSTR, arg5:SIZE_T, arg6:Pointer[SIZE_T]) : BOOL;

external (stdcall) ReplacePartitionUnit(arg0:PWSTR, arg1:PWSTR, arg2:ULONG) : BOOL;

external (stdcall) AddSecureMemoryCacheCallback(arg0:PSECURE_MEMORY_CACHE_CALLBACK) : BOOL;

external (stdcall) RemoveSecureMemoryCacheCallback(arg0:PSECURE_MEMORY_CACHE_CALLBACK) : BOOL;

external (stdcall) CopyExtendedContext(arg0:PCONTEXT_EX, arg1:DWORD, arg2:PCONTEXT_EX) : BOOL;

external (stdcall) InitializeExtendedContext(arg0:PVOID, arg1:DWORD, arg2:Pointer[PCONTEXT_EX]) : BOOL;

external (stdcall) GetEnabledExtendedFeatures(arg0:DWORD64) : DWORD64;

external (stdcall) GetExtendedContextLength(arg0:DWORD, arg1:PDWORD) : BOOL;

external (stdcall) GetExtendedFeaturesMask(arg0:PCONTEXT_EX) : DWORD64;

external (stdcall) LocateExtendedFeature(arg0:PCONTEXT_EX, arg1:DWORD, arg2:PDWORD) : PVOID;

external (stdcall) LocateLegacyContext(arg0:PCONTEXT_EX, arg1:PDWORD) : PCONTEXT;

external (stdcall) SetExtendedFeaturesMask(arg0:PCONTEXT_EX, arg1:DWORD64) : ;

external (stdcall) EnableThreadProfiling(arg0:HANDLE, arg1:DWORD, arg2:DWORD64, arg3:Pointer[HANDLE]) : DWORD;

external (stdcall) DisableThreadProfiling(arg0:HANDLE) : DWORD;

external (stdcall) QueryThreadProfiling(arg0:HANDLE, arg1:PBOOLEAN) : DWORD;

external (stdcall) ReadThreadProfilingData(arg0:HANDLE, arg1:DWORD, arg2:PPERFORMANCE_DATA) : DWORD;

record Struct__DRAWPATRECT (
    ptPosition : POINT,
    ptSize : POINT,
    wStyle : WORD,
    wPattern : WORD,
);

alias DRAWPATRECT = Struct__DRAWPATRECT;

alias PDRAWPATRECT = Pointer[Struct__DRAWPATRECT];

record Struct__PSINJECTDATA (
    DataBytes : DWORD,
    InjectionPoint : WORD,
    PageNumber : WORD,
);

alias PSINJECTDATA = Struct__PSINJECTDATA;

alias PPSINJECTDATA = Pointer[Struct__PSINJECTDATA];

record Struct__PSFEATURE_OUTPUT (
    bPageIndependent : BOOL,
    bSetPageDevice : BOOL,
);

alias PSFEATURE_OUTPUT = Struct__PSFEATURE_OUTPUT;

alias PPSFEATURE_OUTPUT = Pointer[Struct__PSFEATURE_OUTPUT];

record Struct__PSFEATURE_CUSTPAPER (
    lOrientation : LONG,
    lWidth : LONG,
    lHeight : LONG,
    lWidthOffset : LONG,
    lHeightOffset : LONG,
);

alias PSFEATURE_CUSTPAPER = Struct__PSFEATURE_CUSTPAPER;

alias PPSFEATURE_CUSTPAPER = Pointer[Struct__PSFEATURE_CUSTPAPER];

record Struct_tagXFORM (
    eM11 : FLOAT,
    eM12 : FLOAT,
    eM21 : FLOAT,
    eM22 : FLOAT,
    eDx : FLOAT,
    eDy : FLOAT,
);

alias XFORM = Struct_tagXFORM;

alias PXFORM = Pointer[Struct_tagXFORM];

alias LPXFORM = Pointer[Struct_tagXFORM];

record Struct_tagBITMAP (
    bmType : LONG,
    bmWidth : LONG,
    bmHeight : LONG,
    bmWidthBytes : LONG,
    bmPlanes : WORD,
    bmBitsPixel : WORD,
    bmBits : LPVOID,
);

alias BITMAP = Struct_tagBITMAP;

alias PBITMAP = Pointer[Struct_tagBITMAP];

alias NPBITMAP = Pointer[Struct_tagBITMAP];

alias LPBITMAP = Pointer[Struct_tagBITMAP];

record Struct_tagRGBTRIPLE (
    rgbtBlue : BYTE,
    rgbtGreen : BYTE,
    rgbtRed : BYTE,
);

alias RGBTRIPLE = Struct_tagRGBTRIPLE;

alias PRGBTRIPLE = Pointer[Struct_tagRGBTRIPLE];

alias NPRGBTRIPLE = Pointer[Struct_tagRGBTRIPLE];

alias LPRGBTRIPLE = Pointer[Struct_tagRGBTRIPLE];

record Struct_tagRGBQUAD (
    rgbBlue : BYTE,
    rgbGreen : BYTE,
    rgbRed : BYTE,
    rgbReserved : BYTE,
);

alias RGBQUAD = Struct_tagRGBQUAD;

alias LPRGBQUAD = Pointer[RGBQUAD];

alias LCSCSTYPE = LONG;

alias LCSGAMUTMATCH = LONG;

alias FXPT16DOT16 = CLong;

alias LPFXPT16DOT16 = Pointer[CLong];

alias FXPT2DOT30 = CLong;

alias LPFXPT2DOT30 = Pointer[CLong];

record Struct_tagCIEXYZ (
    ciexyzX : FXPT2DOT30,
    ciexyzY : FXPT2DOT30,
    ciexyzZ : FXPT2DOT30,
);

alias CIEXYZ = Struct_tagCIEXYZ;

alias LPCIEXYZ = Pointer[CIEXYZ];

record Struct_tagICEXYZTRIPLE (
    ciexyzRed : CIEXYZ,
    ciexyzGreen : CIEXYZ,
    ciexyzBlue : CIEXYZ,
);

alias CIEXYZTRIPLE = Struct_tagICEXYZTRIPLE;

alias LPCIEXYZTRIPLE = Pointer[CIEXYZTRIPLE];

record Struct_tagLOGCOLORSPACEA (
    lcsSignature : DWORD,
    lcsVersion : DWORD,
    lcsSize : DWORD,
    lcsCSType : LCSCSTYPE,
    lcsIntent : LCSGAMUTMATCH,
    lcsEndpoints : CIEXYZTRIPLE,
    lcsGammaRed : DWORD,
    lcsGammaGreen : DWORD,
    lcsGammaBlue : DWORD,
    lcsFilename : Array[CHAR, 260],
);

alias LOGCOLORSPACEA = Struct_tagLOGCOLORSPACEA;

alias LPLOGCOLORSPACEA = Pointer[Struct_tagLOGCOLORSPACEA];

record Struct_tagLOGCOLORSPACEW (
    lcsSignature : DWORD,
    lcsVersion : DWORD,
    lcsSize : DWORD,
    lcsCSType : LCSCSTYPE,
    lcsIntent : LCSGAMUTMATCH,
    lcsEndpoints : CIEXYZTRIPLE,
    lcsGammaRed : DWORD,
    lcsGammaGreen : DWORD,
    lcsGammaBlue : DWORD,
    lcsFilename : Array[WCHAR, 260],
);

alias LOGCOLORSPACEW = Struct_tagLOGCOLORSPACEW;

alias LPLOGCOLORSPACEW = Pointer[Struct_tagLOGCOLORSPACEW];

alias LOGCOLORSPACE = LOGCOLORSPACEA;

alias LPLOGCOLORSPACE = LPLOGCOLORSPACEA;

record Struct_tagBITMAPCOREHEADER (
    bcSize : DWORD,
    bcWidth : WORD,
    bcHeight : WORD,
    bcPlanes : WORD,
    bcBitCount : WORD,
);

alias BITMAPCOREHEADER = Struct_tagBITMAPCOREHEADER;

alias LPBITMAPCOREHEADER = Pointer[Struct_tagBITMAPCOREHEADER];

alias PBITMAPCOREHEADER = Pointer[Struct_tagBITMAPCOREHEADER];

record Struct_tagBITMAPINFOHEADER (
    biSize : DWORD,
    biWidth : LONG,
    biHeight : LONG,
    biPlanes : WORD,
    biBitCount : WORD,
    biCompression : DWORD,
    biSizeImage : DWORD,
    biXPelsPerMeter : LONG,
    biYPelsPerMeter : LONG,
    biClrUsed : DWORD,
    biClrImportant : DWORD,
);

alias BITMAPINFOHEADER = Struct_tagBITMAPINFOHEADER;

alias LPBITMAPINFOHEADER = Pointer[Struct_tagBITMAPINFOHEADER];

alias PBITMAPINFOHEADER = Pointer[Struct_tagBITMAPINFOHEADER];

record Struct_Unnamed111 (
    bV4Size : DWORD,
    bV4Width : LONG,
    bV4Height : LONG,
    bV4Planes : WORD,
    bV4BitCount : WORD,
    bV4V4Compression : DWORD,
    bV4SizeImage : DWORD,
    bV4XPelsPerMeter : LONG,
    bV4YPelsPerMeter : LONG,
    bV4ClrUsed : DWORD,
    bV4ClrImportant : DWORD,
    bV4RedMask : DWORD,
    bV4GreenMask : DWORD,
    bV4BlueMask : DWORD,
    bV4AlphaMask : DWORD,
    bV4CSType : DWORD,
    bV4Endpoints : CIEXYZTRIPLE,
    bV4GammaRed : DWORD,
    bV4GammaGreen : DWORD,
    bV4GammaBlue : DWORD,
);

alias BITMAPV4HEADER = Struct_Unnamed111;

alias LPBITMAPV4HEADER = Pointer[Struct_Unnamed111];

alias PBITMAPV4HEADER = Pointer[Struct_Unnamed111];

record Struct_Unnamed112 (
    bV5Size : DWORD,
    bV5Width : LONG,
    bV5Height : LONG,
    bV5Planes : WORD,
    bV5BitCount : WORD,
    bV5Compression : DWORD,
    bV5SizeImage : DWORD,
    bV5XPelsPerMeter : LONG,
    bV5YPelsPerMeter : LONG,
    bV5ClrUsed : DWORD,
    bV5ClrImportant : DWORD,
    bV5RedMask : DWORD,
    bV5GreenMask : DWORD,
    bV5BlueMask : DWORD,
    bV5AlphaMask : DWORD,
    bV5CSType : DWORD,
    bV5Endpoints : CIEXYZTRIPLE,
    bV5GammaRed : DWORD,
    bV5GammaGreen : DWORD,
    bV5GammaBlue : DWORD,
    bV5Intent : DWORD,
    bV5ProfileData : DWORD,
    bV5ProfileSize : DWORD,
    bV5Reserved : DWORD,
);

alias BITMAPV5HEADER = Struct_Unnamed112;

alias LPBITMAPV5HEADER = Pointer[Struct_Unnamed112];

alias PBITMAPV5HEADER = Pointer[Struct_Unnamed112];

record Struct_tagBITMAPINFO (
    bmiHeader : BITMAPINFOHEADER,
    bmiColors : Array[RGBQUAD, 1],
);

alias BITMAPINFO = Struct_tagBITMAPINFO;

alias LPBITMAPINFO = Pointer[Struct_tagBITMAPINFO];

alias PBITMAPINFO = Pointer[Struct_tagBITMAPINFO];

record Struct_tagBITMAPCOREINFO (
    bmciHeader : BITMAPCOREHEADER,
    bmciColors : Array[RGBTRIPLE, 1],
);

alias BITMAPCOREINFO = Struct_tagBITMAPCOREINFO;

alias LPBITMAPCOREINFO = Pointer[Struct_tagBITMAPCOREINFO];

alias PBITMAPCOREINFO = Pointer[Struct_tagBITMAPCOREINFO];

record Struct_tagBITMAPFILEHEADER (
    bfType : WORD,
    bfSize : DWORD,
    bfReserved1 : WORD,
    bfReserved2 : WORD,
    bfOffBits : DWORD,
);

alias BITMAPFILEHEADER = Struct_tagBITMAPFILEHEADER;

alias LPBITMAPFILEHEADER = Pointer[Struct_tagBITMAPFILEHEADER];

alias PBITMAPFILEHEADER = Pointer[Struct_tagBITMAPFILEHEADER];

record Struct_tagFONTSIGNATURE (
    fsUsb : Array[DWORD, 4],
    fsCsb : Array[DWORD, 2],
);

alias FONTSIGNATURE = Struct_tagFONTSIGNATURE;

alias PFONTSIGNATURE = Pointer[Struct_tagFONTSIGNATURE];

alias LPFONTSIGNATURE = Pointer[Struct_tagFONTSIGNATURE];

record Struct_tagCHARSETINFO (
    ciCharset : UINT,
    ciACP : UINT,
    fs : FONTSIGNATURE,
);

alias CHARSETINFO = Struct_tagCHARSETINFO;

alias PCHARSETINFO = Pointer[Struct_tagCHARSETINFO];

alias NPCHARSETINFO = Pointer[Struct_tagCHARSETINFO];

alias LPCHARSETINFO = Pointer[Struct_tagCHARSETINFO];

record Struct_tagLOCALESIGNATURE (
    lsUsb : Array[DWORD, 4],
    lsCsbDefault : Array[DWORD, 2],
    lsCsbSupported : Array[DWORD, 2],
);

alias LOCALESIGNATURE = Struct_tagLOCALESIGNATURE;

alias PLOCALESIGNATURE = Pointer[Struct_tagLOCALESIGNATURE];

alias LPLOCALESIGNATURE = Pointer[Struct_tagLOCALESIGNATURE];

record Struct_tagHANDLETABLE (
    objectHandle : Array[HGDIOBJ, 1],
);

alias HANDLETABLE = Struct_tagHANDLETABLE;

alias PHANDLETABLE = Pointer[Struct_tagHANDLETABLE];

alias LPHANDLETABLE = Pointer[Struct_tagHANDLETABLE];

record Struct_tagMETARECORD (
    rdSize : DWORD,
    rdFunction : WORD,
    rdParm : Array[WORD, 1],
);

alias METARECORD = Struct_tagMETARECORD;

alias PMETARECORD = Pointer[Struct_tagMETARECORD];

alias LPMETARECORD = Pointer[Struct_tagMETARECORD];

record Struct_tagMETAFILEPICT (
    mm : LONG,
    xExt : LONG,
    yExt : LONG,
    hMF : HMETAFILE,
);

alias METAFILEPICT = Struct_tagMETAFILEPICT;

alias LPMETAFILEPICT = Pointer[Struct_tagMETAFILEPICT];

record Struct_tagMETAHEADER (
    mtType : WORD,
    mtHeaderSize : WORD,
    mtVersion : WORD,
    mtSize : DWORD,
    mtNoObjects : WORD,
    mtMaxRecord : DWORD,
    mtNoParameters : WORD,
);

alias METAHEADER = Struct_tagMETAHEADER;

alias PMETAHEADER = Pointer[Struct_tagMETAHEADER];

alias LPMETAHEADER = Pointer[Struct_tagMETAHEADER];

record Struct_tagENHMETARECORD (
    iType : DWORD,
    nSize : DWORD,
    dParm : Array[DWORD, 1],
);

alias ENHMETARECORD = Struct_tagENHMETARECORD;

alias PENHMETARECORD = Pointer[Struct_tagENHMETARECORD];

alias LPENHMETARECORD = Pointer[Struct_tagENHMETARECORD];

record Struct_tagENHMETAHEADER (
    iType : DWORD,
    nSize : DWORD,
    rclBounds : RECTL,
    rclFrame : RECTL,
    dSignature : DWORD,
    nVersion : DWORD,
    nBytes : DWORD,
    nRecords : DWORD,
    nHandles : WORD,
    sReserved : WORD,
    nDescription : DWORD,
    offDescription : DWORD,
    nPalEntries : DWORD,
    szlDevice : SIZEL,
    szlMillimeters : SIZEL,
    cbPixelFormat : DWORD,
    offPixelFormat : DWORD,
    bOpenGL : DWORD,
    szlMicrometers : SIZEL,
);

alias ENHMETAHEADER = Struct_tagENHMETAHEADER;

alias PENHMETAHEADER = Pointer[Struct_tagENHMETAHEADER];

alias LPENHMETAHEADER = Pointer[Struct_tagENHMETAHEADER];

alias BCHAR = BYTE;

record Struct_tagTEXTMETRICA (
    tmHeight : LONG,
    tmAscent : LONG,
    tmDescent : LONG,
    tmInternalLeading : LONG,
    tmExternalLeading : LONG,
    tmAveCharWidth : LONG,
    tmMaxCharWidth : LONG,
    tmWeight : LONG,
    tmOverhang : LONG,
    tmDigitizedAspectX : LONG,
    tmDigitizedAspectY : LONG,
    tmFirstChar : BYTE,
    tmLastChar : BYTE,
    tmDefaultChar : BYTE,
    tmBreakChar : BYTE,
    tmItalic : BYTE,
    tmUnderlined : BYTE,
    tmStruckOut : BYTE,
    tmPitchAndFamily : BYTE,
    tmCharSet : BYTE,
);

alias TEXTMETRICA = Struct_tagTEXTMETRICA;

alias PTEXTMETRICA = Pointer[Struct_tagTEXTMETRICA];

alias NPTEXTMETRICA = Pointer[Struct_tagTEXTMETRICA];

alias LPTEXTMETRICA = Pointer[Struct_tagTEXTMETRICA];

record Struct_tagTEXTMETRICW (
    tmHeight : LONG,
    tmAscent : LONG,
    tmDescent : LONG,
    tmInternalLeading : LONG,
    tmExternalLeading : LONG,
    tmAveCharWidth : LONG,
    tmMaxCharWidth : LONG,
    tmWeight : LONG,
    tmOverhang : LONG,
    tmDigitizedAspectX : LONG,
    tmDigitizedAspectY : LONG,
    tmFirstChar : WCHAR,
    tmLastChar : WCHAR,
    tmDefaultChar : WCHAR,
    tmBreakChar : WCHAR,
    tmItalic : BYTE,
    tmUnderlined : BYTE,
    tmStruckOut : BYTE,
    tmPitchAndFamily : BYTE,
    tmCharSet : BYTE,
);

alias TEXTMETRICW = Struct_tagTEXTMETRICW;

alias PTEXTMETRICW = Pointer[Struct_tagTEXTMETRICW];

alias NPTEXTMETRICW = Pointer[Struct_tagTEXTMETRICW];

alias LPTEXTMETRICW = Pointer[Struct_tagTEXTMETRICW];

alias TEXTMETRIC = TEXTMETRICA;

alias PTEXTMETRIC = PTEXTMETRICA;

alias NPTEXTMETRIC = NPTEXTMETRICA;

alias LPTEXTMETRIC = LPTEXTMETRICA;

record Struct_tagNEWTEXTMETRICA (
    tmHeight : LONG,
    tmAscent : LONG,
    tmDescent : LONG,
    tmInternalLeading : LONG,
    tmExternalLeading : LONG,
    tmAveCharWidth : LONG,
    tmMaxCharWidth : LONG,
    tmWeight : LONG,
    tmOverhang : LONG,
    tmDigitizedAspectX : LONG,
    tmDigitizedAspectY : LONG,
    tmFirstChar : BYTE,
    tmLastChar : BYTE,
    tmDefaultChar : BYTE,
    tmBreakChar : BYTE,
    tmItalic : BYTE,
    tmUnderlined : BYTE,
    tmStruckOut : BYTE,
    tmPitchAndFamily : BYTE,
    tmCharSet : BYTE,
    ntmFlags : DWORD,
    ntmSizeEM : UINT,
    ntmCellHeight : UINT,
    ntmAvgWidth : UINT,
);

alias NEWTEXTMETRICA = Struct_tagNEWTEXTMETRICA;

alias PNEWTEXTMETRICA = Pointer[Struct_tagNEWTEXTMETRICA];

alias NPNEWTEXTMETRICA = Pointer[Struct_tagNEWTEXTMETRICA];

alias LPNEWTEXTMETRICA = Pointer[Struct_tagNEWTEXTMETRICA];

record Struct_tagNEWTEXTMETRICW (
    tmHeight : LONG,
    tmAscent : LONG,
    tmDescent : LONG,
    tmInternalLeading : LONG,
    tmExternalLeading : LONG,
    tmAveCharWidth : LONG,
    tmMaxCharWidth : LONG,
    tmWeight : LONG,
    tmOverhang : LONG,
    tmDigitizedAspectX : LONG,
    tmDigitizedAspectY : LONG,
    tmFirstChar : WCHAR,
    tmLastChar : WCHAR,
    tmDefaultChar : WCHAR,
    tmBreakChar : WCHAR,
    tmItalic : BYTE,
    tmUnderlined : BYTE,
    tmStruckOut : BYTE,
    tmPitchAndFamily : BYTE,
    tmCharSet : BYTE,
    ntmFlags : DWORD,
    ntmSizeEM : UINT,
    ntmCellHeight : UINT,
    ntmAvgWidth : UINT,
);

alias NEWTEXTMETRICW = Struct_tagNEWTEXTMETRICW;

alias PNEWTEXTMETRICW = Pointer[Struct_tagNEWTEXTMETRICW];

alias NPNEWTEXTMETRICW = Pointer[Struct_tagNEWTEXTMETRICW];

alias LPNEWTEXTMETRICW = Pointer[Struct_tagNEWTEXTMETRICW];

alias NEWTEXTMETRIC = NEWTEXTMETRICA;

alias PNEWTEXTMETRIC = PNEWTEXTMETRICA;

alias NPNEWTEXTMETRIC = NPNEWTEXTMETRICA;

alias LPNEWTEXTMETRIC = LPNEWTEXTMETRICA;

record Struct_tagNEWTEXTMETRICEXA (
    ntmTm : NEWTEXTMETRICA,
    ntmFontSig : FONTSIGNATURE,
);

alias NEWTEXTMETRICEXA = Struct_tagNEWTEXTMETRICEXA;

record Struct_tagNEWTEXTMETRICEXW (
    ntmTm : NEWTEXTMETRICW,
    ntmFontSig : FONTSIGNATURE,
);

alias NEWTEXTMETRICEXW = Struct_tagNEWTEXTMETRICEXW;

alias NEWTEXTMETRICEX = NEWTEXTMETRICEXA;

record Struct_tagPELARRAY (
    paXCount : LONG,
    paYCount : LONG,
    paXExt : LONG,
    paYExt : LONG,
    paRGBs : BYTE,
);

alias PELARRAY = Struct_tagPELARRAY;

alias PPELARRAY = Pointer[Struct_tagPELARRAY];

alias NPPELARRAY = Pointer[Struct_tagPELARRAY];

alias LPPELARRAY = Pointer[Struct_tagPELARRAY];

record Struct_tagLOGBRUSH (
    lbStyle : UINT,
    lbColor : COLORREF,
    lbHatch : ULONG_PTR,
);

alias LOGBRUSH = Struct_tagLOGBRUSH;

alias PLOGBRUSH = Pointer[Struct_tagLOGBRUSH];

alias NPLOGBRUSH = Pointer[Struct_tagLOGBRUSH];

alias LPLOGBRUSH = Pointer[Struct_tagLOGBRUSH];

record Struct_tagLOGBRUSH32 (
    lbStyle : UINT,
    lbColor : COLORREF,
    lbHatch : ULONG,
);

alias LOGBRUSH32 = Struct_tagLOGBRUSH32;

alias PLOGBRUSH32 = Pointer[Struct_tagLOGBRUSH32];

alias NPLOGBRUSH32 = Pointer[Struct_tagLOGBRUSH32];

alias LPLOGBRUSH32 = Pointer[Struct_tagLOGBRUSH32];

alias PATTERN = LOGBRUSH;

alias PPATTERN = Pointer[PATTERN];

alias NPPATTERN = Pointer[PATTERN];

alias LPPATTERN = Pointer[PATTERN];

record Struct_tagLOGPEN (
    lopnStyle : UINT,
    lopnWidth : POINT,
    lopnColor : COLORREF,
);

alias LOGPEN = Struct_tagLOGPEN;

alias PLOGPEN = Pointer[Struct_tagLOGPEN];

alias NPLOGPEN = Pointer[Struct_tagLOGPEN];

alias LPLOGPEN = Pointer[Struct_tagLOGPEN];

record Struct_tagEXTLOGPEN (
    elpPenStyle : DWORD,
    elpWidth : DWORD,
    elpBrushStyle : UINT,
    elpColor : COLORREF,
    elpHatch : ULONG_PTR,
    elpNumEntries : DWORD,
    elpStyleEntry : Array[DWORD, 1],
);

alias EXTLOGPEN = Struct_tagEXTLOGPEN;

alias PEXTLOGPEN = Pointer[Struct_tagEXTLOGPEN];

alias NPEXTLOGPEN = Pointer[Struct_tagEXTLOGPEN];

alias LPEXTLOGPEN = Pointer[Struct_tagEXTLOGPEN];

record Struct_tagEXTLOGPEN32 (
    elpPenStyle : DWORD,
    elpWidth : DWORD,
    elpBrushStyle : UINT,
    elpColor : COLORREF,
    elpHatch : ULONG,
    elpNumEntries : DWORD,
    elpStyleEntry : Array[DWORD, 1],
);

alias EXTLOGPEN32 = Struct_tagEXTLOGPEN32;

alias PEXTLOGPEN32 = Pointer[Struct_tagEXTLOGPEN32];

alias NPEXTLOGPEN32 = Pointer[Struct_tagEXTLOGPEN32];

alias LPEXTLOGPEN32 = Pointer[Struct_tagEXTLOGPEN32];

record Struct_tagPALETTEENTRY (
    peRed : BYTE,
    peGreen : BYTE,
    peBlue : BYTE,
    peFlags : BYTE,
);

alias PALETTEENTRY = Struct_tagPALETTEENTRY;

alias PPALETTEENTRY = Pointer[Struct_tagPALETTEENTRY];

alias LPPALETTEENTRY = Pointer[Struct_tagPALETTEENTRY];

record Struct_tagLOGPALETTE (
    palVersion : WORD,
    palNumEntries : WORD,
    palPalEntry : Array[PALETTEENTRY, 1],
);

alias LOGPALETTE = Struct_tagLOGPALETTE;

alias PLOGPALETTE = Pointer[Struct_tagLOGPALETTE];

alias NPLOGPALETTE = Pointer[Struct_tagLOGPALETTE];

alias LPLOGPALETTE = Pointer[Struct_tagLOGPALETTE];

record Struct_tagLOGFONTA (
    lfHeight : LONG,
    lfWidth : LONG,
    lfEscapement : LONG,
    lfOrientation : LONG,
    lfWeight : LONG,
    lfItalic : BYTE,
    lfUnderline : BYTE,
    lfStrikeOut : BYTE,
    lfCharSet : BYTE,
    lfOutPrecision : BYTE,
    lfClipPrecision : BYTE,
    lfQuality : BYTE,
    lfPitchAndFamily : BYTE,
    lfFaceName : Array[CHAR, 32],
);

alias LOGFONTA = Struct_tagLOGFONTA;

alias PLOGFONTA = Pointer[Struct_tagLOGFONTA];

alias NPLOGFONTA = Pointer[Struct_tagLOGFONTA];

alias LPLOGFONTA = Pointer[Struct_tagLOGFONTA];

record Struct_tagLOGFONTW (
    lfHeight : LONG,
    lfWidth : LONG,
    lfEscapement : LONG,
    lfOrientation : LONG,
    lfWeight : LONG,
    lfItalic : BYTE,
    lfUnderline : BYTE,
    lfStrikeOut : BYTE,
    lfCharSet : BYTE,
    lfOutPrecision : BYTE,
    lfClipPrecision : BYTE,
    lfQuality : BYTE,
    lfPitchAndFamily : BYTE,
    lfFaceName : Array[WCHAR, 32],
);

alias LOGFONTW = Struct_tagLOGFONTW;

alias PLOGFONTW = Pointer[Struct_tagLOGFONTW];

alias NPLOGFONTW = Pointer[Struct_tagLOGFONTW];

alias LPLOGFONTW = Pointer[Struct_tagLOGFONTW];

alias LOGFONT = LOGFONTA;

alias PLOGFONT = PLOGFONTA;

alias NPLOGFONT = NPLOGFONTA;

alias LPLOGFONT = LPLOGFONTA;

record Struct_tagENUMLOGFONTA (
    elfLogFont : LOGFONTA,
    elfFullName : Array[BYTE, 64],
    elfStyle : Array[BYTE, 32],
);

alias ENUMLOGFONTA = Struct_tagENUMLOGFONTA;

alias LPENUMLOGFONTA = Pointer[Struct_tagENUMLOGFONTA];

record Struct_tagENUMLOGFONTW (
    elfLogFont : LOGFONTW,
    elfFullName : Array[WCHAR, 64],
    elfStyle : Array[WCHAR, 32],
);

alias ENUMLOGFONTW = Struct_tagENUMLOGFONTW;

alias LPENUMLOGFONTW = Pointer[Struct_tagENUMLOGFONTW];

alias ENUMLOGFONT = ENUMLOGFONTA;

alias LPENUMLOGFONT = LPENUMLOGFONTA;

record Struct_tagENUMLOGFONTEXA (
    elfLogFont : LOGFONTA,
    elfFullName : Array[BYTE, 64],
    elfStyle : Array[BYTE, 32],
    elfScript : Array[BYTE, 32],
);

alias ENUMLOGFONTEXA = Struct_tagENUMLOGFONTEXA;

alias LPENUMLOGFONTEXA = Pointer[Struct_tagENUMLOGFONTEXA];

record Struct_tagENUMLOGFONTEXW (
    elfLogFont : LOGFONTW,
    elfFullName : Array[WCHAR, 64],
    elfStyle : Array[WCHAR, 32],
    elfScript : Array[WCHAR, 32],
);

alias ENUMLOGFONTEXW = Struct_tagENUMLOGFONTEXW;

alias LPENUMLOGFONTEXW = Pointer[Struct_tagENUMLOGFONTEXW];

alias ENUMLOGFONTEX = ENUMLOGFONTEXA;

alias LPENUMLOGFONTEX = LPENUMLOGFONTEXA;

record Struct_tagPANOSE (
    bFamilyType : BYTE,
    bSerifStyle : BYTE,
    bWeight : BYTE,
    bProportion : BYTE,
    bContrast : BYTE,
    bStrokeVariation : BYTE,
    bArmStyle : BYTE,
    bLetterform : BYTE,
    bMidline : BYTE,
    bXHeight : BYTE,
);

alias PANOSE = Struct_tagPANOSE;

alias LPPANOSE = Pointer[Struct_tagPANOSE];

record Struct_tagEXTLOGFONTA (
    elfLogFont : LOGFONTA,
    elfFullName : Array[BYTE, 64],
    elfStyle : Array[BYTE, 32],
    elfVersion : DWORD,
    elfStyleSize : DWORD,
    elfMatch : DWORD,
    elfReserved : DWORD,
    elfVendorId : Array[BYTE, 4],
    elfCulture : DWORD,
    elfPanose : PANOSE,
);

alias EXTLOGFONTA = Struct_tagEXTLOGFONTA;

alias PEXTLOGFONTA = Pointer[Struct_tagEXTLOGFONTA];

alias NPEXTLOGFONTA = Pointer[Struct_tagEXTLOGFONTA];

alias LPEXTLOGFONTA = Pointer[Struct_tagEXTLOGFONTA];

record Struct_tagEXTLOGFONTW (
    elfLogFont : LOGFONTW,
    elfFullName : Array[WCHAR, 64],
    elfStyle : Array[WCHAR, 32],
    elfVersion : DWORD,
    elfStyleSize : DWORD,
    elfMatch : DWORD,
    elfReserved : DWORD,
    elfVendorId : Array[BYTE, 4],
    elfCulture : DWORD,
    elfPanose : PANOSE,
);

alias EXTLOGFONTW = Struct_tagEXTLOGFONTW;

alias PEXTLOGFONTW = Pointer[Struct_tagEXTLOGFONTW];

alias NPEXTLOGFONTW = Pointer[Struct_tagEXTLOGFONTW];

alias LPEXTLOGFONTW = Pointer[Struct_tagEXTLOGFONTW];

alias EXTLOGFONT = EXTLOGFONTA;

alias PEXTLOGFONT = PEXTLOGFONTA;

alias NPEXTLOGFONT = NPEXTLOGFONTA;

alias LPEXTLOGFONT = LPEXTLOGFONTA;

record Struct__devicemodeA (
    dmDeviceName : Array[BYTE, 32],
    dmSpecVersion : WORD,
    dmDriverVersion : WORD,
    dmSize : WORD,
    dmDriverExtra : WORD,
    dmFields : DWORD,
    dmColor : Short,
    dmDuplex : Short,
    dmYResolution : Short,
    dmTTOption : Short,
    dmCollate : Short,
    dmFormName : Array[BYTE, 32],
    dmLogPixels : WORD,
    dmBitsPerPel : DWORD,
    dmPelsWidth : DWORD,
    dmPelsHeight : DWORD,
    dmDisplayFrequency : DWORD,
    dmICMMethod : DWORD,
    dmICMIntent : DWORD,
    dmMediaType : DWORD,
    dmDitherType : DWORD,
    dmReserved1 : DWORD,
    dmReserved2 : DWORD,
    dmPanningWidth : DWORD,
    dmPanningHeight : DWORD,
);

alias Union_Unnamed113 = Union[
];

record Struct_Unnamed114 (
    dmOrientation : Short,
    dmPaperSize : Short,
    dmPaperLength : Short,
    dmPaperWidth : Short,
    dmScale : Short,
    dmCopies : Short,
    dmDefaultSource : Short,
    dmPrintQuality : Short,
);

record Struct_Unnamed115 (
    dmPosition : POINTL,
    dmDisplayOrientation : DWORD,
    dmDisplayFixedOutput : DWORD,
);

alias Union_Unnamed116 = Union[
    /* dmDisplayFlags */ DWORD,
    /* dmNup */ DWORD,
];

alias DEVMODEA = Struct__devicemodeA;

alias PDEVMODEA = Pointer[Struct__devicemodeA];

alias NPDEVMODEA = Pointer[Struct__devicemodeA];

alias LPDEVMODEA = Pointer[Struct__devicemodeA];

record Struct__devicemodeW (
    dmDeviceName : Array[WCHAR, 32],
    dmSpecVersion : WORD,
    dmDriverVersion : WORD,
    dmSize : WORD,
    dmDriverExtra : WORD,
    dmFields : DWORD,
    dmColor : Short,
    dmDuplex : Short,
    dmYResolution : Short,
    dmTTOption : Short,
    dmCollate : Short,
    dmFormName : Array[WCHAR, 32],
    dmLogPixels : WORD,
    dmBitsPerPel : DWORD,
    dmPelsWidth : DWORD,
    dmPelsHeight : DWORD,
    dmDisplayFrequency : DWORD,
    dmICMMethod : DWORD,
    dmICMIntent : DWORD,
    dmMediaType : DWORD,
    dmDitherType : DWORD,
    dmReserved1 : DWORD,
    dmReserved2 : DWORD,
    dmPanningWidth : DWORD,
    dmPanningHeight : DWORD,
);

alias Union_Unnamed117 = Union[
];

record Struct_Unnamed118 (
    dmOrientation : Short,
    dmPaperSize : Short,
    dmPaperLength : Short,
    dmPaperWidth : Short,
    dmScale : Short,
    dmCopies : Short,
    dmDefaultSource : Short,
    dmPrintQuality : Short,
);

record Struct_Unnamed119 (
    dmPosition : POINTL,
    dmDisplayOrientation : DWORD,
    dmDisplayFixedOutput : DWORD,
);

alias Union_Unnamed120 = Union[
    /* dmDisplayFlags */ DWORD,
    /* dmNup */ DWORD,
];

alias DEVMODEW = Struct__devicemodeW;

alias PDEVMODEW = Pointer[Struct__devicemodeW];

alias NPDEVMODEW = Pointer[Struct__devicemodeW];

alias LPDEVMODEW = Pointer[Struct__devicemodeW];

alias DEVMODE = DEVMODEA;

alias PDEVMODE = PDEVMODEA;

alias NPDEVMODE = NPDEVMODEA;

alias LPDEVMODE = LPDEVMODEA;

record Struct__DISPLAY_DEVICEA (
    cb : DWORD,
    DeviceName : Array[CHAR, 32],
    DeviceString : Array[CHAR, 128],
    StateFlags : DWORD,
    DeviceID : Array[CHAR, 128],
    DeviceKey : Array[CHAR, 128],
);

alias DISPLAY_DEVICEA = Struct__DISPLAY_DEVICEA;

alias PDISPLAY_DEVICEA = Pointer[Struct__DISPLAY_DEVICEA];

alias LPDISPLAY_DEVICEA = Pointer[Struct__DISPLAY_DEVICEA];

record Struct__DISPLAY_DEVICEW (
    cb : DWORD,
    DeviceName : Array[WCHAR, 32],
    DeviceString : Array[WCHAR, 128],
    StateFlags : DWORD,
    DeviceID : Array[WCHAR, 128],
    DeviceKey : Array[WCHAR, 128],
);

alias DISPLAY_DEVICEW = Struct__DISPLAY_DEVICEW;

alias PDISPLAY_DEVICEW = Pointer[Struct__DISPLAY_DEVICEW];

alias LPDISPLAY_DEVICEW = Pointer[Struct__DISPLAY_DEVICEW];

alias DISPLAY_DEVICE = DISPLAY_DEVICEA;

alias PDISPLAY_DEVICE = PDISPLAY_DEVICEA;

alias LPDISPLAY_DEVICE = LPDISPLAY_DEVICEA;

record Struct_DISPLAYCONFIG_RATIONAL (
    Numerator : UINT32,
    Denominator : UINT32,
);

alias DISPLAYCONFIG_RATIONAL = Struct_DISPLAYCONFIG_RATIONAL;

alias Enum_Unnamed121 = Int;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_OTHER = -1;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HD15 = 0;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SVIDEO = 1;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPOSITE_VIDEO = 2;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPONENT_VIDEO = 3;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DVI = 4;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HDMI = 5;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_LVDS = 6;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_D_JPN = 8;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDI = 9;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EXTERNAL = 10;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED = 11;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EXTERNAL = 12;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EMBEDDED = 13;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDTVDONGLE = 14;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL = -2147483648;
alias DISPLAYCONFIG_OUTPUT_TECHNOLOGY_FORCE_UINT32 = -1;

alias DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY = Enum_Unnamed121;

alias Enum_Unnamed122 = Int;
alias DISPLAYCONFIG_SCANLINE_ORDERING_UNSPECIFIED = 0;
alias DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE = 1;
alias DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED = 2;
alias DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_UPPERFIELDFIRST = 2;
alias DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_LOWERFIELDFIRST = 3;
alias DISPLAYCONFIG_SCANLINE_ORDERING_FORCE_UINT32 = -1;

alias DISPLAYCONFIG_SCANLINE_ORDERING = Enum_Unnamed122;

record Struct_DISPLAYCONFIG_2DREGION (
    cx : UINT32,
    cy : UINT32,
);

alias DISPLAYCONFIG_2DREGION = Struct_DISPLAYCONFIG_2DREGION;

record Struct_DISPLAYCONFIG_VIDEO_SIGNAL_INFO (
    pixelRate : UINT64,
    hSyncFreq : DISPLAYCONFIG_RATIONAL,
    vSyncFreq : DISPLAYCONFIG_RATIONAL,
    activeSize : DISPLAYCONFIG_2DREGION,
    totalSize : DISPLAYCONFIG_2DREGION,
    videoStandard : UINT32,
    scanLineOrdering : DISPLAYCONFIG_SCANLINE_ORDERING,
);

alias DISPLAYCONFIG_VIDEO_SIGNAL_INFO = Struct_DISPLAYCONFIG_VIDEO_SIGNAL_INFO;

alias Enum_Unnamed123 = Int;
alias DISPLAYCONFIG_SCALING_IDENTITY = 1;
alias DISPLAYCONFIG_SCALING_CENTERED = 2;
alias DISPLAYCONFIG_SCALING_STRETCHED = 3;
alias DISPLAYCONFIG_SCALING_ASPECTRATIOCENTEREDMAX = 4;
alias DISPLAYCONFIG_SCALING_CUSTOM = 5;
alias DISPLAYCONFIG_SCALING_PREFERRED = 128;
alias DISPLAYCONFIG_SCALING_FORCE_UINT32 = -1;

alias DISPLAYCONFIG_SCALING = Enum_Unnamed123;

alias Enum_Unnamed124 = Int;
alias DISPLAYCONFIG_ROTATION_IDENTITY = 1;
alias DISPLAYCONFIG_ROTATION_ROTATE90 = 2;
alias DISPLAYCONFIG_ROTATION_ROTATE180 = 3;
alias DISPLAYCONFIG_ROTATION_ROTATE270 = 4;
alias DISPLAYCONFIG_ROTATION_FORCE_UINT32 = -1;

alias DISPLAYCONFIG_ROTATION = Enum_Unnamed124;

alias Enum_Unnamed125 = Int;
alias DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE = 1;
alias DISPLAYCONFIG_MODE_INFO_TYPE_TARGET = 2;
alias DISPLAYCONFIG_MODE_INFO_TYPE_FORCE_UINT32 = -1;

alias DISPLAYCONFIG_MODE_INFO_TYPE = Enum_Unnamed125;

alias Enum_Unnamed126 = Int;
alias DISPLAYCONFIG_PIXELFORMAT_8BPP = 1;
alias DISPLAYCONFIG_PIXELFORMAT_16BPP = 2;
alias DISPLAYCONFIG_PIXELFORMAT_24BPP = 3;
alias DISPLAYCONFIG_PIXELFORMAT_32BPP = 4;
alias DISPLAYCONFIG_PIXELFORMAT_NONGDI = 5;
alias DISPLAYCONFIG_PIXELFORMAT_FORCE_UINT32 = -1;

alias DISPLAYCONFIG_PIXELFORMAT = Enum_Unnamed126;

record Struct_DISPLAYCONFIG_SOURCE_MODE (
    width : UINT32,
    height : UINT32,
    pixelFormat : DISPLAYCONFIG_PIXELFORMAT,
    position : POINTL,
);

alias DISPLAYCONFIG_SOURCE_MODE = Struct_DISPLAYCONFIG_SOURCE_MODE;

record Struct_DISPLAYCONFIG_TARGET_MODE (
    targetVideoSignalInfo : DISPLAYCONFIG_VIDEO_SIGNAL_INFO,
);

alias DISPLAYCONFIG_TARGET_MODE = Struct_DISPLAYCONFIG_TARGET_MODE;

record Struct_DISPLAYCONFIG_MODE_INFO (
    infoType : DISPLAYCONFIG_MODE_INFO_TYPE,
    id : UINT32,
    adapterId : LUID,
);

alias Union_Unnamed127 = Union[
    /* targetMode */ DISPLAYCONFIG_TARGET_MODE,
    /* sourceMode */ DISPLAYCONFIG_SOURCE_MODE,
];

alias DISPLAYCONFIG_MODE_INFO = Struct_DISPLAYCONFIG_MODE_INFO;

record Struct_DISPLAYCONFIG_PATH_SOURCE_INFO (
    adapterId : LUID,
    id : UINT32,
    modeInfoIdx : UINT32,
    statusFlags : UINT32,
);

alias DISPLAYCONFIG_PATH_SOURCE_INFO = Struct_DISPLAYCONFIG_PATH_SOURCE_INFO;

record Struct_DISPLAYCONFIG_PATH_TARGET_INFO (
    adapterId : LUID,
    id : UINT32,
    modeInfoIdx : UINT32,
    outputTechnology : DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY,
    rotation : DISPLAYCONFIG_ROTATION,
    scaling : DISPLAYCONFIG_SCALING,
    refreshRate : DISPLAYCONFIG_RATIONAL,
    scanLineOrdering : DISPLAYCONFIG_SCANLINE_ORDERING,
    targetAvailable : BOOL,
    statusFlags : UINT32,
);

alias DISPLAYCONFIG_PATH_TARGET_INFO = Struct_DISPLAYCONFIG_PATH_TARGET_INFO;

record Struct_DISPLAYCONFIG_PATH_INFO (
    sourceInfo : DISPLAYCONFIG_PATH_SOURCE_INFO,
    targetInfo : DISPLAYCONFIG_PATH_TARGET_INFO,
    flags : UINT32,
);

alias DISPLAYCONFIG_PATH_INFO = Struct_DISPLAYCONFIG_PATH_INFO;

alias Enum_Unnamed128 = Int;
alias DISPLAYCONFIG_TOPOLOGY_INTERNAL = 1;
alias DISPLAYCONFIG_TOPOLOGY_CLONE = 2;
alias DISPLAYCONFIG_TOPOLOGY_EXTEND = 4;
alias DISPLAYCONFIG_TOPOLOGY_EXTERNAL = 8;
alias DISPLAYCONFIG_TOPOLOGY_FORCE_UINT32 = -1;

alias DISPLAYCONFIG_TOPOLOGY_ID = Enum_Unnamed128;

alias Enum_Unnamed129 = Int;
alias DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME = 1;
alias DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME = 2;
alias DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_PREFERRED_MODE = 3;
alias DISPLAYCONFIG_DEVICE_INFO_GET_ADAPTER_NAME = 4;
alias DISPLAYCONFIG_DEVICE_INFO_SET_TARGET_PERSISTENCE = 5;
alias DISPLAYCONFIG_DEVICE_INFO_FORCE_UINT32 = -1;

alias DISPLAYCONFIG_DEVICE_INFO_TYPE = Enum_Unnamed129;

record Struct_DISPLAYCONFIG_DEVICE_INFO_HEADER (
    type : DISPLAYCONFIG_DEVICE_INFO_TYPE,
    size : UINT32,
    adapterId : LUID,
    id : UINT32,
);

alias DISPLAYCONFIG_DEVICE_INFO_HEADER = Struct_DISPLAYCONFIG_DEVICE_INFO_HEADER;

record Struct_DISPLAYCONFIG_SOURCE_DEVICE_NAME (
    header : DISPLAYCONFIG_DEVICE_INFO_HEADER,
    viewGdiDeviceName : Array[WCHAR, 32],
);

alias DISPLAYCONFIG_SOURCE_DEVICE_NAME = Struct_DISPLAYCONFIG_SOURCE_DEVICE_NAME;

record Struct_DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS (
);

alias Union_Unnamed130 = Union[
    /* value */ UINT32,
];

record Struct_Unnamed131 (
    friendlyNameFromEdid : UINT32,
    friendlyNameForced : UINT32,
    edidIdsValid : UINT32,
    reserved : UINT32,
);

alias DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS = Struct_DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS;

record Struct_DISPLAYCONFIG_TARGET_DEVICE_NAME (
    header : DISPLAYCONFIG_DEVICE_INFO_HEADER,
    flags : DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS,
    outputTechnology : DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY,
    edidManufactureId : UINT16,
    edidProductCodeId : UINT16,
    connectorInstance : UINT32,
    monitorFriendlyDeviceName : Array[WCHAR, 64],
    monitorDevicePath : Array[WCHAR, 128],
);

alias DISPLAYCONFIG_TARGET_DEVICE_NAME = Struct_DISPLAYCONFIG_TARGET_DEVICE_NAME;

record Struct_DISPLAYCONFIG_TARGET_PREFERRED_MODE (
    header : DISPLAYCONFIG_DEVICE_INFO_HEADER,
    width : UINT32,
    height : UINT32,
    targetMode : DISPLAYCONFIG_TARGET_MODE,
);

alias DISPLAYCONFIG_TARGET_PREFERRED_MODE = Struct_DISPLAYCONFIG_TARGET_PREFERRED_MODE;

record Struct_DISPLAYCONFIG_ADAPTER_NAME (
    header : DISPLAYCONFIG_DEVICE_INFO_HEADER,
    adapterDevicePath : Array[WCHAR, 128],
);

alias DISPLAYCONFIG_ADAPTER_NAME = Struct_DISPLAYCONFIG_ADAPTER_NAME;

record Struct_DISPLAYCONFIG_SET_TARGET_PERSISTENCE (
    header : DISPLAYCONFIG_DEVICE_INFO_HEADER,
);

alias Union_Unnamed132 = Union[
    /* value */ UINT32,
];

record Struct_Unnamed133 (
    bootPersistenceOn : UINT32,
    reserved : UINT32,
);

alias DISPLAYCONFIG_SET_TARGET_PERSISTENCE = Struct_DISPLAYCONFIG_SET_TARGET_PERSISTENCE;

record Struct__RGNDATAHEADER (
    dwSize : DWORD,
    iType : DWORD,
    nCount : DWORD,
    nRgnSize : DWORD,
    rcBound : RECT,
);

alias RGNDATAHEADER = Struct__RGNDATAHEADER;

alias PRGNDATAHEADER = Pointer[Struct__RGNDATAHEADER];

record Struct__RGNDATA (
    rdh : RGNDATAHEADER,
    Buffer : Array[CChar, 1],
);

alias RGNDATA = Struct__RGNDATA;

alias PRGNDATA = Pointer[Struct__RGNDATA];

alias NPRGNDATA = Pointer[Struct__RGNDATA];

alias LPRGNDATA = Pointer[Struct__RGNDATA];

record Struct__ABC (
    abcA : Int,
    abcB : UINT,
    abcC : Int,
);

alias ABC = Struct__ABC;

alias PABC = Pointer[Struct__ABC];

alias NPABC = Pointer[Struct__ABC];

alias LPABC = Pointer[Struct__ABC];

record Struct__ABCFLOAT (
    abcfA : FLOAT,
    abcfB : FLOAT,
    abcfC : FLOAT,
);

alias ABCFLOAT = Struct__ABCFLOAT;

alias PABCFLOAT = Pointer[Struct__ABCFLOAT];

alias NPABCFLOAT = Pointer[Struct__ABCFLOAT];

alias LPABCFLOAT = Pointer[Struct__ABCFLOAT];

record Struct__OUTLINETEXTMETRICA (
    otmSize : UINT,
    otmTextMetrics : TEXTMETRICA,
    otmFiller : BYTE,
    otmPanoseNumber : PANOSE,
    otmfsSelection : UINT,
    otmfsType : UINT,
    otmsCharSlopeRise : Int,
    otmsCharSlopeRun : Int,
    otmItalicAngle : Int,
    otmEMSquare : UINT,
    otmAscent : Int,
    otmDescent : Int,
    otmLineGap : UINT,
    otmsCapEmHeight : UINT,
    otmsXHeight : UINT,
    otmrcFontBox : RECT,
    otmMacAscent : Int,
    otmMacDescent : Int,
    otmMacLineGap : UINT,
    otmusMinimumPPEM : UINT,
    otmptSubscriptSize : POINT,
    otmptSubscriptOffset : POINT,
    otmptSuperscriptSize : POINT,
    otmptSuperscriptOffset : POINT,
    otmsStrikeoutSize : UINT,
    otmsStrikeoutPosition : Int,
    otmsUnderscoreSize : Int,
    otmsUnderscorePosition : Int,
    otmpFamilyName : PSTR,
    otmpFaceName : PSTR,
    otmpStyleName : PSTR,
    otmpFullName : PSTR,
);

alias OUTLINETEXTMETRICA = Struct__OUTLINETEXTMETRICA;

alias POUTLINETEXTMETRICA = Pointer[Struct__OUTLINETEXTMETRICA];

alias NPOUTLINETEXTMETRICA = Pointer[Struct__OUTLINETEXTMETRICA];

alias LPOUTLINETEXTMETRICA = Pointer[Struct__OUTLINETEXTMETRICA];

record Struct__OUTLINETEXTMETRICW (
    otmSize : UINT,
    otmTextMetrics : TEXTMETRICW,
    otmFiller : BYTE,
    otmPanoseNumber : PANOSE,
    otmfsSelection : UINT,
    otmfsType : UINT,
    otmsCharSlopeRise : Int,
    otmsCharSlopeRun : Int,
    otmItalicAngle : Int,
    otmEMSquare : UINT,
    otmAscent : Int,
    otmDescent : Int,
    otmLineGap : UINT,
    otmsCapEmHeight : UINT,
    otmsXHeight : UINT,
    otmrcFontBox : RECT,
    otmMacAscent : Int,
    otmMacDescent : Int,
    otmMacLineGap : UINT,
    otmusMinimumPPEM : UINT,
    otmptSubscriptSize : POINT,
    otmptSubscriptOffset : POINT,
    otmptSuperscriptSize : POINT,
    otmptSuperscriptOffset : POINT,
    otmsStrikeoutSize : UINT,
    otmsStrikeoutPosition : Int,
    otmsUnderscoreSize : Int,
    otmsUnderscorePosition : Int,
    otmpFamilyName : PSTR,
    otmpFaceName : PSTR,
    otmpStyleName : PSTR,
    otmpFullName : PSTR,
);

alias OUTLINETEXTMETRICW = Struct__OUTLINETEXTMETRICW;

alias POUTLINETEXTMETRICW = Pointer[Struct__OUTLINETEXTMETRICW];

alias NPOUTLINETEXTMETRICW = Pointer[Struct__OUTLINETEXTMETRICW];

alias LPOUTLINETEXTMETRICW = Pointer[Struct__OUTLINETEXTMETRICW];

alias OUTLINETEXTMETRIC = OUTLINETEXTMETRICA;

alias POUTLINETEXTMETRIC = POUTLINETEXTMETRICA;

alias NPOUTLINETEXTMETRIC = NPOUTLINETEXTMETRICA;

alias LPOUTLINETEXTMETRIC = LPOUTLINETEXTMETRICA;

record Struct_tagPOLYTEXTA (
    x : Int,
    y : Int,
    n : UINT,
    lpstr : LPCSTR,
    uiFlags : UINT,
    rcl : RECT,
    pdx : Pointer[Int],
);

alias POLYTEXTA = Struct_tagPOLYTEXTA;

alias PPOLYTEXTA = Pointer[Struct_tagPOLYTEXTA];

alias NPPOLYTEXTA = Pointer[Struct_tagPOLYTEXTA];

alias LPPOLYTEXTA = Pointer[Struct_tagPOLYTEXTA];

record Struct_tagPOLYTEXTW (
    x : Int,
    y : Int,
    n : UINT,
    lpstr : LPCWSTR,
    uiFlags : UINT,
    rcl : RECT,
    pdx : Pointer[Int],
);

alias POLYTEXTW = Struct_tagPOLYTEXTW;

alias PPOLYTEXTW = Pointer[Struct_tagPOLYTEXTW];

alias NPPOLYTEXTW = Pointer[Struct_tagPOLYTEXTW];

alias LPPOLYTEXTW = Pointer[Struct_tagPOLYTEXTW];

alias POLYTEXT = POLYTEXTA;

alias PPOLYTEXT = PPOLYTEXTA;

alias NPPOLYTEXT = NPPOLYTEXTA;

alias LPPOLYTEXT = LPPOLYTEXTA;

record Struct__FIXED (
    fract : WORD,
    value : Short,
);

alias FIXED = Struct__FIXED;

record Struct__MAT2 (
    eM11 : FIXED,
    eM12 : FIXED,
    eM21 : FIXED,
    eM22 : FIXED,
);

alias MAT2 = Struct__MAT2;

alias LPMAT2 = Pointer[Struct__MAT2];

record Struct__GLYPHMETRICS (
    gmBlackBoxX : UINT,
    gmBlackBoxY : UINT,
    gmptGlyphOrigin : POINT,
    gmCellIncX : Short,
    gmCellIncY : Short,
);

alias GLYPHMETRICS = Struct__GLYPHMETRICS;

alias LPGLYPHMETRICS = Pointer[Struct__GLYPHMETRICS];

record Struct_tagPOINTFX (
    x : FIXED,
    y : FIXED,
);

alias POINTFX = Struct_tagPOINTFX;

alias LPPOINTFX = Pointer[Struct_tagPOINTFX];

record Struct_tagTTPOLYCURVE (
    wType : WORD,
    cpfx : WORD,
    apfx : Array[POINTFX, 1],
);

alias TTPOLYCURVE = Struct_tagTTPOLYCURVE;

alias LPTTPOLYCURVE = Pointer[Struct_tagTTPOLYCURVE];

record Struct_tagTTPOLYGONHEADER (
    cb : DWORD,
    dwType : DWORD,
    pfxStart : POINTFX,
);

alias TTPOLYGONHEADER = Struct_tagTTPOLYGONHEADER;

alias LPTTPOLYGONHEADER = Pointer[Struct_tagTTPOLYGONHEADER];

record Struct_tagGCP_RESULTSA (
    lStructSize : DWORD,
    lpOutString : LPSTR,
    lpOrder : Pointer[UINT],
    lpDx : Pointer[Int],
    lpCaretPos : Pointer[Int],
    lpClass : LPSTR,
    lpGlyphs : LPWSTR,
    nGlyphs : UINT,
    nMaxFit : Int,
);

alias GCP_RESULTSA = Struct_tagGCP_RESULTSA;

alias LPGCP_RESULTSA = Pointer[Struct_tagGCP_RESULTSA];

record Struct_tagGCP_RESULTSW (
    lStructSize : DWORD,
    lpOutString : LPWSTR,
    lpOrder : Pointer[UINT],
    lpDx : Pointer[Int],
    lpCaretPos : Pointer[Int],
    lpClass : LPSTR,
    lpGlyphs : LPWSTR,
    nGlyphs : UINT,
    nMaxFit : Int,
);

alias GCP_RESULTSW = Struct_tagGCP_RESULTSW;

alias LPGCP_RESULTSW = Pointer[Struct_tagGCP_RESULTSW];

alias GCP_RESULTS = GCP_RESULTSA;

alias LPGCP_RESULTS = LPGCP_RESULTSA;

record Struct__RASTERIZER_STATUS (
    nSize : Short,
    wFlags : Short,
    nLanguageID : Short,
);

alias RASTERIZER_STATUS = Struct__RASTERIZER_STATUS;

alias LPRASTERIZER_STATUS = Pointer[Struct__RASTERIZER_STATUS];

record Struct_tagPIXELFORMATDESCRIPTOR (
    nSize : WORD,
    nVersion : WORD,
    dwFlags : DWORD,
    iPixelType : BYTE,
    cColorBits : BYTE,
    cRedBits : BYTE,
    cRedShift : BYTE,
    cGreenBits : BYTE,
    cGreenShift : BYTE,
    cBlueBits : BYTE,
    cBlueShift : BYTE,
    cAlphaBits : BYTE,
    cAlphaShift : BYTE,
    cAccumBits : BYTE,
    cAccumRedBits : BYTE,
    cAccumGreenBits : BYTE,
    cAccumBlueBits : BYTE,
    cAccumAlphaBits : BYTE,
    cDepthBits : BYTE,
    cStencilBits : BYTE,
    cAuxBuffers : BYTE,
    iLayerType : BYTE,
    bReserved : BYTE,
    dwLayerMask : DWORD,
    dwVisibleMask : DWORD,
    dwDamageMask : DWORD,
);

alias PIXELFORMATDESCRIPTOR = Struct_tagPIXELFORMATDESCRIPTOR;

alias PPIXELFORMATDESCRIPTOR = Pointer[Struct_tagPIXELFORMATDESCRIPTOR];

alias LPPIXELFORMATDESCRIPTOR = Pointer[Struct_tagPIXELFORMATDESCRIPTOR];

alias OLDFONTENUMPROCA = StdCallCodePointer[[Pointer[LOGFONTA], Pointer[TEXTMETRICA], DWORD, LPARAM],[Int]];

alias OLDFONTENUMPROCW = StdCallCodePointer[[Pointer[LOGFONTW], Pointer[TEXTMETRICW], DWORD, LPARAM],[Int]];

alias FONTENUMPROCA = OLDFONTENUMPROCA;

alias FONTENUMPROCW = OLDFONTENUMPROCW;

alias FONTENUMPROC = FONTENUMPROCA;

alias GOBJENUMPROC = StdCallCodePointer[[LPVOID, LPARAM],[Int]];

alias LINEDDAPROC = StdCallCodePointer[[Int, Int, LPARAM],[]];

external (stdcall) AddFontResourceA(arg0:LPCSTR) : Int;

external (stdcall) AddFontResourceW(arg0:LPCWSTR) : Int;

external (stdcall) AnimatePalette(arg0:HPALETTE, arg1:UINT, arg2:UINT, arg3:Pointer[PALETTEENTRY]) : BOOL;

external (stdcall) Arc(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:Int, arg6:Int, arg7:Int, arg8:Int) : BOOL;

external (stdcall) BitBlt(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:HDC, arg6:Int, arg7:Int, arg8:DWORD) : BOOL;

external (stdcall) CancelDC(arg0:HDC) : BOOL;

external (stdcall) Chord(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:Int, arg6:Int, arg7:Int, arg8:Int) : BOOL;

external (stdcall) ChoosePixelFormat(arg0:HDC, arg1:Pointer[PIXELFORMATDESCRIPTOR]) : Int;

external (stdcall) CloseMetaFile(arg0:HDC) : HMETAFILE;

external (stdcall) CombineRgn(arg0:HRGN, arg1:HRGN, arg2:HRGN, arg3:Int) : Int;

external (stdcall) CopyMetaFileA(arg0:HMETAFILE, arg1:LPCSTR) : HMETAFILE;

external (stdcall) CopyMetaFileW(arg0:HMETAFILE, arg1:LPCWSTR) : HMETAFILE;

external (stdcall) CreateBitmap(arg0:Int, arg1:Int, arg2:UINT, arg3:UINT, arg4:OpaquePointer) : HBITMAP;

external (stdcall) CreateBitmapIndirect(arg0:Pointer[BITMAP]) : HBITMAP;

external (stdcall) CreateBrushIndirect(arg0:Pointer[LOGBRUSH]) : HBRUSH;

external (stdcall) CreateCompatibleBitmap(arg0:HDC, arg1:Int, arg2:Int) : HBITMAP;

external (stdcall) CreateDiscardableBitmap(arg0:HDC, arg1:Int, arg2:Int) : HBITMAP;

external (stdcall) CreateCompatibleDC(arg0:HDC) : HDC;

external (stdcall) CreateDCA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPCSTR, arg3:Pointer[DEVMODEA]) : HDC;

external (stdcall) CreateDCW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPCWSTR, arg3:Pointer[DEVMODEW]) : HDC;

external (stdcall) CreateDIBitmap(arg0:HDC, arg1:Pointer[BITMAPINFOHEADER], arg2:DWORD, arg3:OpaquePointer, arg4:Pointer[BITMAPINFO], arg5:UINT) : HBITMAP;

external (stdcall) CreateDIBPatternBrush(arg0:HGLOBAL, arg1:UINT) : HBRUSH;

external (stdcall) CreateDIBPatternBrushPt(arg0:OpaquePointer, arg1:UINT) : HBRUSH;

external (stdcall) CreateEllipticRgn(arg0:Int, arg1:Int, arg2:Int, arg3:Int) : HRGN;

external (stdcall) CreateEllipticRgnIndirect(arg0:Pointer[RECT]) : HRGN;

external (stdcall) CreateFontIndirectA(arg0:Pointer[LOGFONTA]) : HFONT;

external (stdcall) CreateFontIndirectW(arg0:Pointer[LOGFONTW]) : HFONT;

external (stdcall) CreateFontA(arg0:Int, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:DWORD, arg6:DWORD, arg7:DWORD, arg8:DWORD, arg9:DWORD, arg10:DWORD, arg11:DWORD, arg12:DWORD, arg13:LPCSTR) : HFONT;

external (stdcall) CreateFontW(arg0:Int, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:DWORD, arg6:DWORD, arg7:DWORD, arg8:DWORD, arg9:DWORD, arg10:DWORD, arg11:DWORD, arg12:DWORD, arg13:LPCWSTR) : HFONT;

external (stdcall) CreateHatchBrush(arg0:Int, arg1:COLORREF) : HBRUSH;

external (stdcall) CreateICA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPCSTR, arg3:Pointer[DEVMODEA]) : HDC;

external (stdcall) CreateICW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPCWSTR, arg3:Pointer[DEVMODEW]) : HDC;

external (stdcall) CreateMetaFileA(arg0:LPCSTR) : HDC;

external (stdcall) CreateMetaFileW(arg0:LPCWSTR) : HDC;

external (stdcall) CreatePalette(arg0:Pointer[LOGPALETTE]) : HPALETTE;

external (stdcall) CreatePen(arg0:Int, arg1:Int, arg2:COLORREF) : HPEN;

external (stdcall) CreatePenIndirect(arg0:Pointer[LOGPEN]) : HPEN;

external (stdcall) CreatePolyPolygonRgn(arg0:Pointer[POINT], arg1:Pointer[INT], arg2:Int, arg3:Int) : HRGN;

external (stdcall) CreatePatternBrush(arg0:HBITMAP) : HBRUSH;

external (stdcall) CreateRectRgn(arg0:Int, arg1:Int, arg2:Int, arg3:Int) : HRGN;

external (stdcall) CreateRectRgnIndirect(arg0:Pointer[RECT]) : HRGN;

external (stdcall) CreateRoundRectRgn(arg0:Int, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:Int) : HRGN;

external (stdcall) CreateScalableFontResourceA(arg0:DWORD, arg1:LPCSTR, arg2:LPCSTR, arg3:LPCSTR) : BOOL;

external (stdcall) CreateScalableFontResourceW(arg0:DWORD, arg1:LPCWSTR, arg2:LPCWSTR, arg3:LPCWSTR) : BOOL;

external (stdcall) CreateSolidBrush(arg0:COLORREF) : HBRUSH;

external (stdcall) DeleteDC(arg0:HDC) : BOOL;

external (stdcall) DeleteMetaFile(arg0:HMETAFILE) : BOOL;

external (stdcall) DeleteObject(arg0:HGDIOBJ) : BOOL;

external (stdcall) DescribePixelFormat(arg0:HDC, arg1:Int, arg2:UINT, arg3:LPPIXELFORMATDESCRIPTOR) : Int;

alias LPFNDEVMODE = StdCallCodePointer[[HWND, HMODULE, LPDEVMODE, LPSTR, LPSTR, LPDEVMODE, LPSTR, UINT],[UINT]];

alias LPFNDEVCAPS = StdCallCodePointer[[LPSTR, LPSTR, UINT, LPSTR, LPDEVMODE],[DWORD]];

external (stdcall) DeviceCapabilitiesA(arg0:LPCSTR, arg1:LPCSTR, arg2:WORD, arg3:LPSTR, arg4:Pointer[DEVMODEA]) : Int;

external (stdcall) DeviceCapabilitiesW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:WORD, arg3:LPWSTR, arg4:Pointer[DEVMODEW]) : Int;

external (stdcall) DrawEscape(arg0:HDC, arg1:Int, arg2:Int, arg3:LPCSTR) : Int;

external (stdcall) Ellipse(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int) : BOOL;

external (stdcall) EnumFontFamiliesExA(arg0:HDC, arg1:LPLOGFONTA, arg2:FONTENUMPROCA, arg3:LPARAM, arg4:DWORD) : Int;

external (stdcall) EnumFontFamiliesExW(arg0:HDC, arg1:LPLOGFONTW, arg2:FONTENUMPROCW, arg3:LPARAM, arg4:DWORD) : Int;

external (stdcall) EnumFontFamiliesA(arg0:HDC, arg1:LPCSTR, arg2:FONTENUMPROCA, arg3:LPARAM) : Int;

external (stdcall) EnumFontFamiliesW(arg0:HDC, arg1:LPCWSTR, arg2:FONTENUMPROCW, arg3:LPARAM) : Int;

external (stdcall) EnumFontsA(arg0:HDC, arg1:LPCSTR, arg2:FONTENUMPROCA, arg3:LPARAM) : Int;

external (stdcall) EnumFontsW(arg0:HDC, arg1:LPCWSTR, arg2:FONTENUMPROCW, arg3:LPARAM) : Int;

external (stdcall) EnumObjects(arg0:HDC, arg1:Int, arg2:GOBJENUMPROC, arg3:LPARAM) : Int;

external (stdcall) EqualRgn(arg0:HRGN, arg1:HRGN) : BOOL;

external (stdcall) Escape(arg0:HDC, arg1:Int, arg2:Int, arg3:LPCSTR, arg4:LPVOID) : Int;

external (stdcall) ExtEscape(arg0:HDC, arg1:Int, arg2:Int, arg3:LPCSTR, arg4:Int, arg5:LPSTR) : Int;

external (stdcall) ExcludeClipRect(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int) : Int;

external (stdcall) ExtCreateRegion(arg0:Pointer[XFORM], arg1:DWORD, arg2:Pointer[RGNDATA]) : HRGN;

external (stdcall) ExtFloodFill(arg0:HDC, arg1:Int, arg2:Int, arg3:COLORREF, arg4:UINT) : BOOL;

external (stdcall) FillRgn(arg0:HDC, arg1:HRGN, arg2:HBRUSH) : BOOL;

external (stdcall) FloodFill(arg0:HDC, arg1:Int, arg2:Int, arg3:COLORREF) : BOOL;

external (stdcall) FrameRgn(arg0:HDC, arg1:HRGN, arg2:HBRUSH, arg3:Int, arg4:Int) : BOOL;

external (stdcall) GetROP2(arg0:HDC) : Int;

external (stdcall) GetAspectRatioFilterEx(arg0:HDC, arg1:LPSIZE) : BOOL;

external (stdcall) GetBkColor(arg0:HDC) : COLORREF;

external (stdcall) GetDCBrushColor(arg0:HDC) : COLORREF;

external (stdcall) GetDCPenColor(arg0:HDC) : COLORREF;

external (stdcall) GetBkMode(arg0:HDC) : Int;

external (stdcall) GetBitmapBits(arg0:HBITMAP, arg1:LONG, arg2:LPVOID) : LONG;

external (stdcall) GetBitmapDimensionEx(arg0:HBITMAP, arg1:LPSIZE) : BOOL;

external (stdcall) GetBoundsRect(arg0:HDC, arg1:LPRECT, arg2:UINT) : UINT;

external (stdcall) GetBrushOrgEx(arg0:HDC, arg1:LPPOINT) : BOOL;

external (stdcall) GetCharWidthA(arg0:HDC, arg1:UINT, arg2:UINT, arg3:LPINT) : BOOL;

external (stdcall) GetCharWidthW(arg0:HDC, arg1:UINT, arg2:UINT, arg3:LPINT) : BOOL;

external (stdcall) GetCharWidth32A(arg0:HDC, arg1:UINT, arg2:UINT, arg3:LPINT) : BOOL;

external (stdcall) GetCharWidth32W(arg0:HDC, arg1:UINT, arg2:UINT, arg3:LPINT) : BOOL;

external (stdcall) GetCharWidthFloatA(arg0:HDC, arg1:UINT, arg2:UINT, arg3:PFLOAT) : BOOL;

external (stdcall) GetCharWidthFloatW(arg0:HDC, arg1:UINT, arg2:UINT, arg3:PFLOAT) : BOOL;

external (stdcall) GetCharABCWidthsA(arg0:HDC, arg1:UINT, arg2:UINT, arg3:LPABC) : BOOL;

external (stdcall) GetCharABCWidthsW(arg0:HDC, arg1:UINT, arg2:UINT, arg3:LPABC) : BOOL;

external (stdcall) GetCharABCWidthsFloatA(arg0:HDC, arg1:UINT, arg2:UINT, arg3:LPABCFLOAT) : BOOL;

external (stdcall) GetCharABCWidthsFloatW(arg0:HDC, arg1:UINT, arg2:UINT, arg3:LPABCFLOAT) : BOOL;

external (stdcall) GetClipBox(arg0:HDC, arg1:LPRECT) : Int;

external (stdcall) GetClipRgn(arg0:HDC, arg1:HRGN) : Int;

external (stdcall) GetMetaRgn(arg0:HDC, arg1:HRGN) : Int;

external (stdcall) GetCurrentObject(arg0:HDC, arg1:UINT) : HGDIOBJ;

external (stdcall) GetCurrentPositionEx(arg0:HDC, arg1:LPPOINT) : BOOL;

external (stdcall) GetDeviceCaps(arg0:HDC, arg1:Int) : Int;

external (stdcall) GetDIBits(arg0:HDC, arg1:HBITMAP, arg2:UINT, arg3:UINT, arg4:LPVOID, arg5:LPBITMAPINFO, arg6:UINT) : Int;

external (stdcall) GetFontData(arg0:HDC, arg1:DWORD, arg2:DWORD, arg3:PVOID, arg4:DWORD) : DWORD;

external (stdcall) GetGlyphOutlineA(arg0:HDC, arg1:UINT, arg2:UINT, arg3:LPGLYPHMETRICS, arg4:DWORD, arg5:LPVOID, arg6:Pointer[MAT2]) : DWORD;

external (stdcall) GetGlyphOutlineW(arg0:HDC, arg1:UINT, arg2:UINT, arg3:LPGLYPHMETRICS, arg4:DWORD, arg5:LPVOID, arg6:Pointer[MAT2]) : DWORD;

external (stdcall) GetGraphicsMode(arg0:HDC) : Int;

external (stdcall) GetMapMode(arg0:HDC) : Int;

external (stdcall) GetMetaFileBitsEx(arg0:HMETAFILE, arg1:UINT, arg2:LPVOID) : UINT;

external (stdcall) GetMetaFileA(arg0:LPCSTR) : HMETAFILE;

external (stdcall) GetMetaFileW(arg0:LPCWSTR) : HMETAFILE;

external (stdcall) GetNearestColor(arg0:HDC, arg1:COLORREF) : COLORREF;

external (stdcall) GetNearestPaletteIndex(arg0:HPALETTE, arg1:COLORREF) : UINT;

external (stdcall) GetObjectType(arg0:HGDIOBJ) : DWORD;

external (stdcall) GetOutlineTextMetricsA(arg0:HDC, arg1:UINT, arg2:LPOUTLINETEXTMETRICA) : UINT;

external (stdcall) GetOutlineTextMetricsW(arg0:HDC, arg1:UINT, arg2:LPOUTLINETEXTMETRICW) : UINT;

external (stdcall) GetPaletteEntries(arg0:HPALETTE, arg1:UINT, arg2:UINT, arg3:LPPALETTEENTRY) : UINT;

external (stdcall) GetPixel(arg0:HDC, arg1:Int, arg2:Int) : COLORREF;

external (stdcall) GetPixelFormat(arg0:HDC) : Int;

external (stdcall) GetPolyFillMode(arg0:HDC) : Int;

external (stdcall) GetRasterizerCaps(arg0:LPRASTERIZER_STATUS, arg1:UINT) : BOOL;

external (stdcall) GetRandomRgn(arg0:HDC, arg1:HRGN, arg2:INT) : Int;

external (stdcall) GetRegionData(arg0:HRGN, arg1:DWORD, arg2:LPRGNDATA) : DWORD;

external (stdcall) GetRgnBox(arg0:HRGN, arg1:LPRECT) : Int;

external (stdcall) GetStockObject(arg0:Int) : HGDIOBJ;

external (stdcall) GetStretchBltMode(arg0:HDC) : Int;

external (stdcall) GetSystemPaletteEntries(arg0:HDC, arg1:UINT, arg2:UINT, arg3:LPPALETTEENTRY) : UINT;

external (stdcall) GetSystemPaletteUse(arg0:HDC) : UINT;

external (stdcall) GetTextCharacterExtra(arg0:HDC) : Int;

external (stdcall) GetTextAlign(arg0:HDC) : UINT;

external (stdcall) GetTextColor(arg0:HDC) : COLORREF;

external (stdcall) GetTextExtentPointA(arg0:HDC, arg1:LPCSTR, arg2:Int, arg3:LPSIZE) : BOOL;

external (stdcall) GetTextExtentPointW(arg0:HDC, arg1:LPCWSTR, arg2:Int, arg3:LPSIZE) : BOOL;

external (stdcall) GetTextExtentPoint32A(arg0:HDC, arg1:LPCSTR, arg2:Int, arg3:LPSIZE) : BOOL;

external (stdcall) GetTextExtentPoint32W(arg0:HDC, arg1:LPCWSTR, arg2:Int, arg3:LPSIZE) : BOOL;

external (stdcall) GetTextExtentExPointA(arg0:HDC, arg1:LPCSTR, arg2:Int, arg3:Int, arg4:LPINT, arg5:LPINT, arg6:LPSIZE) : BOOL;

external (stdcall) GetTextExtentExPointW(arg0:HDC, arg1:LPCWSTR, arg2:Int, arg3:Int, arg4:LPINT, arg5:LPINT, arg6:LPSIZE) : BOOL;

external (stdcall) GetTextCharset(arg0:HDC) : Int;

external (stdcall) GetTextCharsetInfo(arg0:HDC, arg1:LPFONTSIGNATURE, arg2:DWORD) : Int;

external (stdcall) TranslateCharsetInfo(arg0:Pointer[DWORD], arg1:LPCHARSETINFO, arg2:DWORD) : BOOL;

external (stdcall) GetFontLanguageInfo(arg0:HDC) : DWORD;

external (stdcall) GetCharacterPlacementA(arg0:HDC, arg1:LPCSTR, arg2:Int, arg3:Int, arg4:LPGCP_RESULTSA, arg5:DWORD) : DWORD;

external (stdcall) GetCharacterPlacementW(arg0:HDC, arg1:LPCWSTR, arg2:Int, arg3:Int, arg4:LPGCP_RESULTSW, arg5:DWORD) : DWORD;

record Struct_tagWCRANGE (
    wcLow : WCHAR,
    cGlyphs : USHORT,
);

alias WCRANGE = Struct_tagWCRANGE;

alias PWCRANGE = Pointer[Struct_tagWCRANGE];

alias LPWCRANGE = Pointer[Struct_tagWCRANGE];

record Struct_tagGLYPHSET (
    cbThis : DWORD,
    flAccel : DWORD,
    cGlyphsSupported : DWORD,
    cRanges : DWORD,
    ranges : Array[WCRANGE, 1],
);

alias GLYPHSET = Struct_tagGLYPHSET;

alias PGLYPHSET = Pointer[Struct_tagGLYPHSET];

alias LPGLYPHSET = Pointer[Struct_tagGLYPHSET];

external (stdcall) GetFontUnicodeRanges(arg0:HDC, arg1:LPGLYPHSET) : DWORD;

external (stdcall) GetGlyphIndicesA(arg0:HDC, arg1:LPCSTR, arg2:Int, arg3:LPWORD, arg4:DWORD) : DWORD;

external (stdcall) GetGlyphIndicesW(arg0:HDC, arg1:LPCWSTR, arg2:Int, arg3:LPWORD, arg4:DWORD) : DWORD;

external (stdcall) GetTextExtentPointI(arg0:HDC, arg1:LPWORD, arg2:Int, arg3:LPSIZE) : BOOL;

external (stdcall) GetTextExtentExPointI(arg0:HDC, arg1:LPWORD, arg2:Int, arg3:Int, arg4:LPINT, arg5:LPINT, arg6:LPSIZE) : BOOL;

external (stdcall) GetCharWidthI(arg0:HDC, arg1:UINT, arg2:UINT, arg3:LPWORD, arg4:LPINT) : BOOL;

external (stdcall) GetCharABCWidthsI(arg0:HDC, arg1:UINT, arg2:UINT, arg3:LPWORD, arg4:LPABC) : BOOL;

record Struct_tagDESIGNVECTOR (
    dvReserved : DWORD,
    dvNumAxes : DWORD,
    dvValues : Array[LONG, 16],
);

alias DESIGNVECTOR = Struct_tagDESIGNVECTOR;

alias PDESIGNVECTOR = Pointer[Struct_tagDESIGNVECTOR];

alias LPDESIGNVECTOR = Pointer[Struct_tagDESIGNVECTOR];

external (stdcall) AddFontResourceExA(arg0:LPCSTR, arg1:DWORD, arg2:PVOID) : Int;

external (stdcall) AddFontResourceExW(arg0:LPCWSTR, arg1:DWORD, arg2:PVOID) : Int;

external (stdcall) RemoveFontResourceExA(arg0:LPCSTR, arg1:DWORD, arg2:PVOID) : BOOL;

external (stdcall) RemoveFontResourceExW(arg0:LPCWSTR, arg1:DWORD, arg2:PVOID) : BOOL;

external (stdcall) AddFontMemResourceEx(arg0:PVOID, arg1:DWORD, arg2:PVOID, arg3:Pointer[DWORD]) : HANDLE;

external (stdcall) RemoveFontMemResourceEx(arg0:HANDLE) : BOOL;

record Struct_tagAXISINFOA (
    axMinValue : LONG,
    axMaxValue : LONG,
    axAxisName : Array[BYTE, 16],
);

alias AXISINFOA = Struct_tagAXISINFOA;

alias PAXISINFOA = Pointer[Struct_tagAXISINFOA];

alias LPAXISINFOA = Pointer[Struct_tagAXISINFOA];

record Struct_tagAXISINFOW (
    axMinValue : LONG,
    axMaxValue : LONG,
    axAxisName : Array[WCHAR, 16],
);

alias AXISINFOW = Struct_tagAXISINFOW;

alias PAXISINFOW = Pointer[Struct_tagAXISINFOW];

alias LPAXISINFOW = Pointer[Struct_tagAXISINFOW];

alias AXISINFO = AXISINFOA;

alias PAXISINFO = PAXISINFOA;

alias LPAXISINFO = LPAXISINFOA;

record Struct_tagAXESLISTA (
    axlReserved : DWORD,
    axlNumAxes : DWORD,
    axlAxisInfo : Array[AXISINFOA, 16],
);

alias AXESLISTA = Struct_tagAXESLISTA;

alias PAXESLISTA = Pointer[Struct_tagAXESLISTA];

alias LPAXESLISTA = Pointer[Struct_tagAXESLISTA];

record Struct_tagAXESLISTW (
    axlReserved : DWORD,
    axlNumAxes : DWORD,
    axlAxisInfo : Array[AXISINFOW, 16],
);

alias AXESLISTW = Struct_tagAXESLISTW;

alias PAXESLISTW = Pointer[Struct_tagAXESLISTW];

alias LPAXESLISTW = Pointer[Struct_tagAXESLISTW];

alias AXESLIST = AXESLISTA;

alias PAXESLIST = PAXESLISTA;

alias LPAXESLIST = LPAXESLISTA;

record Struct_tagENUMLOGFONTEXDVA (
    elfEnumLogfontEx : ENUMLOGFONTEXA,
    elfDesignVector : DESIGNVECTOR,
);

alias ENUMLOGFONTEXDVA = Struct_tagENUMLOGFONTEXDVA;

alias PENUMLOGFONTEXDVA = Pointer[Struct_tagENUMLOGFONTEXDVA];

alias LPENUMLOGFONTEXDVA = Pointer[Struct_tagENUMLOGFONTEXDVA];

record Struct_tagENUMLOGFONTEXDVW (
    elfEnumLogfontEx : ENUMLOGFONTEXW,
    elfDesignVector : DESIGNVECTOR,
);

alias ENUMLOGFONTEXDVW = Struct_tagENUMLOGFONTEXDVW;

alias PENUMLOGFONTEXDVW = Pointer[Struct_tagENUMLOGFONTEXDVW];

alias LPENUMLOGFONTEXDVW = Pointer[Struct_tagENUMLOGFONTEXDVW];

alias ENUMLOGFONTEXDV = ENUMLOGFONTEXDVA;

alias PENUMLOGFONTEXDV = PENUMLOGFONTEXDVA;

alias LPENUMLOGFONTEXDV = LPENUMLOGFONTEXDVA;

external (stdcall) CreateFontIndirectExA(arg0:Pointer[ENUMLOGFONTEXDVA]) : HFONT;

external (stdcall) CreateFontIndirectExW(arg0:Pointer[ENUMLOGFONTEXDVW]) : HFONT;

record Struct_tagENUMTEXTMETRICA (
    etmNewTextMetricEx : NEWTEXTMETRICEXA,
    etmAxesList : AXESLISTA,
);

alias ENUMTEXTMETRICA = Struct_tagENUMTEXTMETRICA;

alias PENUMTEXTMETRICA = Pointer[Struct_tagENUMTEXTMETRICA];

alias LPENUMTEXTMETRICA = Pointer[Struct_tagENUMTEXTMETRICA];

record Struct_tagENUMTEXTMETRICW (
    etmNewTextMetricEx : NEWTEXTMETRICEXW,
    etmAxesList : AXESLISTW,
);

alias ENUMTEXTMETRICW = Struct_tagENUMTEXTMETRICW;

alias PENUMTEXTMETRICW = Pointer[Struct_tagENUMTEXTMETRICW];

alias LPENUMTEXTMETRICW = Pointer[Struct_tagENUMTEXTMETRICW];

alias ENUMTEXTMETRIC = ENUMTEXTMETRICA;

alias PENUMTEXTMETRIC = PENUMTEXTMETRICA;

alias LPENUMTEXTMETRIC = LPENUMTEXTMETRICA;

external (stdcall) GetViewportExtEx(arg0:HDC, arg1:LPSIZE) : BOOL;

external (stdcall) GetViewportOrgEx(arg0:HDC, arg1:LPPOINT) : BOOL;

external (stdcall) GetWindowExtEx(arg0:HDC, arg1:LPSIZE) : BOOL;

external (stdcall) GetWindowOrgEx(arg0:HDC, arg1:LPPOINT) : BOOL;

external (stdcall) IntersectClipRect(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int) : Int;

external (stdcall) InvertRgn(arg0:HDC, arg1:HRGN) : BOOL;

external (stdcall) LineDDA(arg0:Int, arg1:Int, arg2:Int, arg3:Int, arg4:LINEDDAPROC, arg5:LPARAM) : BOOL;

external (stdcall) LineTo(arg0:HDC, arg1:Int, arg2:Int) : BOOL;

external (stdcall) MaskBlt(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:HDC, arg6:Int, arg7:Int, arg8:HBITMAP, arg9:Int, arg10:Int, arg11:DWORD) : BOOL;

external (stdcall) PlgBlt(arg0:HDC, arg1:Pointer[POINT], arg2:HDC, arg3:Int, arg4:Int, arg5:Int, arg6:Int, arg7:HBITMAP, arg8:Int, arg9:Int) : BOOL;

external (stdcall) OffsetClipRgn(arg0:HDC, arg1:Int, arg2:Int) : Int;

external (stdcall) OffsetRgn(arg0:HRGN, arg1:Int, arg2:Int) : Int;

external (stdcall) PatBlt(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:DWORD) : BOOL;

external (stdcall) Pie(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:Int, arg6:Int, arg7:Int, arg8:Int) : BOOL;

external (stdcall) PlayMetaFile(arg0:HDC, arg1:HMETAFILE) : BOOL;

external (stdcall) PaintRgn(arg0:HDC, arg1:HRGN) : BOOL;

external (stdcall) PolyPolygon(arg0:HDC, arg1:Pointer[POINT], arg2:Pointer[INT], arg3:Int) : BOOL;

external (stdcall) PtInRegion(arg0:HRGN, arg1:Int, arg2:Int) : BOOL;

external (stdcall) PtVisible(arg0:HDC, arg1:Int, arg2:Int) : BOOL;

external (stdcall) RectInRegion(arg0:HRGN, arg1:Pointer[RECT]) : BOOL;

external (stdcall) RectVisible(arg0:HDC, arg1:Pointer[RECT]) : BOOL;

external (stdcall) Rectangle(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int) : BOOL;

external (stdcall) RestoreDC(arg0:HDC, arg1:Int) : BOOL;

external (stdcall) ResetDCA(arg0:HDC, arg1:Pointer[DEVMODEA]) : HDC;

external (stdcall) ResetDCW(arg0:HDC, arg1:Pointer[DEVMODEW]) : HDC;

external (stdcall) RealizePalette(arg0:HDC) : UINT;

external (stdcall) RemoveFontResourceA(arg0:LPCSTR) : BOOL;

external (stdcall) RemoveFontResourceW(arg0:LPCWSTR) : BOOL;

external (stdcall) RoundRect(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:Int, arg6:Int) : BOOL;

external (stdcall) ResizePalette(arg0:HPALETTE, arg1:UINT) : BOOL;

external (stdcall) SaveDC(arg0:HDC) : Int;

external (stdcall) SelectClipRgn(arg0:HDC, arg1:HRGN) : Int;

external (stdcall) ExtSelectClipRgn(arg0:HDC, arg1:HRGN, arg2:Int) : Int;

external (stdcall) SetMetaRgn(arg0:HDC) : Int;

external (stdcall) SelectObject(arg0:HDC, arg1:HGDIOBJ) : HGDIOBJ;

external (stdcall) SelectPalette(arg0:HDC, arg1:HPALETTE, arg2:BOOL) : HPALETTE;

external (stdcall) SetBkColor(arg0:HDC, arg1:COLORREF) : COLORREF;

external (stdcall) SetDCBrushColor(arg0:HDC, arg1:COLORREF) : COLORREF;

external (stdcall) SetDCPenColor(arg0:HDC, arg1:COLORREF) : COLORREF;

external (stdcall) SetBkMode(arg0:HDC, arg1:Int) : Int;

external (stdcall) SetBitmapBits(arg0:HBITMAP, arg1:DWORD, arg2:OpaquePointer) : LONG;

external (stdcall) SetBoundsRect(arg0:HDC, arg1:Pointer[RECT], arg2:UINT) : UINT;

external (stdcall) SetDIBits(arg0:HDC, arg1:HBITMAP, arg2:UINT, arg3:UINT, arg4:OpaquePointer, arg5:Pointer[BITMAPINFO], arg6:UINT) : Int;

external (stdcall) SetDIBitsToDevice(arg0:HDC, arg1:Int, arg2:Int, arg3:DWORD, arg4:DWORD, arg5:Int, arg6:Int, arg7:UINT, arg8:UINT, arg9:OpaquePointer, arg10:Pointer[BITMAPINFO], arg11:UINT) : Int;

external (stdcall) SetMapperFlags(arg0:HDC, arg1:DWORD) : DWORD;

external (stdcall) SetGraphicsMode(arg0:HDC, arg1:Int) : Int;

external (stdcall) SetMapMode(arg0:HDC, arg1:Int) : Int;

external (stdcall) SetLayout(arg0:HDC, arg1:DWORD) : DWORD;

external (stdcall) GetLayout(arg0:HDC) : DWORD;

external (stdcall) SetMetaFileBitsEx(arg0:UINT, arg1:Pointer[BYTE]) : HMETAFILE;

external (stdcall) SetPaletteEntries(arg0:HPALETTE, arg1:UINT, arg2:UINT, arg3:Pointer[PALETTEENTRY]) : UINT;

external (stdcall) SetPixel(arg0:HDC, arg1:Int, arg2:Int, arg3:COLORREF) : COLORREF;

external (stdcall) SetPixelV(arg0:HDC, arg1:Int, arg2:Int, arg3:COLORREF) : BOOL;

external (stdcall) SetPixelFormat(arg0:HDC, arg1:Int, arg2:Pointer[PIXELFORMATDESCRIPTOR]) : BOOL;

external (stdcall) SetPolyFillMode(arg0:HDC, arg1:Int) : Int;

external (stdcall) StretchBlt(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:HDC, arg6:Int, arg7:Int, arg8:Int, arg9:Int, arg10:DWORD) : BOOL;

external (stdcall) SetRectRgn(arg0:HRGN, arg1:Int, arg2:Int, arg3:Int, arg4:Int) : BOOL;

external (stdcall) StretchDIBits(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:Int, arg6:Int, arg7:Int, arg8:Int, arg9:OpaquePointer, arg10:Pointer[BITMAPINFO], arg11:UINT, arg12:DWORD) : Int;

external (stdcall) SetROP2(arg0:HDC, arg1:Int) : Int;

external (stdcall) SetStretchBltMode(arg0:HDC, arg1:Int) : Int;

external (stdcall) SetSystemPaletteUse(arg0:HDC, arg1:UINT) : UINT;

external (stdcall) SetTextCharacterExtra(arg0:HDC, arg1:Int) : Int;

external (stdcall) SetTextColor(arg0:HDC, arg1:COLORREF) : COLORREF;

external (stdcall) SetTextAlign(arg0:HDC, arg1:UINT) : UINT;

external (stdcall) SetTextJustification(arg0:HDC, arg1:Int, arg2:Int) : BOOL;

external (stdcall) UpdateColors(arg0:HDC) : BOOL;

alias COLOR16 = USHORT;

record Struct__TRIVERTEX (
    x : LONG,
    y : LONG,
    Red : COLOR16,
    Green : COLOR16,
    Blue : COLOR16,
    Alpha : COLOR16,
);

alias TRIVERTEX = Struct__TRIVERTEX;

alias PTRIVERTEX = Pointer[Struct__TRIVERTEX];

alias LPTRIVERTEX = Pointer[Struct__TRIVERTEX];

record Struct__GRADIENT_TRIANGLE (
    Vertex1 : ULONG,
    Vertex2 : ULONG,
    Vertex3 : ULONG,
);

alias GRADIENT_TRIANGLE = Struct__GRADIENT_TRIANGLE;

alias PGRADIENT_TRIANGLE = Pointer[Struct__GRADIENT_TRIANGLE];

alias LPGRADIENT_TRIANGLE = Pointer[Struct__GRADIENT_TRIANGLE];

record Struct__GRADIENT_RECT (
    UpperLeft : ULONG,
    LowerRight : ULONG,
);

alias GRADIENT_RECT = Struct__GRADIENT_RECT;

alias PGRADIENT_RECT = Pointer[Struct__GRADIENT_RECT];

alias LPGRADIENT_RECT = Pointer[Struct__GRADIENT_RECT];

record Struct__BLENDFUNCTION (
    BlendOp : BYTE,
    BlendFlags : BYTE,
    SourceConstantAlpha : BYTE,
    AlphaFormat : BYTE,
);

alias BLENDFUNCTION = Struct__BLENDFUNCTION;

alias PBLENDFUNCTION = Pointer[Struct__BLENDFUNCTION];

external (stdcall) AlphaBlend(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:HDC, arg6:Int, arg7:Int, arg8:Int, arg9:Int, arg10:BLENDFUNCTION) : BOOL;

external (stdcall) TransparentBlt(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:HDC, arg6:Int, arg7:Int, arg8:Int, arg9:Int, arg10:UINT) : BOOL;

external (stdcall) GradientFill(arg0:HDC, arg1:PTRIVERTEX, arg2:ULONG, arg3:PVOID, arg4:ULONG, arg5:ULONG) : BOOL;

external (stdcall) GdiAlphaBlend(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:HDC, arg6:Int, arg7:Int, arg8:Int, arg9:Int, arg10:BLENDFUNCTION) : BOOL;

external (stdcall) GdiTransparentBlt(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:HDC, arg6:Int, arg7:Int, arg8:Int, arg9:Int, arg10:UINT) : BOOL;

external (stdcall) GdiGradientFill(arg0:HDC, arg1:PTRIVERTEX, arg2:ULONG, arg3:PVOID, arg4:ULONG, arg5:ULONG) : BOOL;

external (stdcall) PlayMetaFileRecord(arg0:HDC, arg1:LPHANDLETABLE, arg2:LPMETARECORD, arg3:UINT) : BOOL;

alias MFENUMPROC = StdCallCodePointer[[HDC, Pointer[HANDLETABLE], Pointer[METARECORD], Int, LPARAM],[Int]];

external (stdcall) EnumMetaFile(arg0:HDC, arg1:HMETAFILE, arg2:MFENUMPROC, arg3:LPARAM) : BOOL;

alias ENHMFENUMPROC = StdCallCodePointer[[HDC, Pointer[HANDLETABLE], Pointer[ENHMETARECORD], Int, LPARAM],[Int]];

external (stdcall) CloseEnhMetaFile(arg0:HDC) : HENHMETAFILE;

external (stdcall) CopyEnhMetaFileA(arg0:HENHMETAFILE, arg1:LPCSTR) : HENHMETAFILE;

external (stdcall) CopyEnhMetaFileW(arg0:HENHMETAFILE, arg1:LPCWSTR) : HENHMETAFILE;

external (stdcall) CreateEnhMetaFileA(arg0:HDC, arg1:LPCSTR, arg2:Pointer[RECT], arg3:LPCSTR) : HDC;

external (stdcall) CreateEnhMetaFileW(arg0:HDC, arg1:LPCWSTR, arg2:Pointer[RECT], arg3:LPCWSTR) : HDC;

external (stdcall) DeleteEnhMetaFile(arg0:HENHMETAFILE) : BOOL;

external (stdcall) EnumEnhMetaFile(arg0:HDC, arg1:HENHMETAFILE, arg2:ENHMFENUMPROC, arg3:LPVOID, arg4:Pointer[RECT]) : BOOL;

external (stdcall) GetEnhMetaFileA(arg0:LPCSTR) : HENHMETAFILE;

external (stdcall) GetEnhMetaFileW(arg0:LPCWSTR) : HENHMETAFILE;

external (stdcall) GetEnhMetaFileBits(arg0:HENHMETAFILE, arg1:UINT, arg2:LPBYTE) : UINT;

external (stdcall) GetEnhMetaFileDescriptionA(arg0:HENHMETAFILE, arg1:UINT, arg2:LPSTR) : UINT;

external (stdcall) GetEnhMetaFileDescriptionW(arg0:HENHMETAFILE, arg1:UINT, arg2:LPWSTR) : UINT;

external (stdcall) GetEnhMetaFileHeader(arg0:HENHMETAFILE, arg1:UINT, arg2:LPENHMETAHEADER) : UINT;

external (stdcall) GetEnhMetaFilePaletteEntries(arg0:HENHMETAFILE, arg1:UINT, arg2:LPPALETTEENTRY) : UINT;

external (stdcall) GetEnhMetaFilePixelFormat(arg0:HENHMETAFILE, arg1:UINT, arg2:Pointer[PIXELFORMATDESCRIPTOR]) : UINT;

external (stdcall) GetWinMetaFileBits(arg0:HENHMETAFILE, arg1:UINT, arg2:LPBYTE, arg3:INT, arg4:HDC) : UINT;

external (stdcall) PlayEnhMetaFile(arg0:HDC, arg1:HENHMETAFILE, arg2:Pointer[RECT]) : BOOL;

external (stdcall) PlayEnhMetaFileRecord(arg0:HDC, arg1:LPHANDLETABLE, arg2:Pointer[ENHMETARECORD], arg3:UINT) : BOOL;

external (stdcall) SetEnhMetaFileBits(arg0:UINT, arg1:Pointer[BYTE]) : HENHMETAFILE;

external (stdcall) SetWinMetaFileBits(arg0:UINT, arg1:Pointer[BYTE], arg2:HDC, arg3:Pointer[METAFILEPICT]) : HENHMETAFILE;

external (stdcall) GdiComment(arg0:HDC, arg1:UINT, arg2:Pointer[BYTE]) : BOOL;

external (stdcall) GetTextMetricsA(arg0:HDC, arg1:LPTEXTMETRICA) : BOOL;

external (stdcall) GetTextMetricsW(arg0:HDC, arg1:LPTEXTMETRICW) : BOOL;

record Struct_tagDIBSECTION (
    dsBm : BITMAP,
    dsBmih : BITMAPINFOHEADER,
    dsBitfields : Array[DWORD, 3],
    dshSection : HANDLE,
    dsOffset : DWORD,
);

alias DIBSECTION = Struct_tagDIBSECTION;

alias LPDIBSECTION = Pointer[Struct_tagDIBSECTION];

alias PDIBSECTION = Pointer[Struct_tagDIBSECTION];

external (stdcall) AngleArc(arg0:HDC, arg1:Int, arg2:Int, arg3:DWORD, arg4:FLOAT, arg5:FLOAT) : BOOL;

external (stdcall) PolyPolyline(arg0:HDC, arg1:Pointer[POINT], arg2:Pointer[DWORD], arg3:DWORD) : BOOL;

external (stdcall) GetWorldTransform(arg0:HDC, arg1:LPXFORM) : BOOL;

external (stdcall) SetWorldTransform(arg0:HDC, arg1:Pointer[XFORM]) : BOOL;

external (stdcall) ModifyWorldTransform(arg0:HDC, arg1:Pointer[XFORM], arg2:DWORD) : BOOL;

external (stdcall) CombineTransform(arg0:LPXFORM, arg1:Pointer[XFORM], arg2:Pointer[XFORM]) : BOOL;

external (stdcall) CreateDIBSection(arg0:HDC, arg1:Pointer[BITMAPINFO], arg2:UINT, arg3:Pointer[OpaquePointer], arg4:HANDLE, arg5:DWORD) : HBITMAP;

external (stdcall) GetDIBColorTable(arg0:HDC, arg1:UINT, arg2:UINT, arg3:Pointer[RGBQUAD]) : UINT;

external (stdcall) SetDIBColorTable(arg0:HDC, arg1:UINT, arg2:UINT, arg3:Pointer[RGBQUAD]) : UINT;

record Struct_tagCOLORADJUSTMENT (
    caSize : WORD,
    caFlags : WORD,
    caIlluminantIndex : WORD,
    caRedGamma : WORD,
    caGreenGamma : WORD,
    caBlueGamma : WORD,
    caReferenceBlack : WORD,
    caReferenceWhite : WORD,
    caContrast : SHORT,
    caBrightness : SHORT,
    caColorfulness : SHORT,
    caRedGreenTint : SHORT,
);

alias COLORADJUSTMENT = Struct_tagCOLORADJUSTMENT;

alias PCOLORADJUSTMENT = Pointer[Struct_tagCOLORADJUSTMENT];

alias LPCOLORADJUSTMENT = Pointer[Struct_tagCOLORADJUSTMENT];

external (stdcall) SetColorAdjustment(arg0:HDC, arg1:Pointer[COLORADJUSTMENT]) : BOOL;

external (stdcall) GetColorAdjustment(arg0:HDC, arg1:LPCOLORADJUSTMENT) : BOOL;

external (stdcall) CreateHalftonePalette(arg0:HDC) : HPALETTE;

alias ABORTPROC = StdCallCodePointer[[HDC, Int],[BOOL]];

record Struct__DOCINFOA (
    cbSize : Int,
    lpszDocName : LPCSTR,
    lpszOutput : LPCSTR,
    lpszDatatype : LPCSTR,
    fwType : DWORD,
);

alias DOCINFOA = Struct__DOCINFOA;

alias LPDOCINFOA = Pointer[Struct__DOCINFOA];

record Struct__DOCINFOW (
    cbSize : Int,
    lpszDocName : LPCWSTR,
    lpszOutput : LPCWSTR,
    lpszDatatype : LPCWSTR,
    fwType : DWORD,
);

alias DOCINFOW = Struct__DOCINFOW;

alias LPDOCINFOW = Pointer[Struct__DOCINFOW];

alias DOCINFO = DOCINFOA;

alias LPDOCINFO = LPDOCINFOA;

external (stdcall) StartDocA(arg0:HDC, arg1:Pointer[DOCINFOA]) : Int;

external (stdcall) StartDocW(arg0:HDC, arg1:Pointer[DOCINFOW]) : Int;

external (stdcall) EndDoc(arg0:HDC) : Int;

external (stdcall) StartPage(arg0:HDC) : Int;

external (stdcall) EndPage(arg0:HDC) : Int;

external (stdcall) AbortDoc(arg0:HDC) : Int;

external (stdcall) SetAbortProc(arg0:HDC, arg1:ABORTPROC) : Int;

external (stdcall) AbortPath(arg0:HDC) : BOOL;

external (stdcall) ArcTo(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:Int, arg6:Int, arg7:Int, arg8:Int) : BOOL;

external (stdcall) BeginPath(arg0:HDC) : BOOL;

external (stdcall) CloseFigure(arg0:HDC) : BOOL;

external (stdcall) EndPath(arg0:HDC) : BOOL;

external (stdcall) FillPath(arg0:HDC) : BOOL;

external (stdcall) FlattenPath(arg0:HDC) : BOOL;

external (stdcall) GetPath(arg0:HDC, arg1:LPPOINT, arg2:LPBYTE, arg3:Int) : Int;

external (stdcall) PathToRegion(arg0:HDC) : HRGN;

external (stdcall) PolyDraw(arg0:HDC, arg1:Pointer[POINT], arg2:Pointer[BYTE], arg3:Int) : BOOL;

external (stdcall) SelectClipPath(arg0:HDC, arg1:Int) : BOOL;

external (stdcall) SetArcDirection(arg0:HDC, arg1:Int) : Int;

external (stdcall) SetMiterLimit(arg0:HDC, arg1:FLOAT, arg2:PFLOAT) : BOOL;

external (stdcall) StrokeAndFillPath(arg0:HDC) : BOOL;

external (stdcall) StrokePath(arg0:HDC) : BOOL;

external (stdcall) WidenPath(arg0:HDC) : BOOL;

external (stdcall) ExtCreatePen(arg0:DWORD, arg1:DWORD, arg2:Pointer[LOGBRUSH], arg3:DWORD, arg4:Pointer[DWORD]) : HPEN;

external (stdcall) GetMiterLimit(arg0:HDC, arg1:PFLOAT) : BOOL;

external (stdcall) GetArcDirection(arg0:HDC) : Int;

external (stdcall) GetObjectA(arg0:HANDLE, arg1:Int, arg2:LPVOID) : Int;

external (stdcall) GetObjectW(arg0:HANDLE, arg1:Int, arg2:LPVOID) : Int;

external (stdcall) MoveToEx(arg0:HDC, arg1:Int, arg2:Int, arg3:LPPOINT) : BOOL;

external (stdcall) TextOutA(arg0:HDC, arg1:Int, arg2:Int, arg3:LPCSTR, arg4:Int) : BOOL;

external (stdcall) TextOutW(arg0:HDC, arg1:Int, arg2:Int, arg3:LPCWSTR, arg4:Int) : BOOL;

external (stdcall) ExtTextOutA(arg0:HDC, arg1:Int, arg2:Int, arg3:UINT, arg4:Pointer[RECT], arg5:LPCSTR, arg6:UINT, arg7:Pointer[INT]) : BOOL;

external (stdcall) ExtTextOutW(arg0:HDC, arg1:Int, arg2:Int, arg3:UINT, arg4:Pointer[RECT], arg5:LPCWSTR, arg6:UINT, arg7:Pointer[INT]) : BOOL;

external (stdcall) PolyTextOutA(arg0:HDC, arg1:Pointer[POLYTEXTA], arg2:Int) : BOOL;

external (stdcall) PolyTextOutW(arg0:HDC, arg1:Pointer[POLYTEXTW], arg2:Int) : BOOL;

external (stdcall) CreatePolygonRgn(arg0:Pointer[POINT], arg1:Int, arg2:Int) : HRGN;

external (stdcall) DPtoLP(arg0:HDC, arg1:LPPOINT, arg2:Int) : BOOL;

external (stdcall) LPtoDP(arg0:HDC, arg1:LPPOINT, arg2:Int) : BOOL;

external (stdcall) Polygon(arg0:HDC, arg1:Pointer[POINT], arg2:Int) : BOOL;

external (stdcall) Polyline(arg0:HDC, arg1:Pointer[POINT], arg2:Int) : BOOL;

external (stdcall) PolyBezier(arg0:HDC, arg1:Pointer[POINT], arg2:DWORD) : BOOL;

external (stdcall) PolyBezierTo(arg0:HDC, arg1:Pointer[POINT], arg2:DWORD) : BOOL;

external (stdcall) PolylineTo(arg0:HDC, arg1:Pointer[POINT], arg2:DWORD) : BOOL;

external (stdcall) SetViewportExtEx(arg0:HDC, arg1:Int, arg2:Int, arg3:LPSIZE) : BOOL;

external (stdcall) SetViewportOrgEx(arg0:HDC, arg1:Int, arg2:Int, arg3:LPPOINT) : BOOL;

external (stdcall) SetWindowExtEx(arg0:HDC, arg1:Int, arg2:Int, arg3:LPSIZE) : BOOL;

external (stdcall) SetWindowOrgEx(arg0:HDC, arg1:Int, arg2:Int, arg3:LPPOINT) : BOOL;

external (stdcall) OffsetViewportOrgEx(arg0:HDC, arg1:Int, arg2:Int, arg3:LPPOINT) : BOOL;

external (stdcall) OffsetWindowOrgEx(arg0:HDC, arg1:Int, arg2:Int, arg3:LPPOINT) : BOOL;

external (stdcall) ScaleViewportExtEx(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:LPSIZE) : BOOL;

external (stdcall) ScaleWindowExtEx(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:LPSIZE) : BOOL;

external (stdcall) SetBitmapDimensionEx(arg0:HBITMAP, arg1:Int, arg2:Int, arg3:LPSIZE) : BOOL;

external (stdcall) SetBrushOrgEx(arg0:HDC, arg1:Int, arg2:Int, arg3:LPPOINT) : BOOL;

external (stdcall) GetTextFaceA(arg0:HDC, arg1:Int, arg2:LPSTR) : Int;

external (stdcall) GetTextFaceW(arg0:HDC, arg1:Int, arg2:LPWSTR) : Int;

record Struct_tagKERNINGPAIR (
    wFirst : WORD,
    wSecond : WORD,
    iKernAmount : Int,
);

alias KERNINGPAIR = Struct_tagKERNINGPAIR;

alias LPKERNINGPAIR = Pointer[Struct_tagKERNINGPAIR];

external (stdcall) GetKerningPairsA(arg0:HDC, arg1:DWORD, arg2:LPKERNINGPAIR) : DWORD;

external (stdcall) GetKerningPairsW(arg0:HDC, arg1:DWORD, arg2:LPKERNINGPAIR) : DWORD;

external (stdcall) GetDCOrgEx(arg0:HDC, arg1:LPPOINT) : BOOL;

external (stdcall) FixBrushOrgEx(arg0:HDC, arg1:Int, arg2:Int, arg3:LPPOINT) : BOOL;

external (stdcall) UnrealizeObject(arg0:HGDIOBJ) : BOOL;

external (stdcall) GdiFlush() : BOOL;

external (stdcall) GdiSetBatchLimit(arg0:DWORD) : DWORD;

external (stdcall) GdiGetBatchLimit() : DWORD;

alias ICMENUMPROCA = StdCallCodePointer[[LPSTR, LPARAM],[Int]];

alias ICMENUMPROCW = StdCallCodePointer[[LPWSTR, LPARAM],[Int]];

external (stdcall) SetICMMode(arg0:HDC, arg1:Int) : Int;

external (stdcall) CheckColorsInGamut(arg0:HDC, arg1:LPRGBTRIPLE, arg2:LPVOID, arg3:DWORD) : BOOL;

external (stdcall) GetColorSpace(arg0:HDC) : HCOLORSPACE;

external (stdcall) GetLogColorSpaceA(arg0:HCOLORSPACE, arg1:LPLOGCOLORSPACEA, arg2:DWORD) : BOOL;

external (stdcall) GetLogColorSpaceW(arg0:HCOLORSPACE, arg1:LPLOGCOLORSPACEW, arg2:DWORD) : BOOL;

external (stdcall) CreateColorSpaceA(arg0:LPLOGCOLORSPACEA) : HCOLORSPACE;

external (stdcall) CreateColorSpaceW(arg0:LPLOGCOLORSPACEW) : HCOLORSPACE;

external (stdcall) SetColorSpace(arg0:HDC, arg1:HCOLORSPACE) : HCOLORSPACE;

external (stdcall) DeleteColorSpace(arg0:HCOLORSPACE) : BOOL;

external (stdcall) GetICMProfileA(arg0:HDC, arg1:LPDWORD, arg2:LPSTR) : BOOL;

external (stdcall) GetICMProfileW(arg0:HDC, arg1:LPDWORD, arg2:LPWSTR) : BOOL;

external (stdcall) SetICMProfileA(arg0:HDC, arg1:LPSTR) : BOOL;

external (stdcall) SetICMProfileW(arg0:HDC, arg1:LPWSTR) : BOOL;

external (stdcall) GetDeviceGammaRamp(arg0:HDC, arg1:LPVOID) : BOOL;

external (stdcall) SetDeviceGammaRamp(arg0:HDC, arg1:LPVOID) : BOOL;

external (stdcall) ColorMatchToTarget(arg0:HDC, arg1:HDC, arg2:DWORD) : BOOL;

external (stdcall) EnumICMProfilesA(arg0:HDC, arg1:ICMENUMPROCA, arg2:LPARAM) : Int;

external (stdcall) EnumICMProfilesW(arg0:HDC, arg1:ICMENUMPROCW, arg2:LPARAM) : Int;

external (stdcall) UpdateICMRegKeyA(arg0:DWORD, arg1:LPSTR, arg2:LPSTR, arg3:UINT) : BOOL;

external (stdcall) UpdateICMRegKeyW(arg0:DWORD, arg1:LPWSTR, arg2:LPWSTR, arg3:UINT) : BOOL;

external (stdcall) ColorCorrectPalette(arg0:HDC, arg1:HPALETTE, arg2:DWORD, arg3:DWORD) : BOOL;

record Struct_tagEMR (
    iType : DWORD,
    nSize : DWORD,
);

alias EMR = Struct_tagEMR;

alias PEMR = Pointer[Struct_tagEMR];

record Struct_tagEMRTEXT (
    ptlReference : POINTL,
    nChars : DWORD,
    offString : DWORD,
    fOptions : DWORD,
    rcl : RECTL,
    offDx : DWORD,
);

alias EMRTEXT = Struct_tagEMRTEXT;

alias PEMRTEXT = Pointer[Struct_tagEMRTEXT];

record Struct_tagABORTPATH (
    emr : EMR,
);

alias EMRABORTPATH = Struct_tagABORTPATH;

alias PEMRABORTPATH = Pointer[Struct_tagABORTPATH];

alias EMRBEGINPATH = Struct_tagABORTPATH;

alias PEMRBEGINPATH = Pointer[Struct_tagABORTPATH];

alias EMRENDPATH = Struct_tagABORTPATH;

alias PEMRENDPATH = Pointer[Struct_tagABORTPATH];

alias EMRCLOSEFIGURE = Struct_tagABORTPATH;

alias PEMRCLOSEFIGURE = Pointer[Struct_tagABORTPATH];

alias EMRFLATTENPATH = Struct_tagABORTPATH;

alias PEMRFLATTENPATH = Pointer[Struct_tagABORTPATH];

alias EMRWIDENPATH = Struct_tagABORTPATH;

alias PEMRWIDENPATH = Pointer[Struct_tagABORTPATH];

alias EMRSETMETARGN = Struct_tagABORTPATH;

alias PEMRSETMETARGN = Pointer[Struct_tagABORTPATH];

alias EMRSAVEDC = Struct_tagABORTPATH;

alias PEMRSAVEDC = Pointer[Struct_tagABORTPATH];

alias EMRREALIZEPALETTE = Struct_tagABORTPATH;

alias PEMRREALIZEPALETTE = Pointer[Struct_tagABORTPATH];

record Struct_tagEMRSELECTCLIPPATH (
    emr : EMR,
    iMode : DWORD,
);

alias EMRSELECTCLIPPATH = Struct_tagEMRSELECTCLIPPATH;

alias PEMRSELECTCLIPPATH = Pointer[Struct_tagEMRSELECTCLIPPATH];

alias EMRSETBKMODE = Struct_tagEMRSELECTCLIPPATH;

alias PEMRSETBKMODE = Pointer[Struct_tagEMRSELECTCLIPPATH];

alias EMRSETMAPMODE = Struct_tagEMRSELECTCLIPPATH;

alias PEMRSETMAPMODE = Pointer[Struct_tagEMRSELECTCLIPPATH];

alias EMRSETLAYOUT = Struct_tagEMRSELECTCLIPPATH;

alias PEMRSETLAYOUT = Pointer[Struct_tagEMRSELECTCLIPPATH];

alias EMRSETPOLYFILLMODE = Struct_tagEMRSELECTCLIPPATH;

alias PEMRSETPOLYFILLMODE = Pointer[Struct_tagEMRSELECTCLIPPATH];

alias EMRSETROP2 = Struct_tagEMRSELECTCLIPPATH;

alias PEMRSETROP2 = Pointer[Struct_tagEMRSELECTCLIPPATH];

alias EMRSETSTRETCHBLTMODE = Struct_tagEMRSELECTCLIPPATH;

alias PEMRSETSTRETCHBLTMODE = Pointer[Struct_tagEMRSELECTCLIPPATH];

alias EMRSETICMMODE = Struct_tagEMRSELECTCLIPPATH;

alias PEMRSETICMMODE = Pointer[Struct_tagEMRSELECTCLIPPATH];

alias EMRSETTEXTALIGN = Struct_tagEMRSELECTCLIPPATH;

alias PEMRSETTEXTALIGN = Pointer[Struct_tagEMRSELECTCLIPPATH];

record Struct_tagEMRSETMITERLIMIT (
    emr : EMR,
    eMiterLimit : FLOAT,
);

alias EMRSETMITERLIMIT = Struct_tagEMRSETMITERLIMIT;

alias PEMRSETMITERLIMIT = Pointer[Struct_tagEMRSETMITERLIMIT];

record Struct_tagEMRRESTOREDC (
    emr : EMR,
    iRelative : LONG,
);

alias EMRRESTOREDC = Struct_tagEMRRESTOREDC;

alias PEMRRESTOREDC = Pointer[Struct_tagEMRRESTOREDC];

record Struct_tagEMRSETARCDIRECTION (
    emr : EMR,
    iArcDirection : DWORD,
);

alias EMRSETARCDIRECTION = Struct_tagEMRSETARCDIRECTION;

alias PEMRSETARCDIRECTION = Pointer[Struct_tagEMRSETARCDIRECTION];

record Struct_tagEMRSETMAPPERFLAGS (
    emr : EMR,
    dwFlags : DWORD,
);

alias EMRSETMAPPERFLAGS = Struct_tagEMRSETMAPPERFLAGS;

alias PEMRSETMAPPERFLAGS = Pointer[Struct_tagEMRSETMAPPERFLAGS];

record Struct_tagEMRSETTEXTCOLOR (
    emr : EMR,
    crColor : COLORREF,
);

alias EMRSETBKCOLOR = Struct_tagEMRSETTEXTCOLOR;

alias PEMRSETBKCOLOR = Pointer[Struct_tagEMRSETTEXTCOLOR];

alias EMRSETTEXTCOLOR = Struct_tagEMRSETTEXTCOLOR;

alias PEMRSETTEXTCOLOR = Pointer[Struct_tagEMRSETTEXTCOLOR];

record Struct_tagEMRSELECTOBJECT (
    emr : EMR,
    ihObject : DWORD,
);

alias EMRSELECTOBJECT = Struct_tagEMRSELECTOBJECT;

alias PEMRSELECTOBJECT = Pointer[Struct_tagEMRSELECTOBJECT];

alias EMRDELETEOBJECT = Struct_tagEMRSELECTOBJECT;

alias PEMRDELETEOBJECT = Pointer[Struct_tagEMRSELECTOBJECT];

record Struct_tagEMRSELECTPALETTE (
    emr : EMR,
    ihPal : DWORD,
);

alias EMRSELECTPALETTE = Struct_tagEMRSELECTPALETTE;

alias PEMRSELECTPALETTE = Pointer[Struct_tagEMRSELECTPALETTE];

record Struct_tagEMRRESIZEPALETTE (
    emr : EMR,
    ihPal : DWORD,
    cEntries : DWORD,
);

alias EMRRESIZEPALETTE = Struct_tagEMRRESIZEPALETTE;

alias PEMRRESIZEPALETTE = Pointer[Struct_tagEMRRESIZEPALETTE];

record Struct_tagEMRSETPALETTEENTRIES (
    emr : EMR,
    ihPal : DWORD,
    iStart : DWORD,
    cEntries : DWORD,
    aPalEntries : Array[PALETTEENTRY, 1],
);

alias EMRSETPALETTEENTRIES = Struct_tagEMRSETPALETTEENTRIES;

alias PEMRSETPALETTEENTRIES = Pointer[Struct_tagEMRSETPALETTEENTRIES];

record Struct_tagEMRSETCOLORADJUSTMENT (
    emr : EMR,
    ColorAdjustment : COLORADJUSTMENT,
);

alias EMRSETCOLORADJUSTMENT = Struct_tagEMRSETCOLORADJUSTMENT;

alias PEMRSETCOLORADJUSTMENT = Pointer[Struct_tagEMRSETCOLORADJUSTMENT];

record Struct_tagEMRGDICOMMENT (
    emr : EMR,
    cbData : DWORD,
    Data : Array[BYTE, 1],
);

alias EMRGDICOMMENT = Struct_tagEMRGDICOMMENT;

alias PEMRGDICOMMENT = Pointer[Struct_tagEMRGDICOMMENT];

record Struct_tagEMREOF (
    emr : EMR,
    nPalEntries : DWORD,
    offPalEntries : DWORD,
    nSizeLast : DWORD,
);

alias EMREOF = Struct_tagEMREOF;

alias PEMREOF = Pointer[Struct_tagEMREOF];

record Struct_tagEMRLINETO (
    emr : EMR,
    ptl : POINTL,
);

alias EMRLINETO = Struct_tagEMRLINETO;

alias PEMRLINETO = Pointer[Struct_tagEMRLINETO];

alias EMRMOVETOEX = Struct_tagEMRLINETO;

alias PEMRMOVETOEX = Pointer[Struct_tagEMRLINETO];

record Struct_tagEMROFFSETCLIPRGN (
    emr : EMR,
    ptlOffset : POINTL,
);

alias EMROFFSETCLIPRGN = Struct_tagEMROFFSETCLIPRGN;

alias PEMROFFSETCLIPRGN = Pointer[Struct_tagEMROFFSETCLIPRGN];

record Struct_tagEMRFILLPATH (
    emr : EMR,
    rclBounds : RECTL,
);

alias EMRFILLPATH = Struct_tagEMRFILLPATH;

alias PEMRFILLPATH = Pointer[Struct_tagEMRFILLPATH];

alias EMRSTROKEANDFILLPATH = Struct_tagEMRFILLPATH;

alias PEMRSTROKEANDFILLPATH = Pointer[Struct_tagEMRFILLPATH];

alias EMRSTROKEPATH = Struct_tagEMRFILLPATH;

alias PEMRSTROKEPATH = Pointer[Struct_tagEMRFILLPATH];

record Struct_tagEMREXCLUDECLIPRECT (
    emr : EMR,
    rclClip : RECTL,
);

alias EMREXCLUDECLIPRECT = Struct_tagEMREXCLUDECLIPRECT;

alias PEMREXCLUDECLIPRECT = Pointer[Struct_tagEMREXCLUDECLIPRECT];

alias EMRINTERSECTCLIPRECT = Struct_tagEMREXCLUDECLIPRECT;

alias PEMRINTERSECTCLIPRECT = Pointer[Struct_tagEMREXCLUDECLIPRECT];

record Struct_tagEMRSETVIEWPORTORGEX (
    emr : EMR,
    ptlOrigin : POINTL,
);

alias EMRSETVIEWPORTORGEX = Struct_tagEMRSETVIEWPORTORGEX;

alias PEMRSETVIEWPORTORGEX = Pointer[Struct_tagEMRSETVIEWPORTORGEX];

alias EMRSETWINDOWORGEX = Struct_tagEMRSETVIEWPORTORGEX;

alias PEMRSETWINDOWORGEX = Pointer[Struct_tagEMRSETVIEWPORTORGEX];

alias EMRSETBRUSHORGEX = Struct_tagEMRSETVIEWPORTORGEX;

alias PEMRSETBRUSHORGEX = Pointer[Struct_tagEMRSETVIEWPORTORGEX];

record Struct_tagEMRSETVIEWPORTEXTEX (
    emr : EMR,
    szlExtent : SIZEL,
);

alias EMRSETVIEWPORTEXTEX = Struct_tagEMRSETVIEWPORTEXTEX;

alias PEMRSETVIEWPORTEXTEX = Pointer[Struct_tagEMRSETVIEWPORTEXTEX];

alias EMRSETWINDOWEXTEX = Struct_tagEMRSETVIEWPORTEXTEX;

alias PEMRSETWINDOWEXTEX = Pointer[Struct_tagEMRSETVIEWPORTEXTEX];

record Struct_tagEMRSCALEVIEWPORTEXTEX (
    emr : EMR,
    xNum : LONG,
    xDenom : LONG,
    yNum : LONG,
    yDenom : LONG,
);

alias EMRSCALEVIEWPORTEXTEX = Struct_tagEMRSCALEVIEWPORTEXTEX;

alias PEMRSCALEVIEWPORTEXTEX = Pointer[Struct_tagEMRSCALEVIEWPORTEXTEX];

alias EMRSCALEWINDOWEXTEX = Struct_tagEMRSCALEVIEWPORTEXTEX;

alias PEMRSCALEWINDOWEXTEX = Pointer[Struct_tagEMRSCALEVIEWPORTEXTEX];

record Struct_tagEMRSETWORLDTRANSFORM (
    emr : EMR,
    xform : XFORM,
);

alias EMRSETWORLDTRANSFORM = Struct_tagEMRSETWORLDTRANSFORM;

alias PEMRSETWORLDTRANSFORM = Pointer[Struct_tagEMRSETWORLDTRANSFORM];

record Struct_tagEMRMODIFYWORLDTRANSFORM (
    emr : EMR,
    xform : XFORM,
    iMode : DWORD,
);

alias EMRMODIFYWORLDTRANSFORM = Struct_tagEMRMODIFYWORLDTRANSFORM;

alias PEMRMODIFYWORLDTRANSFORM = Pointer[Struct_tagEMRMODIFYWORLDTRANSFORM];

record Struct_tagEMRSETPIXELV (
    emr : EMR,
    ptlPixel : POINTL,
    crColor : COLORREF,
);

alias EMRSETPIXELV = Struct_tagEMRSETPIXELV;

alias PEMRSETPIXELV = Pointer[Struct_tagEMRSETPIXELV];

record Struct_tagEMREXTFLOODFILL (
    emr : EMR,
    ptlStart : POINTL,
    crColor : COLORREF,
    iMode : DWORD,
);

alias EMREXTFLOODFILL = Struct_tagEMREXTFLOODFILL;

alias PEMREXTFLOODFILL = Pointer[Struct_tagEMREXTFLOODFILL];

record Struct_tagEMRELLIPSE (
    emr : EMR,
    rclBox : RECTL,
);

alias EMRELLIPSE = Struct_tagEMRELLIPSE;

alias PEMRELLIPSE = Pointer[Struct_tagEMRELLIPSE];

alias EMRRECTANGLE = Struct_tagEMRELLIPSE;

alias PEMRRECTANGLE = Pointer[Struct_tagEMRELLIPSE];

record Struct_tagEMRROUNDRECT (
    emr : EMR,
    rclBox : RECTL,
    szlCorner : SIZEL,
);

alias EMRROUNDRECT = Struct_tagEMRROUNDRECT;

alias PEMRROUNDRECT = Pointer[Struct_tagEMRROUNDRECT];

record Struct_tagEMRARC (
    emr : EMR,
    rclBox : RECTL,
    ptlStart : POINTL,
    ptlEnd : POINTL,
);

alias EMRARC = Struct_tagEMRARC;

alias PEMRARC = Pointer[Struct_tagEMRARC];

alias EMRARCTO = Struct_tagEMRARC;

alias PEMRARCTO = Pointer[Struct_tagEMRARC];

alias EMRCHORD = Struct_tagEMRARC;

alias PEMRCHORD = Pointer[Struct_tagEMRARC];

alias EMRPIE = Struct_tagEMRARC;

alias PEMRPIE = Pointer[Struct_tagEMRARC];

record Struct_tagEMRANGLEARC (
    emr : EMR,
    ptlCenter : POINTL,
    nRadius : DWORD,
    eStartAngle : FLOAT,
    eSweepAngle : FLOAT,
);

alias EMRANGLEARC = Struct_tagEMRANGLEARC;

alias PEMRANGLEARC = Pointer[Struct_tagEMRANGLEARC];

record Struct_tagEMRPOLYLINE (
    emr : EMR,
    rclBounds : RECTL,
    cptl : DWORD,
    aptl : Array[POINTL, 1],
);

alias EMRPOLYLINE = Struct_tagEMRPOLYLINE;

alias PEMRPOLYLINE = Pointer[Struct_tagEMRPOLYLINE];

alias EMRPOLYBEZIER = Struct_tagEMRPOLYLINE;

alias PEMRPOLYBEZIER = Pointer[Struct_tagEMRPOLYLINE];

alias EMRPOLYGON = Struct_tagEMRPOLYLINE;

alias PEMRPOLYGON = Pointer[Struct_tagEMRPOLYLINE];

alias EMRPOLYBEZIERTO = Struct_tagEMRPOLYLINE;

alias PEMRPOLYBEZIERTO = Pointer[Struct_tagEMRPOLYLINE];

alias EMRPOLYLINETO = Struct_tagEMRPOLYLINE;

alias PEMRPOLYLINETO = Pointer[Struct_tagEMRPOLYLINE];

record Struct_tagEMRPOLYLINE16 (
    emr : EMR,
    rclBounds : RECTL,
    cpts : DWORD,
    apts : Array[POINTS, 1],
);

alias EMRPOLYLINE16 = Struct_tagEMRPOLYLINE16;

alias PEMRPOLYLINE16 = Pointer[Struct_tagEMRPOLYLINE16];

alias EMRPOLYBEZIER16 = Struct_tagEMRPOLYLINE16;

alias PEMRPOLYBEZIER16 = Pointer[Struct_tagEMRPOLYLINE16];

alias EMRPOLYGON16 = Struct_tagEMRPOLYLINE16;

alias PEMRPOLYGON16 = Pointer[Struct_tagEMRPOLYLINE16];

alias EMRPOLYBEZIERTO16 = Struct_tagEMRPOLYLINE16;

alias PEMRPOLYBEZIERTO16 = Pointer[Struct_tagEMRPOLYLINE16];

alias EMRPOLYLINETO16 = Struct_tagEMRPOLYLINE16;

alias PEMRPOLYLINETO16 = Pointer[Struct_tagEMRPOLYLINE16];

record Struct_tagEMRPOLYDRAW (
    emr : EMR,
    rclBounds : RECTL,
    cptl : DWORD,
    aptl : Array[POINTL, 1],
    abTypes : Array[BYTE, 1],
);

alias EMRPOLYDRAW = Struct_tagEMRPOLYDRAW;

alias PEMRPOLYDRAW = Pointer[Struct_tagEMRPOLYDRAW];

record Struct_tagEMRPOLYDRAW16 (
    emr : EMR,
    rclBounds : RECTL,
    cpts : DWORD,
    apts : Array[POINTS, 1],
    abTypes : Array[BYTE, 1],
);

alias EMRPOLYDRAW16 = Struct_tagEMRPOLYDRAW16;

alias PEMRPOLYDRAW16 = Pointer[Struct_tagEMRPOLYDRAW16];

record Struct_tagEMRPOLYPOLYLINE (
    emr : EMR,
    rclBounds : RECTL,
    nPolys : DWORD,
    cptl : DWORD,
    aPolyCounts : Array[DWORD, 1],
    aptl : Array[POINTL, 1],
);

alias EMRPOLYPOLYLINE = Struct_tagEMRPOLYPOLYLINE;

alias PEMRPOLYPOLYLINE = Pointer[Struct_tagEMRPOLYPOLYLINE];

alias EMRPOLYPOLYGON = Struct_tagEMRPOLYPOLYLINE;

alias PEMRPOLYPOLYGON = Pointer[Struct_tagEMRPOLYPOLYLINE];

record Struct_tagEMRPOLYPOLYLINE16 (
    emr : EMR,
    rclBounds : RECTL,
    nPolys : DWORD,
    cpts : DWORD,
    aPolyCounts : Array[DWORD, 1],
    apts : Array[POINTS, 1],
);

alias EMRPOLYPOLYLINE16 = Struct_tagEMRPOLYPOLYLINE16;

alias PEMRPOLYPOLYLINE16 = Pointer[Struct_tagEMRPOLYPOLYLINE16];

alias EMRPOLYPOLYGON16 = Struct_tagEMRPOLYPOLYLINE16;

alias PEMRPOLYPOLYGON16 = Pointer[Struct_tagEMRPOLYPOLYLINE16];

record Struct_tagEMRINVERTRGN (
    emr : EMR,
    rclBounds : RECTL,
    cbRgnData : DWORD,
    RgnData : Array[BYTE, 1],
);

alias EMRINVERTRGN = Struct_tagEMRINVERTRGN;

alias PEMRINVERTRGN = Pointer[Struct_tagEMRINVERTRGN];

alias EMRPAINTRGN = Struct_tagEMRINVERTRGN;

alias PEMRPAINTRGN = Pointer[Struct_tagEMRINVERTRGN];

record Struct_tagEMRFILLRGN (
    emr : EMR,
    rclBounds : RECTL,
    cbRgnData : DWORD,
    ihBrush : DWORD,
    RgnData : Array[BYTE, 1],
);

alias EMRFILLRGN = Struct_tagEMRFILLRGN;

alias PEMRFILLRGN = Pointer[Struct_tagEMRFILLRGN];

record Struct_tagEMRFRAMERGN (
    emr : EMR,
    rclBounds : RECTL,
    cbRgnData : DWORD,
    ihBrush : DWORD,
    szlStroke : SIZEL,
    RgnData : Array[BYTE, 1],
);

alias EMRFRAMERGN = Struct_tagEMRFRAMERGN;

alias PEMRFRAMERGN = Pointer[Struct_tagEMRFRAMERGN];

record Struct_tagEMREXTSELECTCLIPRGN (
    emr : EMR,
    cbRgnData : DWORD,
    iMode : DWORD,
    RgnData : Array[BYTE, 1],
);

alias EMREXTSELECTCLIPRGN = Struct_tagEMREXTSELECTCLIPRGN;

alias PEMREXTSELECTCLIPRGN = Pointer[Struct_tagEMREXTSELECTCLIPRGN];

record Struct_tagEMREXTTEXTOUTA (
    emr : EMR,
    rclBounds : RECTL,
    iGraphicsMode : DWORD,
    exScale : FLOAT,
    eyScale : FLOAT,
    emrtext : EMRTEXT,
);

alias EMREXTTEXTOUTA = Struct_tagEMREXTTEXTOUTA;

alias PEMREXTTEXTOUTA = Pointer[Struct_tagEMREXTTEXTOUTA];

alias EMREXTTEXTOUTW = Struct_tagEMREXTTEXTOUTA;

alias PEMREXTTEXTOUTW = Pointer[Struct_tagEMREXTTEXTOUTA];

record Struct_tagEMRPOLYTEXTOUTA (
    emr : EMR,
    rclBounds : RECTL,
    iGraphicsMode : DWORD,
    exScale : FLOAT,
    eyScale : FLOAT,
    cStrings : LONG,
    aemrtext : Array[EMRTEXT, 1],
);

alias EMRPOLYTEXTOUTA = Struct_tagEMRPOLYTEXTOUTA;

alias PEMRPOLYTEXTOUTA = Pointer[Struct_tagEMRPOLYTEXTOUTA];

alias EMRPOLYTEXTOUTW = Struct_tagEMRPOLYTEXTOUTA;

alias PEMRPOLYTEXTOUTW = Pointer[Struct_tagEMRPOLYTEXTOUTA];

record Struct_tagEMRBITBLT (
    emr : EMR,
    rclBounds : RECTL,
    xDest : LONG,
    yDest : LONG,
    cxDest : LONG,
    cyDest : LONG,
    dwRop : DWORD,
    xSrc : LONG,
    ySrc : LONG,
    xformSrc : XFORM,
    crBkColorSrc : COLORREF,
    iUsageSrc : DWORD,
    offBmiSrc : DWORD,
    cbBmiSrc : DWORD,
    offBitsSrc : DWORD,
    cbBitsSrc : DWORD,
);

alias EMRBITBLT = Struct_tagEMRBITBLT;

alias PEMRBITBLT = Pointer[Struct_tagEMRBITBLT];

record Struct_tagEMRSTRETCHBLT (
    emr : EMR,
    rclBounds : RECTL,
    xDest : LONG,
    yDest : LONG,
    cxDest : LONG,
    cyDest : LONG,
    dwRop : DWORD,
    xSrc : LONG,
    ySrc : LONG,
    xformSrc : XFORM,
    crBkColorSrc : COLORREF,
    iUsageSrc : DWORD,
    offBmiSrc : DWORD,
    cbBmiSrc : DWORD,
    offBitsSrc : DWORD,
    cbBitsSrc : DWORD,
    cxSrc : LONG,
    cySrc : LONG,
);

alias EMRSTRETCHBLT = Struct_tagEMRSTRETCHBLT;

alias PEMRSTRETCHBLT = Pointer[Struct_tagEMRSTRETCHBLT];

record Struct_tagEMRMASKBLT (
    emr : EMR,
    rclBounds : RECTL,
    xDest : LONG,
    yDest : LONG,
    cxDest : LONG,
    cyDest : LONG,
    dwRop : DWORD,
    xSrc : LONG,
    ySrc : LONG,
    xformSrc : XFORM,
    crBkColorSrc : COLORREF,
    iUsageSrc : DWORD,
    offBmiSrc : DWORD,
    cbBmiSrc : DWORD,
    offBitsSrc : DWORD,
    cbBitsSrc : DWORD,
    xMask : LONG,
    yMask : LONG,
    iUsageMask : DWORD,
    offBmiMask : DWORD,
    cbBmiMask : DWORD,
    offBitsMask : DWORD,
    cbBitsMask : DWORD,
);

alias EMRMASKBLT = Struct_tagEMRMASKBLT;

alias PEMRMASKBLT = Pointer[Struct_tagEMRMASKBLT];

record Struct_tagEMRPLGBLT (
    emr : EMR,
    rclBounds : RECTL,
    aptlDest : Array[POINTL, 3],
    xSrc : LONG,
    ySrc : LONG,
    cxSrc : LONG,
    cySrc : LONG,
    xformSrc : XFORM,
    crBkColorSrc : COLORREF,
    iUsageSrc : DWORD,
    offBmiSrc : DWORD,
    cbBmiSrc : DWORD,
    offBitsSrc : DWORD,
    cbBitsSrc : DWORD,
    xMask : LONG,
    yMask : LONG,
    iUsageMask : DWORD,
    offBmiMask : DWORD,
    cbBmiMask : DWORD,
    offBitsMask : DWORD,
    cbBitsMask : DWORD,
);

alias EMRPLGBLT = Struct_tagEMRPLGBLT;

alias PEMRPLGBLT = Pointer[Struct_tagEMRPLGBLT];

record Struct_tagEMRSETDIBITSTODEVICE (
    emr : EMR,
    rclBounds : RECTL,
    xDest : LONG,
    yDest : LONG,
    xSrc : LONG,
    ySrc : LONG,
    cxSrc : LONG,
    cySrc : LONG,
    offBmiSrc : DWORD,
    cbBmiSrc : DWORD,
    offBitsSrc : DWORD,
    cbBitsSrc : DWORD,
    iUsageSrc : DWORD,
    iStartScan : DWORD,
    cScans : DWORD,
);

alias EMRSETDIBITSTODEVICE = Struct_tagEMRSETDIBITSTODEVICE;

alias PEMRSETDIBITSTODEVICE = Pointer[Struct_tagEMRSETDIBITSTODEVICE];

record Struct_tagEMRSTRETCHDIBITS (
    emr : EMR,
    rclBounds : RECTL,
    xDest : LONG,
    yDest : LONG,
    xSrc : LONG,
    ySrc : LONG,
    cxSrc : LONG,
    cySrc : LONG,
    offBmiSrc : DWORD,
    cbBmiSrc : DWORD,
    offBitsSrc : DWORD,
    cbBitsSrc : DWORD,
    iUsageSrc : DWORD,
    dwRop : DWORD,
    cxDest : LONG,
    cyDest : LONG,
);

alias EMRSTRETCHDIBITS = Struct_tagEMRSTRETCHDIBITS;

alias PEMRSTRETCHDIBITS = Pointer[Struct_tagEMRSTRETCHDIBITS];

record Struct_tagEMREXTCREATEFONTINDIRECTW (
    emr : EMR,
    ihFont : DWORD,
    elfw : EXTLOGFONTW,
);

alias EMREXTCREATEFONTINDIRECTW = Struct_tagEMREXTCREATEFONTINDIRECTW;

alias PEMREXTCREATEFONTINDIRECTW = Pointer[Struct_tagEMREXTCREATEFONTINDIRECTW];

record Struct_tagEMRCREATEPALETTE (
    emr : EMR,
    ihPal : DWORD,
    lgpl : LOGPALETTE,
);

alias EMRCREATEPALETTE = Struct_tagEMRCREATEPALETTE;

alias PEMRCREATEPALETTE = Pointer[Struct_tagEMRCREATEPALETTE];

record Struct_tagEMRCREATEPEN (
    emr : EMR,
    ihPen : DWORD,
    lopn : LOGPEN,
);

alias EMRCREATEPEN = Struct_tagEMRCREATEPEN;

alias PEMRCREATEPEN = Pointer[Struct_tagEMRCREATEPEN];

record Struct_tagEMREXTCREATEPEN (
    emr : EMR,
    ihPen : DWORD,
    offBmi : DWORD,
    cbBmi : DWORD,
    offBits : DWORD,
    cbBits : DWORD,
    elp : EXTLOGPEN32,
);

alias EMREXTCREATEPEN = Struct_tagEMREXTCREATEPEN;

alias PEMREXTCREATEPEN = Pointer[Struct_tagEMREXTCREATEPEN];

record Struct_tagEMRCREATEBRUSHINDIRECT (
    emr : EMR,
    ihBrush : DWORD,
    lb : LOGBRUSH32,
);

alias EMRCREATEBRUSHINDIRECT = Struct_tagEMRCREATEBRUSHINDIRECT;

alias PEMRCREATEBRUSHINDIRECT = Pointer[Struct_tagEMRCREATEBRUSHINDIRECT];

record Struct_tagEMRCREATEMONOBRUSH (
    emr : EMR,
    ihBrush : DWORD,
    iUsage : DWORD,
    offBmi : DWORD,
    cbBmi : DWORD,
    offBits : DWORD,
    cbBits : DWORD,
);

alias EMRCREATEMONOBRUSH = Struct_tagEMRCREATEMONOBRUSH;

alias PEMRCREATEMONOBRUSH = Pointer[Struct_tagEMRCREATEMONOBRUSH];

record Struct_tagEMRCREATEDIBPATTERNBRUSHPT (
    emr : EMR,
    ihBrush : DWORD,
    iUsage : DWORD,
    offBmi : DWORD,
    cbBmi : DWORD,
    offBits : DWORD,
    cbBits : DWORD,
);

alias EMRCREATEDIBPATTERNBRUSHPT = Struct_tagEMRCREATEDIBPATTERNBRUSHPT;

alias PEMRCREATEDIBPATTERNBRUSHPT = Pointer[Struct_tagEMRCREATEDIBPATTERNBRUSHPT];

record Struct_tagEMRFORMAT (
    dSignature : DWORD,
    nVersion : DWORD,
    cbData : DWORD,
    offData : DWORD,
);

alias EMRFORMAT = Struct_tagEMRFORMAT;

alias PEMRFORMAT = Pointer[Struct_tagEMRFORMAT];

record Struct_tagEMRGLSRECORD (
    emr : EMR,
    cbData : DWORD,
    Data : Array[BYTE, 1],
);

alias EMRGLSRECORD = Struct_tagEMRGLSRECORD;

alias PEMRGLSRECORD = Pointer[Struct_tagEMRGLSRECORD];

record Struct_tagEMRGLSBOUNDEDRECORD (
    emr : EMR,
    rclBounds : RECTL,
    cbData : DWORD,
    Data : Array[BYTE, 1],
);

alias EMRGLSBOUNDEDRECORD = Struct_tagEMRGLSBOUNDEDRECORD;

alias PEMRGLSBOUNDEDRECORD = Pointer[Struct_tagEMRGLSBOUNDEDRECORD];

record Struct_tagEMRPIXELFORMAT (
    emr : EMR,
    pfd : PIXELFORMATDESCRIPTOR,
);

alias EMRPIXELFORMAT = Struct_tagEMRPIXELFORMAT;

alias PEMRPIXELFORMAT = Pointer[Struct_tagEMRPIXELFORMAT];

record Struct_tagEMRCREATECOLORSPACE (
    emr : EMR,
    ihCS : DWORD,
    lcs : LOGCOLORSPACEA,
);

alias EMRCREATECOLORSPACE = Struct_tagEMRCREATECOLORSPACE;

alias PEMRCREATECOLORSPACE = Pointer[Struct_tagEMRCREATECOLORSPACE];

record Struct_tagEMRSETCOLORSPACE (
    emr : EMR,
    ihCS : DWORD,
);

alias EMRSETCOLORSPACE = Struct_tagEMRSETCOLORSPACE;

alias PEMRSETCOLORSPACE = Pointer[Struct_tagEMRSETCOLORSPACE];

alias EMRSELECTCOLORSPACE = Struct_tagEMRSETCOLORSPACE;

alias PEMRSELECTCOLORSPACE = Pointer[Struct_tagEMRSETCOLORSPACE];

alias EMRDELETECOLORSPACE = Struct_tagEMRSETCOLORSPACE;

alias PEMRDELETECOLORSPACE = Pointer[Struct_tagEMRSETCOLORSPACE];

record Struct_tagEMREXTESCAPE (
    emr : EMR,
    iEscape : INT,
    cbEscData : INT,
    EscData : Array[BYTE, 1],
);

alias EMREXTESCAPE = Struct_tagEMREXTESCAPE;

alias PEMREXTESCAPE = Pointer[Struct_tagEMREXTESCAPE];

alias EMRDRAWESCAPE = Struct_tagEMREXTESCAPE;

alias PEMRDRAWESCAPE = Pointer[Struct_tagEMREXTESCAPE];

record Struct_tagEMRNAMEDESCAPE (
    emr : EMR,
    iEscape : INT,
    cbDriver : INT,
    cbEscData : INT,
    EscData : Array[BYTE, 1],
);

alias EMRNAMEDESCAPE = Struct_tagEMRNAMEDESCAPE;

alias PEMRNAMEDESCAPE = Pointer[Struct_tagEMRNAMEDESCAPE];

record Struct_tagEMRSETICMPROFILE (
    emr : EMR,
    dwFlags : DWORD,
    cbName : DWORD,
    cbData : DWORD,
    Data : Array[BYTE, 1],
);

alias EMRSETICMPROFILE = Struct_tagEMRSETICMPROFILE;

alias PEMRSETICMPROFILE = Pointer[Struct_tagEMRSETICMPROFILE];

alias EMRSETICMPROFILEA = Struct_tagEMRSETICMPROFILE;

alias PEMRSETICMPROFILEA = Pointer[Struct_tagEMRSETICMPROFILE];

alias EMRSETICMPROFILEW = Struct_tagEMRSETICMPROFILE;

alias PEMRSETICMPROFILEW = Pointer[Struct_tagEMRSETICMPROFILE];

record Struct_tagEMRCREATECOLORSPACEW (
    emr : EMR,
    ihCS : DWORD,
    lcs : LOGCOLORSPACEW,
    dwFlags : DWORD,
    cbData : DWORD,
    Data : Array[BYTE, 1],
);

alias EMRCREATECOLORSPACEW = Struct_tagEMRCREATECOLORSPACEW;

alias PEMRCREATECOLORSPACEW = Pointer[Struct_tagEMRCREATECOLORSPACEW];

record Struct_tagCOLORMATCHTOTARGET (
    emr : EMR,
    dwAction : DWORD,
    dwFlags : DWORD,
    cbName : DWORD,
    cbData : DWORD,
    Data : Array[BYTE, 1],
);

alias EMRCOLORMATCHTOTARGET = Struct_tagCOLORMATCHTOTARGET;

alias PEMRCOLORMATCHTOTARGET = Pointer[Struct_tagCOLORMATCHTOTARGET];

record Struct_tagCOLORCORRECTPALETTE (
    emr : EMR,
    ihPalette : DWORD,
    nFirstEntry : DWORD,
    nPalEntries : DWORD,
    nReserved : DWORD,
);

alias EMRCOLORCORRECTPALETTE = Struct_tagCOLORCORRECTPALETTE;

alias PEMRCOLORCORRECTPALETTE = Pointer[Struct_tagCOLORCORRECTPALETTE];

record Struct_tagEMRALPHABLEND (
    emr : EMR,
    rclBounds : RECTL,
    xDest : LONG,
    yDest : LONG,
    cxDest : LONG,
    cyDest : LONG,
    dwRop : DWORD,
    xSrc : LONG,
    ySrc : LONG,
    xformSrc : XFORM,
    crBkColorSrc : COLORREF,
    iUsageSrc : DWORD,
    offBmiSrc : DWORD,
    cbBmiSrc : DWORD,
    offBitsSrc : DWORD,
    cbBitsSrc : DWORD,
    cxSrc : LONG,
    cySrc : LONG,
);

alias EMRALPHABLEND = Struct_tagEMRALPHABLEND;

alias PEMRALPHABLEND = Pointer[Struct_tagEMRALPHABLEND];

record Struct_tagEMRGRADIENTFILL (
    emr : EMR,
    rclBounds : RECTL,
    nVer : DWORD,
    nTri : DWORD,
    ulMode : ULONG,
    Ver : Array[TRIVERTEX, 1],
);

alias EMRGRADIENTFILL = Struct_tagEMRGRADIENTFILL;

alias PEMRGRADIENTFILL = Pointer[Struct_tagEMRGRADIENTFILL];

record Struct_tagEMRTRANSPARENTBLT (
    emr : EMR,
    rclBounds : RECTL,
    xDest : LONG,
    yDest : LONG,
    cxDest : LONG,
    cyDest : LONG,
    dwRop : DWORD,
    xSrc : LONG,
    ySrc : LONG,
    xformSrc : XFORM,
    crBkColorSrc : COLORREF,
    iUsageSrc : DWORD,
    offBmiSrc : DWORD,
    cbBmiSrc : DWORD,
    offBitsSrc : DWORD,
    cbBitsSrc : DWORD,
    cxSrc : LONG,
    cySrc : LONG,
);

alias EMRTRANSPARENTBLT = Struct_tagEMRTRANSPARENTBLT;

alias PEMRTRANSPARENTBLT = Pointer[Struct_tagEMRTRANSPARENTBLT];

external (stdcall) wglCopyContext(arg0:HGLRC, arg1:HGLRC, arg2:UINT) : BOOL;

external (stdcall) wglCreateContext(arg0:HDC) : HGLRC;

external (stdcall) wglCreateLayerContext(arg0:HDC, arg1:Int) : HGLRC;

external (stdcall) wglDeleteContext(arg0:HGLRC) : BOOL;

external (stdcall) wglGetCurrentContext() : HGLRC;

external (stdcall) wglGetCurrentDC() : HDC;

external (stdcall) wglGetProcAddress(arg0:LPCSTR) : PROC;

external (stdcall) wglMakeCurrent(arg0:HDC, arg1:HGLRC) : BOOL;

external (stdcall) wglShareLists(arg0:HGLRC, arg1:HGLRC) : BOOL;

external (stdcall) wglUseFontBitmapsA(arg0:HDC, arg1:DWORD, arg2:DWORD, arg3:DWORD) : BOOL;

external (stdcall) wglUseFontBitmapsW(arg0:HDC, arg1:DWORD, arg2:DWORD, arg3:DWORD) : BOOL;

external (stdcall) SwapBuffers(arg0:HDC) : BOOL;

record Struct__POINTFLOAT (
    x : FLOAT,
    y : FLOAT,
);

alias POINTFLOAT = Struct__POINTFLOAT;

alias PPOINTFLOAT = Pointer[Struct__POINTFLOAT];

record Struct__GLYPHMETRICSFLOAT (
    gmfBlackBoxX : FLOAT,
    gmfBlackBoxY : FLOAT,
    gmfptGlyphOrigin : POINTFLOAT,
    gmfCellIncX : FLOAT,
    gmfCellIncY : FLOAT,
);

alias GLYPHMETRICSFLOAT = Struct__GLYPHMETRICSFLOAT;

alias PGLYPHMETRICSFLOAT = Pointer[Struct__GLYPHMETRICSFLOAT];

alias LPGLYPHMETRICSFLOAT = Pointer[Struct__GLYPHMETRICSFLOAT];

external (stdcall) wglUseFontOutlinesA(arg0:HDC, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:FLOAT, arg5:FLOAT, arg6:Int, arg7:LPGLYPHMETRICSFLOAT) : BOOL;

external (stdcall) wglUseFontOutlinesW(arg0:HDC, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:FLOAT, arg5:FLOAT, arg6:Int, arg7:LPGLYPHMETRICSFLOAT) : BOOL;

record Struct_tagLAYERPLANEDESCRIPTOR (
    nSize : WORD,
    nVersion : WORD,
    dwFlags : DWORD,
    iPixelType : BYTE,
    cColorBits : BYTE,
    cRedBits : BYTE,
    cRedShift : BYTE,
    cGreenBits : BYTE,
    cGreenShift : BYTE,
    cBlueBits : BYTE,
    cBlueShift : BYTE,
    cAlphaBits : BYTE,
    cAlphaShift : BYTE,
    cAccumBits : BYTE,
    cAccumRedBits : BYTE,
    cAccumGreenBits : BYTE,
    cAccumBlueBits : BYTE,
    cAccumAlphaBits : BYTE,
    cDepthBits : BYTE,
    cStencilBits : BYTE,
    cAuxBuffers : BYTE,
    iLayerPlane : BYTE,
    bReserved : BYTE,
    crTransparent : COLORREF,
);

alias LAYERPLANEDESCRIPTOR = Struct_tagLAYERPLANEDESCRIPTOR;

alias PLAYERPLANEDESCRIPTOR = Pointer[Struct_tagLAYERPLANEDESCRIPTOR];

alias LPLAYERPLANEDESCRIPTOR = Pointer[Struct_tagLAYERPLANEDESCRIPTOR];

external (stdcall) wglDescribeLayerPlane(arg0:HDC, arg1:Int, arg2:Int, arg3:UINT, arg4:LPLAYERPLANEDESCRIPTOR) : BOOL;

external (stdcall) wglSetLayerPaletteEntries(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Pointer[COLORREF]) : Int;

external (stdcall) wglGetLayerPaletteEntries(arg0:HDC, arg1:Int, arg2:Int, arg3:Int, arg4:Pointer[COLORREF]) : Int;

external (stdcall) wglRealizeLayerPalette(arg0:HDC, arg1:Int, arg2:BOOL) : BOOL;

external (stdcall) wglSwapLayerBuffers(arg0:HDC, arg1:UINT) : BOOL;

record Struct__WGLSWAP (
    hdc : HDC,
    uiFlags : UINT,
);

alias WGLSWAP = Struct__WGLSWAP;

alias PWGLSWAP = Pointer[Struct__WGLSWAP];

alias LPWGLSWAP = Pointer[Struct__WGLSWAP];

external (stdcall) wglSwapMultipleBuffers(arg0:UINT, arg1:Pointer[WGLSWAP]) : DWORD;

alias HDWP = HANDLE;

alias MENUTEMPLATEA = /* unknown kind Void */ Opaque;

alias MENUTEMPLATEW = /* unknown kind Void */ Opaque;

alias MENUTEMPLATE = MENUTEMPLATEA;

alias LPMENUTEMPLATEA = PVOID;

alias LPMENUTEMPLATEW = PVOID;

alias LPMENUTEMPLATE = LPMENUTEMPLATEA;

alias WNDPROC = StdCallCodePointer[[HWND, UINT, WPARAM, LPARAM],[LRESULT]];

alias DLGPROC = StdCallCodePointer[[HWND, UINT, WPARAM, LPARAM],[INT_PTR]];

alias TIMERPROC = StdCallCodePointer[[HWND, UINT, UINT_PTR, DWORD],[]];

alias GRAYSTRINGPROC = StdCallCodePointer[[HDC, LPARAM, Int],[BOOL]];

alias WNDENUMPROC = StdCallCodePointer[[HWND, LPARAM],[BOOL]];

alias HOOKPROC = StdCallCodePointer[[Int, WPARAM, LPARAM],[LRESULT]];

alias SENDASYNCPROC = StdCallCodePointer[[HWND, UINT, ULONG_PTR, LRESULT],[]];

alias PROPENUMPROCA = StdCallCodePointer[[HWND, LPCSTR, HANDLE],[BOOL]];

alias PROPENUMPROCW = StdCallCodePointer[[HWND, LPCWSTR, HANDLE],[BOOL]];

alias PROPENUMPROCEXA = StdCallCodePointer[[HWND, LPSTR, HANDLE, ULONG_PTR],[BOOL]];

alias PROPENUMPROCEXW = StdCallCodePointer[[HWND, LPWSTR, HANDLE, ULONG_PTR],[BOOL]];

alias EDITWORDBREAKPROCA = StdCallCodePointer[[LPSTR, Int, Int, Int],[Int]];

alias EDITWORDBREAKPROCW = StdCallCodePointer[[LPWSTR, Int, Int, Int],[Int]];

alias DRAWSTATEPROC = StdCallCodePointer[[HDC, LPARAM, WPARAM, Int, Int],[BOOL]];

alias PROPENUMPROC = PROPENUMPROCA;

alias PROPENUMPROCEX = PROPENUMPROCEXA;

alias EDITWORDBREAKPROC = EDITWORDBREAKPROCA;

alias NAMEENUMPROCA = StdCallCodePointer[[LPSTR, LPARAM],[BOOL]];

alias NAMEENUMPROCW = StdCallCodePointer[[LPWSTR, LPARAM],[BOOL]];

alias WINSTAENUMPROCA = NAMEENUMPROCA;

alias DESKTOPENUMPROCA = NAMEENUMPROCA;

alias WINSTAENUMPROCW = NAMEENUMPROCW;

alias DESKTOPENUMPROCW = NAMEENUMPROCW;

alias WINSTAENUMPROC = WINSTAENUMPROCA;

alias DESKTOPENUMPROC = DESKTOPENUMPROCA;

external (stdcall) wvsprintfA(arg0:LPSTR, arg1:LPCSTR, arg2:va_list) : Int;

external (stdcall) wvsprintfW(arg0:LPWSTR, arg1:LPCWSTR, arg2:va_list) : Int;

external (cdecl) wsprintfA(arg0:LPSTR, arg1:LPCSTR, ..) : Int;

external (cdecl) wsprintfW(arg0:LPWSTR, arg1:LPCWSTR, ..) : Int;

record Struct_tagCBT_CREATEWNDA (
    lpcs : Pointer[Struct_tagCREATESTRUCTA],
    hwndInsertAfter : HWND,
);

alias CBT_CREATEWNDA = Struct_tagCBT_CREATEWNDA;

alias LPCBT_CREATEWNDA = Pointer[Struct_tagCBT_CREATEWNDA];

record Struct_tagCBT_CREATEWNDW (
    lpcs : Pointer[Struct_tagCREATESTRUCTW],
    hwndInsertAfter : HWND,
);

alias CBT_CREATEWNDW = Struct_tagCBT_CREATEWNDW;

alias LPCBT_CREATEWNDW = Pointer[Struct_tagCBT_CREATEWNDW];

alias CBT_CREATEWND = CBT_CREATEWNDA;

alias LPCBT_CREATEWND = LPCBT_CREATEWNDA;

record Struct_tagCBTACTIVATESTRUCT (
    fMouse : BOOL,
    hWndActive : HWND,
);

alias CBTACTIVATESTRUCT = Struct_tagCBTACTIVATESTRUCT;

alias LPCBTACTIVATESTRUCT = Pointer[Struct_tagCBTACTIVATESTRUCT];

record Struct_tagWTSSESSION_NOTIFICATION (
    cbSize : DWORD,
    dwSessionId : DWORD,
);

alias WTSSESSION_NOTIFICATION = Struct_tagWTSSESSION_NOTIFICATION;

alias PWTSSESSION_NOTIFICATION = Pointer[Struct_tagWTSSESSION_NOTIFICATION];

record Struct_Unnamed134 (
    hwnd : HWND,
    rc : RECT,
);

alias SHELLHOOKINFO = Struct_Unnamed134;

alias LPSHELLHOOKINFO = Pointer[Struct_Unnamed134];

record Struct_tagEVENTMSG (
    message : UINT,
    paramL : UINT,
    paramH : UINT,
    time : DWORD,
    hwnd : HWND,
);

alias EVENTMSG = Struct_tagEVENTMSG;

alias PEVENTMSGMSG = Pointer[Struct_tagEVENTMSG];

alias NPEVENTMSGMSG = Pointer[Struct_tagEVENTMSG];

alias LPEVENTMSGMSG = Pointer[Struct_tagEVENTMSG];

alias PEVENTMSG = Pointer[Struct_tagEVENTMSG];

alias NPEVENTMSG = Pointer[Struct_tagEVENTMSG];

alias LPEVENTMSG = Pointer[Struct_tagEVENTMSG];

record Struct_tagCWPSTRUCT (
    lParam : LPARAM,
    wParam : WPARAM,
    message : UINT,
    hwnd : HWND,
);

alias CWPSTRUCT = Struct_tagCWPSTRUCT;

alias PCWPSTRUCT = Pointer[Struct_tagCWPSTRUCT];

alias NPCWPSTRUCT = Pointer[Struct_tagCWPSTRUCT];

alias LPCWPSTRUCT = Pointer[Struct_tagCWPSTRUCT];

record Struct_tagCWPRETSTRUCT (
    lResult : LRESULT,
    lParam : LPARAM,
    wParam : WPARAM,
    message : UINT,
    hwnd : HWND,
);

alias CWPRETSTRUCT = Struct_tagCWPRETSTRUCT;

alias PCWPRETSTRUCT = Pointer[Struct_tagCWPRETSTRUCT];

alias NPCWPRETSTRUCT = Pointer[Struct_tagCWPRETSTRUCT];

alias LPCWPRETSTRUCT = Pointer[Struct_tagCWPRETSTRUCT];

record Struct_tagKBDLLHOOKSTRUCT (
    vkCode : DWORD,
    scanCode : DWORD,
    flags : DWORD,
    time : DWORD,
    dwExtraInfo : ULONG_PTR,
);

alias KBDLLHOOKSTRUCT = Struct_tagKBDLLHOOKSTRUCT;

alias LPKBDLLHOOKSTRUCT = Pointer[Struct_tagKBDLLHOOKSTRUCT];

alias PKBDLLHOOKSTRUCT = Pointer[Struct_tagKBDLLHOOKSTRUCT];

record Struct_tagMSLLHOOKSTRUCT (
    pt : POINT,
    mouseData : DWORD,
    flags : DWORD,
    time : DWORD,
    dwExtraInfo : ULONG_PTR,
);

alias MSLLHOOKSTRUCT = Struct_tagMSLLHOOKSTRUCT;

alias LPMSLLHOOKSTRUCT = Pointer[Struct_tagMSLLHOOKSTRUCT];

alias PMSLLHOOKSTRUCT = Pointer[Struct_tagMSLLHOOKSTRUCT];

record Struct_tagDEBUGHOOKINFO (
    idThread : DWORD,
    idThreadInstaller : DWORD,
    lParam : LPARAM,
    wParam : WPARAM,
    code : Int,
);

alias DEBUGHOOKINFO = Struct_tagDEBUGHOOKINFO;

alias PDEBUGHOOKINFO = Pointer[Struct_tagDEBUGHOOKINFO];

alias NPDEBUGHOOKINFO = Pointer[Struct_tagDEBUGHOOKINFO];

alias LPDEBUGHOOKINFO = Pointer[Struct_tagDEBUGHOOKINFO];

record Struct_tagMOUSEHOOKSTRUCT (
    pt : POINT,
    hwnd : HWND,
    wHitTestCode : UINT,
    dwExtraInfo : ULONG_PTR,
);

alias MOUSEHOOKSTRUCT = Struct_tagMOUSEHOOKSTRUCT;

alias LPMOUSEHOOKSTRUCT = Pointer[Struct_tagMOUSEHOOKSTRUCT];

alias PMOUSEHOOKSTRUCT = Pointer[Struct_tagMOUSEHOOKSTRUCT];

record Struct_tagMOUSEHOOKSTRUCTEX (
    mouseData : DWORD,
);

alias MOUSEHOOKSTRUCTEX = Struct_tagMOUSEHOOKSTRUCTEX;

alias LPMOUSEHOOKSTRUCTEX = Pointer[Struct_tagMOUSEHOOKSTRUCTEX];

alias PMOUSEHOOKSTRUCTEX = Pointer[Struct_tagMOUSEHOOKSTRUCTEX];

record Struct_tagHARDWAREHOOKSTRUCT (
    hwnd : HWND,
    message : UINT,
    wParam : WPARAM,
    lParam : LPARAM,
);

alias HARDWAREHOOKSTRUCT = Struct_tagHARDWAREHOOKSTRUCT;

alias LPHARDWAREHOOKSTRUCT = Pointer[Struct_tagHARDWAREHOOKSTRUCT];

alias PHARDWAREHOOKSTRUCT = Pointer[Struct_tagHARDWAREHOOKSTRUCT];

external (stdcall) LoadKeyboardLayoutA(arg0:LPCSTR, arg1:UINT) : HKL;

external (stdcall) LoadKeyboardLayoutW(arg0:LPCWSTR, arg1:UINT) : HKL;

external (stdcall) ActivateKeyboardLayout(arg0:HKL, arg1:UINT) : HKL;

external (stdcall) ToUnicodeEx(arg0:UINT, arg1:UINT, arg2:Pointer[BYTE], arg3:LPWSTR, arg4:Int, arg5:UINT, arg6:HKL) : Int;

external (stdcall) UnloadKeyboardLayout(arg0:HKL) : BOOL;

external (stdcall) GetKeyboardLayoutNameA(arg0:LPSTR) : BOOL;

external (stdcall) GetKeyboardLayoutNameW(arg0:LPWSTR) : BOOL;

external (stdcall) GetKeyboardLayoutList(arg0:Int, arg1:Pointer[HKL]) : Int;

external (stdcall) GetKeyboardLayout(arg0:DWORD) : HKL;

record Struct_tagMOUSEMOVEPOINT (
    x : Int,
    y : Int,
    time : DWORD,
    dwExtraInfo : ULONG_PTR,
);

alias MOUSEMOVEPOINT = Struct_tagMOUSEMOVEPOINT;

alias PMOUSEMOVEPOINT = Pointer[Struct_tagMOUSEMOVEPOINT];

alias LPMOUSEMOVEPOINT = Pointer[Struct_tagMOUSEMOVEPOINT];

external (stdcall) GetMouseMovePointsEx(arg0:UINT, arg1:LPMOUSEMOVEPOINT, arg2:LPMOUSEMOVEPOINT, arg3:Int, arg4:DWORD) : Int;

external (stdcall) CreateDesktopA(arg0:LPCSTR, arg1:LPCSTR, arg2:Pointer[DEVMODEA], arg3:DWORD, arg4:ACCESS_MASK, arg5:LPSECURITY_ATTRIBUTES) : HDESK;

external (stdcall) CreateDesktopW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:Pointer[DEVMODEW], arg3:DWORD, arg4:ACCESS_MASK, arg5:LPSECURITY_ATTRIBUTES) : HDESK;

external (stdcall) CreateDesktopExA(arg0:LPCSTR, arg1:LPCSTR, arg2:Pointer[DEVMODEA], arg3:DWORD, arg4:ACCESS_MASK, arg5:LPSECURITY_ATTRIBUTES, arg6:ULONG, arg7:PVOID) : HDESK;

external (stdcall) CreateDesktopExW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:Pointer[DEVMODEW], arg3:DWORD, arg4:ACCESS_MASK, arg5:LPSECURITY_ATTRIBUTES, arg6:ULONG, arg7:PVOID) : HDESK;

external (stdcall) OpenDesktopA(arg0:LPCSTR, arg1:DWORD, arg2:BOOL, arg3:ACCESS_MASK) : HDESK;

external (stdcall) OpenDesktopW(arg0:LPCWSTR, arg1:DWORD, arg2:BOOL, arg3:ACCESS_MASK) : HDESK;

external (stdcall) OpenInputDesktop(arg0:DWORD, arg1:BOOL, arg2:ACCESS_MASK) : HDESK;

external (stdcall) EnumDesktopsA(arg0:HWINSTA, arg1:DESKTOPENUMPROCA, arg2:LPARAM) : BOOL;

external (stdcall) EnumDesktopsW(arg0:HWINSTA, arg1:DESKTOPENUMPROCW, arg2:LPARAM) : BOOL;

external (stdcall) EnumDesktopWindows(arg0:HDESK, arg1:WNDENUMPROC, arg2:LPARAM) : BOOL;

external (stdcall) SwitchDesktop(arg0:HDESK) : BOOL;

external (stdcall) SetThreadDesktop(arg0:HDESK) : BOOL;

external (stdcall) CloseDesktop(arg0:HDESK) : BOOL;

external (stdcall) GetThreadDesktop(arg0:DWORD) : HDESK;

external (stdcall) CreateWindowStationA(arg0:LPCSTR, arg1:DWORD, arg2:ACCESS_MASK, arg3:LPSECURITY_ATTRIBUTES) : HWINSTA;

external (stdcall) CreateWindowStationW(arg0:LPCWSTR, arg1:DWORD, arg2:ACCESS_MASK, arg3:LPSECURITY_ATTRIBUTES) : HWINSTA;

external (stdcall) OpenWindowStationA(arg0:LPCSTR, arg1:BOOL, arg2:ACCESS_MASK) : HWINSTA;

external (stdcall) OpenWindowStationW(arg0:LPCWSTR, arg1:BOOL, arg2:ACCESS_MASK) : HWINSTA;

external (stdcall) EnumWindowStationsA(arg0:WINSTAENUMPROCA, arg1:LPARAM) : BOOL;

external (stdcall) EnumWindowStationsW(arg0:WINSTAENUMPROCW, arg1:LPARAM) : BOOL;

external (stdcall) CloseWindowStation(arg0:HWINSTA) : BOOL;

external (stdcall) SetProcessWindowStation(arg0:HWINSTA) : BOOL;

external (stdcall) GetProcessWindowStation() : HWINSTA;

external (stdcall) SetUserObjectSecurity(arg0:HANDLE, arg1:PSECURITY_INFORMATION, arg2:PSECURITY_DESCRIPTOR) : BOOL;

external (stdcall) GetUserObjectSecurity(arg0:HANDLE, arg1:PSECURITY_INFORMATION, arg2:PSECURITY_DESCRIPTOR, arg3:DWORD, arg4:LPDWORD) : BOOL;

record Struct_tagUSEROBJECTFLAGS (
    fInherit : BOOL,
    fReserved : BOOL,
    dwFlags : DWORD,
);

alias USEROBJECTFLAGS = Struct_tagUSEROBJECTFLAGS;

alias PUSEROBJECTFLAGS = Pointer[Struct_tagUSEROBJECTFLAGS];

external (stdcall) GetUserObjectInformationA(arg0:HANDLE, arg1:Int, arg2:PVOID, arg3:DWORD, arg4:LPDWORD) : BOOL;

external (stdcall) GetUserObjectInformationW(arg0:HANDLE, arg1:Int, arg2:PVOID, arg3:DWORD, arg4:LPDWORD) : BOOL;

external (stdcall) SetUserObjectInformationA(arg0:HANDLE, arg1:Int, arg2:PVOID, arg3:DWORD) : BOOL;

external (stdcall) SetUserObjectInformationW(arg0:HANDLE, arg1:Int, arg2:PVOID, arg3:DWORD) : BOOL;

record Struct_tagWNDCLASSEXA (
    cbSize : UINT,
    style : UINT,
    lpfnWndProc : WNDPROC,
    cbClsExtra : Int,
    cbWndExtra : Int,
    hInstance : HINSTANCE,
    hIcon : HICON,
    hCursor : HCURSOR,
    hbrBackground : HBRUSH,
    lpszMenuName : LPCSTR,
    lpszClassName : LPCSTR,
    hIconSm : HICON,
);

alias WNDCLASSEXA = Struct_tagWNDCLASSEXA;

alias PWNDCLASSEXA = Pointer[Struct_tagWNDCLASSEXA];

alias NPWNDCLASSEXA = Pointer[Struct_tagWNDCLASSEXA];

alias LPWNDCLASSEXA = Pointer[Struct_tagWNDCLASSEXA];

record Struct_tagWNDCLASSEXW (
    cbSize : UINT,
    style : UINT,
    lpfnWndProc : WNDPROC,
    cbClsExtra : Int,
    cbWndExtra : Int,
    hInstance : HINSTANCE,
    hIcon : HICON,
    hCursor : HCURSOR,
    hbrBackground : HBRUSH,
    lpszMenuName : LPCWSTR,
    lpszClassName : LPCWSTR,
    hIconSm : HICON,
);

alias WNDCLASSEXW = Struct_tagWNDCLASSEXW;

alias PWNDCLASSEXW = Pointer[Struct_tagWNDCLASSEXW];

alias NPWNDCLASSEXW = Pointer[Struct_tagWNDCLASSEXW];

alias LPWNDCLASSEXW = Pointer[Struct_tagWNDCLASSEXW];

alias WNDCLASSEX = WNDCLASSEXA;

alias PWNDCLASSEX = PWNDCLASSEXA;

alias NPWNDCLASSEX = NPWNDCLASSEXA;

alias LPWNDCLASSEX = LPWNDCLASSEXA;

record Struct_tagWNDCLASSA (
    style : UINT,
    lpfnWndProc : WNDPROC,
    cbClsExtra : Int,
    cbWndExtra : Int,
    hInstance : HINSTANCE,
    hIcon : HICON,
    hCursor : HCURSOR,
    hbrBackground : HBRUSH,
    lpszMenuName : LPCSTR,
    lpszClassName : LPCSTR,
);

alias WNDCLASSA = Struct_tagWNDCLASSA;

alias PWNDCLASSA = Pointer[Struct_tagWNDCLASSA];

alias NPWNDCLASSA = Pointer[Struct_tagWNDCLASSA];

alias LPWNDCLASSA = Pointer[Struct_tagWNDCLASSA];

record Struct_tagWNDCLASSW (
    style : UINT,
    lpfnWndProc : WNDPROC,
    cbClsExtra : Int,
    cbWndExtra : Int,
    hInstance : HINSTANCE,
    hIcon : HICON,
    hCursor : HCURSOR,
    hbrBackground : HBRUSH,
    lpszMenuName : LPCWSTR,
    lpszClassName : LPCWSTR,
);

alias WNDCLASSW = Struct_tagWNDCLASSW;

alias PWNDCLASSW = Pointer[Struct_tagWNDCLASSW];

alias NPWNDCLASSW = Pointer[Struct_tagWNDCLASSW];

alias LPWNDCLASSW = Pointer[Struct_tagWNDCLASSW];

alias WNDCLASS = WNDCLASSA;

alias PWNDCLASS = PWNDCLASSA;

alias NPWNDCLASS = NPWNDCLASSA;

alias LPWNDCLASS = LPWNDCLASSA;

external (stdcall) IsHungAppWindow(arg0:HWND) : BOOL;

external (stdcall) DisableProcessWindowsGhosting() : ;

record Struct_tagMSG (
    hwnd : HWND,
    message : UINT,
    wParam : WPARAM,
    lParam : LPARAM,
    time : DWORD,
    pt : POINT,
);

alias MSG = Struct_tagMSG;

alias PMSG = Pointer[Struct_tagMSG];

alias NPMSG = Pointer[Struct_tagMSG];

alias LPMSG = Pointer[Struct_tagMSG];

record Struct_tagMINMAXINFO (
    ptReserved : POINT,
    ptMaxSize : POINT,
    ptMaxPosition : POINT,
    ptMinTrackSize : POINT,
    ptMaxTrackSize : POINT,
);

alias MINMAXINFO = Struct_tagMINMAXINFO;

alias PMINMAXINFO = Pointer[Struct_tagMINMAXINFO];

alias LPMINMAXINFO = Pointer[Struct_tagMINMAXINFO];

record Struct_tagCOPYDATASTRUCT (
    dwData : ULONG_PTR,
    cbData : DWORD,
    lpData : PVOID,
);

alias COPYDATASTRUCT = Struct_tagCOPYDATASTRUCT;

alias PCOPYDATASTRUCT = Pointer[Struct_tagCOPYDATASTRUCT];

record Struct_tagMDINEXTMENU (
    hmenuIn : HMENU,
    hmenuNext : HMENU,
    hwndNext : HWND,
);

alias MDINEXTMENU = Struct_tagMDINEXTMENU;

alias PMDINEXTMENU = Pointer[Struct_tagMDINEXTMENU];

alias LPMDINEXTMENU = Pointer[Struct_tagMDINEXTMENU];

record Struct_Unnamed135 (
    PowerSetting : GUID,
    DataLength : DWORD,
    Data : Array[UCHAR, 1],
);

alias POWERBROADCAST_SETTING = Struct_Unnamed135;

alias PPOWERBROADCAST_SETTING = Pointer[Struct_Unnamed135];

external (stdcall) RegisterWindowMessageA(arg0:LPCSTR) : UINT;

external (stdcall) RegisterWindowMessageW(arg0:LPCWSTR) : UINT;

record Struct_tagWINDOWPOS (
    hwnd : HWND,
    hwndInsertAfter : HWND,
    x : Int,
    y : Int,
    cx : Int,
    cy : Int,
    flags : UINT,
);

alias WINDOWPOS = Struct_tagWINDOWPOS;

alias LPWINDOWPOS = Pointer[Struct_tagWINDOWPOS];

alias PWINDOWPOS = Pointer[Struct_tagWINDOWPOS];

record Struct_tagNCCALCSIZE_PARAMS (
    rgrc : Array[RECT, 3],
    lppos : PWINDOWPOS,
);

alias NCCALCSIZE_PARAMS = Struct_tagNCCALCSIZE_PARAMS;

alias LPNCCALCSIZE_PARAMS = Pointer[Struct_tagNCCALCSIZE_PARAMS];

record Struct_tagTRACKMOUSEEVENT (
    cbSize : DWORD,
    dwFlags : DWORD,
    hwndTrack : HWND,
    dwHoverTime : DWORD,
);

alias TRACKMOUSEEVENT = Struct_tagTRACKMOUSEEVENT;

alias LPTRACKMOUSEEVENT = Pointer[Struct_tagTRACKMOUSEEVENT];

external (stdcall) TrackMouseEvent(arg0:LPTRACKMOUSEEVENT) : BOOL;

external (stdcall) DrawEdge(arg0:HDC, arg1:LPRECT, arg2:UINT, arg3:UINT) : BOOL;

external (stdcall) DrawFrameControl(arg0:HDC, arg1:LPRECT, arg2:UINT, arg3:UINT) : BOOL;

external (stdcall) DrawCaption(arg0:HWND, arg1:HDC, arg2:Pointer[RECT], arg3:UINT) : BOOL;

external (stdcall) DrawAnimatedRects(arg0:HWND, arg1:Int, arg2:Pointer[RECT], arg3:Pointer[RECT]) : BOOL;

record Struct_tagACCEL (
    fVirt : BYTE,
    key : WORD,
    cmd : WORD,
);

alias ACCEL = Struct_tagACCEL;

alias LPACCEL = Pointer[Struct_tagACCEL];

record Struct_tagPAINTSTRUCT (
    hdc : HDC,
    fErase : BOOL,
    rcPaint : RECT,
    fRestore : BOOL,
    fIncUpdate : BOOL,
    rgbReserved : Array[BYTE, 32],
);

alias PAINTSTRUCT = Struct_tagPAINTSTRUCT;

alias PPAINTSTRUCT = Pointer[Struct_tagPAINTSTRUCT];

alias NPPAINTSTRUCT = Pointer[Struct_tagPAINTSTRUCT];

alias LPPAINTSTRUCT = Pointer[Struct_tagPAINTSTRUCT];

record Struct_tagCREATESTRUCTA (
    lpCreateParams : LPVOID,
    hInstance : HINSTANCE,
    hMenu : HMENU,
    hwndParent : HWND,
    cy : Int,
    cx : Int,
    y : Int,
    x : Int,
    style : LONG,
    lpszName : LPCSTR,
    lpszClass : LPCSTR,
    dwExStyle : DWORD,
);

alias CREATESTRUCTA = Struct_tagCREATESTRUCTA;

alias LPCREATESTRUCTA = Pointer[Struct_tagCREATESTRUCTA];

record Struct_tagCREATESTRUCTW (
    lpCreateParams : LPVOID,
    hInstance : HINSTANCE,
    hMenu : HMENU,
    hwndParent : HWND,
    cy : Int,
    cx : Int,
    y : Int,
    x : Int,
    style : LONG,
    lpszName : LPCWSTR,
    lpszClass : LPCWSTR,
    dwExStyle : DWORD,
);

alias CREATESTRUCTW = Struct_tagCREATESTRUCTW;

alias LPCREATESTRUCTW = Pointer[Struct_tagCREATESTRUCTW];

alias CREATESTRUCT = CREATESTRUCTA;

alias LPCREATESTRUCT = LPCREATESTRUCTA;

record Struct_tagWINDOWPLACEMENT (
    length : UINT,
    flags : UINT,
    showCmd : UINT,
    ptMinPosition : POINT,
    ptMaxPosition : POINT,
    rcNormalPosition : RECT,
);

alias WINDOWPLACEMENT = Struct_tagWINDOWPLACEMENT;

alias PWINDOWPLACEMENT = Pointer[WINDOWPLACEMENT];

alias LPWINDOWPLACEMENT = Pointer[WINDOWPLACEMENT];

record Struct_tagNMHDR (
    hwndFrom : HWND,
    idFrom : UINT_PTR,
    code : UINT,
);

alias NMHDR = Struct_tagNMHDR;

alias LPNMHDR = Pointer[NMHDR];

record Struct_tagSTYLESTRUCT (
    styleOld : DWORD,
    styleNew : DWORD,
);

alias STYLESTRUCT = Struct_tagSTYLESTRUCT;

alias LPSTYLESTRUCT = Pointer[Struct_tagSTYLESTRUCT];

record Struct_tagMEASUREITEMSTRUCT (
    CtlType : UINT,
    CtlID : UINT,
    itemID : UINT,
    itemWidth : UINT,
    itemHeight : UINT,
    itemData : ULONG_PTR,
);

alias MEASUREITEMSTRUCT = Struct_tagMEASUREITEMSTRUCT;

alias PMEASUREITEMSTRUCT = Pointer[Struct_tagMEASUREITEMSTRUCT];

alias LPMEASUREITEMSTRUCT = Pointer[Struct_tagMEASUREITEMSTRUCT];

record Struct_tagDRAWITEMSTRUCT (
    CtlType : UINT,
    CtlID : UINT,
    itemID : UINT,
    itemAction : UINT,
    itemState : UINT,
    hwndItem : HWND,
    hDC : HDC,
    rcItem : RECT,
    itemData : ULONG_PTR,
);

alias DRAWITEMSTRUCT = Struct_tagDRAWITEMSTRUCT;

alias PDRAWITEMSTRUCT = Pointer[Struct_tagDRAWITEMSTRUCT];

alias LPDRAWITEMSTRUCT = Pointer[Struct_tagDRAWITEMSTRUCT];

record Struct_tagDELETEITEMSTRUCT (
    CtlType : UINT,
    CtlID : UINT,
    itemID : UINT,
    hwndItem : HWND,
    itemData : ULONG_PTR,
);

alias DELETEITEMSTRUCT = Struct_tagDELETEITEMSTRUCT;

alias PDELETEITEMSTRUCT = Pointer[Struct_tagDELETEITEMSTRUCT];

alias LPDELETEITEMSTRUCT = Pointer[Struct_tagDELETEITEMSTRUCT];

record Struct_tagCOMPAREITEMSTRUCT (
    CtlType : UINT,
    CtlID : UINT,
    hwndItem : HWND,
    itemID1 : UINT,
    itemData1 : ULONG_PTR,
    itemID2 : UINT,
    itemData2 : ULONG_PTR,
    dwLocaleId : DWORD,
);

alias COMPAREITEMSTRUCT = Struct_tagCOMPAREITEMSTRUCT;

alias PCOMPAREITEMSTRUCT = Pointer[Struct_tagCOMPAREITEMSTRUCT];

alias LPCOMPAREITEMSTRUCT = Pointer[Struct_tagCOMPAREITEMSTRUCT];

external (stdcall) GetMessageA(arg0:LPMSG, arg1:HWND, arg2:UINT, arg3:UINT) : BOOL;

external (stdcall) GetMessageW(arg0:LPMSG, arg1:HWND, arg2:UINT, arg3:UINT) : BOOL;

external (stdcall) TranslateMessage(arg0:Pointer[MSG]) : BOOL;

external (stdcall) DispatchMessageA(arg0:Pointer[MSG]) : LRESULT;

external (stdcall) DispatchMessageW(arg0:Pointer[MSG]) : LRESULT;

external (stdcall) SetMessageQueue(arg0:Int) : BOOL;

external (stdcall) PeekMessageA(arg0:LPMSG, arg1:HWND, arg2:UINT, arg3:UINT, arg4:UINT) : BOOL;

external (stdcall) PeekMessageW(arg0:LPMSG, arg1:HWND, arg2:UINT, arg3:UINT, arg4:UINT) : BOOL;

external (stdcall) RegisterHotKey(arg0:HWND, arg1:Int, arg2:UINT, arg3:UINT) : BOOL;

external (stdcall) UnregisterHotKey(arg0:HWND, arg1:Int) : BOOL;

external (stdcall) ExitWindowsEx(arg0:UINT, arg1:DWORD) : BOOL;

external (stdcall) SwapMouseButton(arg0:BOOL) : BOOL;

external (stdcall) GetMessagePos() : DWORD;

external (stdcall) GetMessageTime() : LONG;

external (stdcall) GetMessageExtraInfo() : LPARAM;

external (stdcall) IsWow64Message() : BOOL;

external (stdcall) SetMessageExtraInfo(arg0:LPARAM) : LPARAM;

external (stdcall) SendMessageA(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : LRESULT;

external (stdcall) SendMessageW(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : LRESULT;

external (stdcall) SendMessageTimeoutA(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM, arg4:UINT, arg5:UINT, arg6:PDWORD_PTR) : LRESULT;

external (stdcall) SendMessageTimeoutW(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM, arg4:UINT, arg5:UINT, arg6:PDWORD_PTR) : LRESULT;

external (stdcall) SendNotifyMessageA(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : BOOL;

external (stdcall) SendNotifyMessageW(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : BOOL;

external (stdcall) SendMessageCallbackA(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM, arg4:SENDASYNCPROC, arg5:ULONG_PTR) : BOOL;

external (stdcall) SendMessageCallbackW(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM, arg4:SENDASYNCPROC, arg5:ULONG_PTR) : BOOL;

record Struct_Unnamed136 (
    cbSize : UINT,
    hdesk : HDESK,
    hwnd : HWND,
    luid : LUID,
);

alias BSMINFO = Struct_Unnamed136;

alias PBSMINFO = Pointer[Struct_Unnamed136];

external (stdcall) BroadcastSystemMessageExA(arg0:DWORD, arg1:LPDWORD, arg2:UINT, arg3:WPARAM, arg4:LPARAM, arg5:PBSMINFO) : CLong;

external (stdcall) BroadcastSystemMessageExW(arg0:DWORD, arg1:LPDWORD, arg2:UINT, arg3:WPARAM, arg4:LPARAM, arg5:PBSMINFO) : CLong;

external (stdcall) BroadcastSystemMessageA(arg0:DWORD, arg1:LPDWORD, arg2:UINT, arg3:WPARAM, arg4:LPARAM) : CLong;

external (stdcall) BroadcastSystemMessageW(arg0:DWORD, arg1:LPDWORD, arg2:UINT, arg3:WPARAM, arg4:LPARAM) : CLong;

alias HDEVNOTIFY = PVOID;

alias PHDEVNOTIFY = Pointer[HDEVNOTIFY];

external (stdcall) RegisterDeviceNotificationA(arg0:HANDLE, arg1:LPVOID, arg2:DWORD) : HDEVNOTIFY;

external (stdcall) RegisterDeviceNotificationW(arg0:HANDLE, arg1:LPVOID, arg2:DWORD) : HDEVNOTIFY;

external (stdcall) UnregisterDeviceNotification(arg0:HDEVNOTIFY) : BOOL;

alias HPOWERNOTIFY = PVOID;

alias PHPOWERNOTIFY = Pointer[HPOWERNOTIFY];

external (stdcall) RegisterPowerSettingNotification(arg0:HANDLE, arg1:LPCGUID, arg2:DWORD) : HPOWERNOTIFY;

external (stdcall) UnregisterPowerSettingNotification(arg0:HPOWERNOTIFY) : BOOL;

external (stdcall) PostMessageA(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : BOOL;

external (stdcall) PostMessageW(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : BOOL;

external (stdcall) PostThreadMessageA(arg0:DWORD, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : BOOL;

external (stdcall) PostThreadMessageW(arg0:DWORD, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : BOOL;

external (stdcall) AttachThreadInput(arg0:DWORD, arg1:DWORD, arg2:BOOL) : BOOL;

external (stdcall) ReplyMessage(arg0:LRESULT) : BOOL;

external (stdcall) WaitMessage() : BOOL;

external (stdcall) WaitForInputIdle(arg0:HANDLE, arg1:DWORD) : DWORD;

external (stdcall) DefWindowProcA(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : LRESULT;

external (stdcall) DefWindowProcW(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : LRESULT;

external (stdcall) PostQuitMessage(arg0:Int) : ;

external (stdcall) CallWindowProcA(arg0:WNDPROC, arg1:HWND, arg2:UINT, arg3:WPARAM, arg4:LPARAM) : LRESULT;

external (stdcall) CallWindowProcW(arg0:WNDPROC, arg1:HWND, arg2:UINT, arg3:WPARAM, arg4:LPARAM) : LRESULT;

external (stdcall) InSendMessage() : BOOL;

external (stdcall) InSendMessageEx(arg0:LPVOID) : DWORD;

external (stdcall) GetDoubleClickTime() : UINT;

external (stdcall) SetDoubleClickTime(arg0:UINT) : BOOL;

external (stdcall) RegisterClassA(arg0:Pointer[WNDCLASSA]) : ATOM;

external (stdcall) RegisterClassW(arg0:Pointer[WNDCLASSW]) : ATOM;

external (stdcall) UnregisterClassA(arg0:LPCSTR, arg1:HINSTANCE) : BOOL;

external (stdcall) UnregisterClassW(arg0:LPCWSTR, arg1:HINSTANCE) : BOOL;

external (stdcall) GetClassInfoA(arg0:HINSTANCE, arg1:LPCSTR, arg2:LPWNDCLASSA) : BOOL;

external (stdcall) GetClassInfoW(arg0:HINSTANCE, arg1:LPCWSTR, arg2:LPWNDCLASSW) : BOOL;

external (stdcall) RegisterClassExA(arg0:Pointer[WNDCLASSEXA]) : ATOM;

external (stdcall) RegisterClassExW(arg0:Pointer[WNDCLASSEXW]) : ATOM;

external (stdcall) GetClassInfoExA(arg0:HINSTANCE, arg1:LPCSTR, arg2:LPWNDCLASSEXA) : BOOL;

external (stdcall) GetClassInfoExW(arg0:HINSTANCE, arg1:LPCWSTR, arg2:LPWNDCLASSEXW) : BOOL;

alias PREGISTERCLASSNAMEW = StdCallCodePointer[[LPCWSTR],[BOOLEAN]];

external (stdcall) CreateWindowExA(arg0:DWORD, arg1:LPCSTR, arg2:LPCSTR, arg3:DWORD, arg4:Int, arg5:Int, arg6:Int, arg7:Int, arg8:HWND, arg9:HMENU, arg10:HINSTANCE, arg11:LPVOID) : HWND;

external (stdcall) CreateWindowExW(arg0:DWORD, arg1:LPCWSTR, arg2:LPCWSTR, arg3:DWORD, arg4:Int, arg5:Int, arg6:Int, arg7:Int, arg8:HWND, arg9:HMENU, arg10:HINSTANCE, arg11:LPVOID) : HWND;

external (stdcall) IsWindow(arg0:HWND) : BOOL;

external (stdcall) IsMenu(arg0:HMENU) : BOOL;

external (stdcall) IsChild(arg0:HWND, arg1:HWND) : BOOL;

external (stdcall) DestroyWindow(arg0:HWND) : BOOL;

external (stdcall) ShowWindow(arg0:HWND, arg1:Int) : BOOL;

external (stdcall) AnimateWindow(arg0:HWND, arg1:DWORD, arg2:DWORD) : BOOL;

external (stdcall) UpdateLayeredWindow(arg0:HWND, arg1:HDC, arg2:Pointer[POINT], arg3:Pointer[SIZE], arg4:HDC, arg5:Pointer[POINT], arg6:COLORREF, arg7:Pointer[BLENDFUNCTION], arg8:DWORD) : BOOL;

record Struct_tagUPDATELAYEREDWINDOWINFO (
    cbSize : DWORD,
    hdcDst : HDC,
    pptDst : Pointer[POINT],
    psize : Pointer[SIZE],
    hdcSrc : HDC,
    pptSrc : Pointer[POINT],
    crKey : COLORREF,
    pblend : Pointer[BLENDFUNCTION],
    dwFlags : DWORD,
    prcDirty : Pointer[RECT],
);

alias UPDATELAYEREDWINDOWINFO = Struct_tagUPDATELAYEREDWINDOWINFO;

alias PUPDATELAYEREDWINDOWINFO = Pointer[Struct_tagUPDATELAYEREDWINDOWINFO];

external (stdcall) UpdateLayeredWindowIndirect(arg0:HWND, arg1:Pointer[UPDATELAYEREDWINDOWINFO]) : BOOL;

external (stdcall) GetLayeredWindowAttributes(arg0:HWND, arg1:Pointer[COLORREF], arg2:Pointer[BYTE], arg3:Pointer[DWORD]) : BOOL;

external (stdcall) PrintWindow(arg0:HWND, arg1:HDC, arg2:UINT) : BOOL;

external (stdcall) SetLayeredWindowAttributes(arg0:HWND, arg1:COLORREF, arg2:BYTE, arg3:DWORD) : BOOL;

external (stdcall) ShowWindowAsync(arg0:HWND, arg1:Int) : BOOL;

external (stdcall) FlashWindow(arg0:HWND, arg1:BOOL) : BOOL;

record Struct_Unnamed137 (
    cbSize : UINT,
    hwnd : HWND,
    dwFlags : DWORD,
    uCount : UINT,
    dwTimeout : DWORD,
);

alias FLASHWINFO = Struct_Unnamed137;

alias PFLASHWINFO = Pointer[Struct_Unnamed137];

external (stdcall) FlashWindowEx(arg0:PFLASHWINFO) : BOOL;

external (stdcall) ShowOwnedPopups(arg0:HWND, arg1:BOOL) : BOOL;

external (stdcall) OpenIcon(arg0:HWND) : BOOL;

external (stdcall) CloseWindow(arg0:HWND) : BOOL;

external (stdcall) MoveWindow(arg0:HWND, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:BOOL) : BOOL;

external (stdcall) SetWindowPos(arg0:HWND, arg1:HWND, arg2:Int, arg3:Int, arg4:Int, arg5:Int, arg6:UINT) : BOOL;

external (stdcall) GetWindowPlacement(arg0:HWND, arg1:Pointer[WINDOWPLACEMENT]) : BOOL;

external (stdcall) SetWindowPlacement(arg0:HWND, arg1:Pointer[WINDOWPLACEMENT]) : BOOL;

external (stdcall) GetWindowDisplayAffinity(arg0:HWND, arg1:Pointer[DWORD]) : BOOL;

external (stdcall) SetWindowDisplayAffinity(arg0:HWND, arg1:DWORD) : BOOL;

external (stdcall) BeginDeferWindowPos(arg0:Int) : HDWP;

external (stdcall) DeferWindowPos(arg0:HDWP, arg1:HWND, arg2:HWND, arg3:Int, arg4:Int, arg5:Int, arg6:Int, arg7:UINT) : HDWP;

external (stdcall) EndDeferWindowPos(arg0:HDWP) : BOOL;

external (stdcall) IsWindowVisible(arg0:HWND) : BOOL;

external (stdcall) IsIconic(arg0:HWND) : BOOL;

external (stdcall) AnyPopup() : BOOL;

external (stdcall) BringWindowToTop(arg0:HWND) : BOOL;

external (stdcall) IsZoomed(arg0:HWND) : BOOL;

record Struct_Unnamed138 (
    style : DWORD,
    dwExtendedStyle : DWORD,
    cdit : WORD,
    x : Short,
    y : Short,
    cx : Short,
    cy : Short,
);

alias DLGTEMPLATE = Struct_Unnamed138;

alias LPDLGTEMPLATEA = Pointer[DLGTEMPLATE];

alias LPDLGTEMPLATEW = Pointer[DLGTEMPLATE];

alias LPDLGTEMPLATE = LPDLGTEMPLATEA;

alias LPCDLGTEMPLATEA = Pointer[DLGTEMPLATE];

alias LPCDLGTEMPLATEW = Pointer[DLGTEMPLATE];

alias LPCDLGTEMPLATE = LPCDLGTEMPLATEA;

record Struct_Unnamed139 (
    style : DWORD,
    dwExtendedStyle : DWORD,
    x : Short,
    y : Short,
    cx : Short,
    cy : Short,
    id : WORD,
);

alias DLGITEMTEMPLATE = Struct_Unnamed139;

alias PDLGITEMTEMPLATEA = Pointer[DLGITEMTEMPLATE];

alias PDLGITEMTEMPLATEW = Pointer[DLGITEMTEMPLATE];

alias PDLGITEMTEMPLATE = PDLGITEMTEMPLATEA;

alias LPDLGITEMTEMPLATEA = Pointer[DLGITEMTEMPLATE];

alias LPDLGITEMTEMPLATEW = Pointer[DLGITEMTEMPLATE];

alias LPDLGITEMTEMPLATE = LPDLGITEMTEMPLATEA;

external (stdcall) CreateDialogParamA(arg0:HINSTANCE, arg1:LPCSTR, arg2:HWND, arg3:DLGPROC, arg4:LPARAM) : HWND;

external (stdcall) CreateDialogParamW(arg0:HINSTANCE, arg1:LPCWSTR, arg2:HWND, arg3:DLGPROC, arg4:LPARAM) : HWND;

external (stdcall) CreateDialogIndirectParamA(arg0:HINSTANCE, arg1:LPCDLGTEMPLATEA, arg2:HWND, arg3:DLGPROC, arg4:LPARAM) : HWND;

external (stdcall) CreateDialogIndirectParamW(arg0:HINSTANCE, arg1:LPCDLGTEMPLATEW, arg2:HWND, arg3:DLGPROC, arg4:LPARAM) : HWND;

external (stdcall) DialogBoxParamA(arg0:HINSTANCE, arg1:LPCSTR, arg2:HWND, arg3:DLGPROC, arg4:LPARAM) : INT_PTR;

external (stdcall) DialogBoxParamW(arg0:HINSTANCE, arg1:LPCWSTR, arg2:HWND, arg3:DLGPROC, arg4:LPARAM) : INT_PTR;

external (stdcall) DialogBoxIndirectParamA(arg0:HINSTANCE, arg1:LPCDLGTEMPLATEA, arg2:HWND, arg3:DLGPROC, arg4:LPARAM) : INT_PTR;

external (stdcall) DialogBoxIndirectParamW(arg0:HINSTANCE, arg1:LPCDLGTEMPLATEW, arg2:HWND, arg3:DLGPROC, arg4:LPARAM) : INT_PTR;

external (stdcall) EndDialog(arg0:HWND, arg1:INT_PTR) : BOOL;

external (stdcall) GetDlgItem(arg0:HWND, arg1:Int) : HWND;

external (stdcall) SetDlgItemInt(arg0:HWND, arg1:Int, arg2:UINT, arg3:BOOL) : BOOL;

external (stdcall) GetDlgItemInt(arg0:HWND, arg1:Int, arg2:Pointer[BOOL], arg3:BOOL) : UINT;

external (stdcall) SetDlgItemTextA(arg0:HWND, arg1:Int, arg2:LPCSTR) : BOOL;

external (stdcall) SetDlgItemTextW(arg0:HWND, arg1:Int, arg2:LPCWSTR) : BOOL;

external (stdcall) GetDlgItemTextA(arg0:HWND, arg1:Int, arg2:LPSTR, arg3:Int) : UINT;

external (stdcall) GetDlgItemTextW(arg0:HWND, arg1:Int, arg2:LPWSTR, arg3:Int) : UINT;

external (stdcall) CheckDlgButton(arg0:HWND, arg1:Int, arg2:UINT) : BOOL;

external (stdcall) CheckRadioButton(arg0:HWND, arg1:Int, arg2:Int, arg3:Int) : BOOL;

external (stdcall) IsDlgButtonChecked(arg0:HWND, arg1:Int) : UINT;

external (stdcall) SendDlgItemMessageA(arg0:HWND, arg1:Int, arg2:UINT, arg3:WPARAM, arg4:LPARAM) : LRESULT;

external (stdcall) SendDlgItemMessageW(arg0:HWND, arg1:Int, arg2:UINT, arg3:WPARAM, arg4:LPARAM) : LRESULT;

external (stdcall) GetNextDlgGroupItem(arg0:HWND, arg1:HWND, arg2:BOOL) : HWND;

external (stdcall) GetNextDlgTabItem(arg0:HWND, arg1:HWND, arg2:BOOL) : HWND;

external (stdcall) GetDlgCtrlID(arg0:HWND) : Int;

external (stdcall) GetDialogBaseUnits() : CLong;

external (stdcall) DefDlgProcA(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : LRESULT;

external (stdcall) DefDlgProcW(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : LRESULT;

external (stdcall) CallMsgFilterA(arg0:LPMSG, arg1:Int) : BOOL;

external (stdcall) CallMsgFilterW(arg0:LPMSG, arg1:Int) : BOOL;

external (stdcall) OpenClipboard(arg0:HWND) : BOOL;

external (stdcall) CloseClipboard() : BOOL;

external (stdcall) GetClipboardSequenceNumber() : DWORD;

external (stdcall) GetClipboardOwner() : HWND;

external (stdcall) SetClipboardViewer(arg0:HWND) : HWND;

external (stdcall) GetClipboardViewer() : HWND;

external (stdcall) ChangeClipboardChain(arg0:HWND, arg1:HWND) : BOOL;

external (stdcall) SetClipboardData(arg0:UINT, arg1:HANDLE) : HANDLE;

external (stdcall) GetClipboardData(arg0:UINT) : HANDLE;

external (stdcall) RegisterClipboardFormatA(arg0:LPCSTR) : UINT;

external (stdcall) RegisterClipboardFormatW(arg0:LPCWSTR) : UINT;

external (stdcall) CountClipboardFormats() : Int;

external (stdcall) EnumClipboardFormats(arg0:UINT) : UINT;

external (stdcall) GetClipboardFormatNameA(arg0:UINT, arg1:LPSTR, arg2:Int) : Int;

external (stdcall) GetClipboardFormatNameW(arg0:UINT, arg1:LPWSTR, arg2:Int) : Int;

external (stdcall) EmptyClipboard() : BOOL;

external (stdcall) IsClipboardFormatAvailable(arg0:UINT) : BOOL;

external (stdcall) GetPriorityClipboardFormat(arg0:Pointer[UINT], arg1:Int) : Int;

external (stdcall) GetOpenClipboardWindow() : HWND;

external (stdcall) AddClipboardFormatListener(arg0:HWND) : BOOL;

external (stdcall) RemoveClipboardFormatListener(arg0:HWND) : BOOL;

external (stdcall) GetUpdatedClipboardFormats(arg0:PUINT, arg1:UINT, arg2:PUINT) : BOOL;

external (stdcall) CharToOemA(arg0:LPCSTR, arg1:LPSTR) : BOOL;

external (stdcall) CharToOemW(arg0:LPCWSTR, arg1:LPSTR) : BOOL;

external (stdcall) OemToCharA(arg0:LPCSTR, arg1:LPSTR) : BOOL;

external (stdcall) OemToCharW(arg0:LPCSTR, arg1:LPWSTR) : BOOL;

external (stdcall) CharToOemBuffA(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD) : BOOL;

external (stdcall) CharToOemBuffW(arg0:LPCWSTR, arg1:LPSTR, arg2:DWORD) : BOOL;

external (stdcall) OemToCharBuffA(arg0:LPCSTR, arg1:LPSTR, arg2:DWORD) : BOOL;

external (stdcall) OemToCharBuffW(arg0:LPCSTR, arg1:LPWSTR, arg2:DWORD) : BOOL;

external (stdcall) CharUpperA(arg0:LPSTR) : LPSTR;

external (stdcall) CharUpperW(arg0:LPWSTR) : LPWSTR;

external (stdcall) CharUpperBuffA(arg0:LPSTR, arg1:DWORD) : DWORD;

external (stdcall) CharUpperBuffW(arg0:LPWSTR, arg1:DWORD) : DWORD;

external (stdcall) CharLowerA(arg0:LPSTR) : LPSTR;

external (stdcall) CharLowerW(arg0:LPWSTR) : LPWSTR;

external (stdcall) CharLowerBuffA(arg0:LPSTR, arg1:DWORD) : DWORD;

external (stdcall) CharLowerBuffW(arg0:LPWSTR, arg1:DWORD) : DWORD;

external (stdcall) CharNextA(arg0:LPCSTR) : LPSTR;

external (stdcall) CharNextW(arg0:LPCWSTR) : LPWSTR;

external (stdcall) CharPrevA(arg0:LPCSTR, arg1:LPCSTR) : LPSTR;

external (stdcall) CharPrevW(arg0:LPCWSTR, arg1:LPCWSTR) : LPWSTR;

external (stdcall) CharNextExA(arg0:WORD, arg1:LPCSTR, arg2:DWORD) : LPSTR;

external (stdcall) CharPrevExA(arg0:WORD, arg1:LPCSTR, arg2:LPCSTR, arg3:DWORD) : LPSTR;

external (stdcall) IsCharAlphaA(arg0:CHAR) : BOOL;

external (stdcall) IsCharAlphaW(arg0:WCHAR) : BOOL;

external (stdcall) IsCharAlphaNumericA(arg0:CHAR) : BOOL;

external (stdcall) IsCharAlphaNumericW(arg0:WCHAR) : BOOL;

external (stdcall) IsCharUpperA(arg0:CHAR) : BOOL;

external (stdcall) IsCharUpperW(arg0:WCHAR) : BOOL;

external (stdcall) IsCharLowerA(arg0:CHAR) : BOOL;

external (stdcall) IsCharLowerW(arg0:WCHAR) : BOOL;

external (stdcall) SetFocus(arg0:HWND) : HWND;

external (stdcall) GetActiveWindow() : HWND;

external (stdcall) GetFocus() : HWND;

external (stdcall) GetKBCodePage() : UINT;

external (stdcall) GetKeyState(arg0:Int) : SHORT;

external (stdcall) GetAsyncKeyState(arg0:Int) : SHORT;

external (stdcall) GetKeyboardState(arg0:PBYTE) : BOOL;

external (stdcall) SetKeyboardState(arg0:LPBYTE) : BOOL;

external (stdcall) GetKeyNameTextA(arg0:LONG, arg1:LPSTR, arg2:Int) : Int;

external (stdcall) GetKeyNameTextW(arg0:LONG, arg1:LPWSTR, arg2:Int) : Int;

external (stdcall) GetKeyboardType(arg0:Int) : Int;

external (stdcall) ToAscii(arg0:UINT, arg1:UINT, arg2:Pointer[BYTE], arg3:LPWORD, arg4:UINT) : Int;

external (stdcall) ToAsciiEx(arg0:UINT, arg1:UINT, arg2:Pointer[BYTE], arg3:LPWORD, arg4:UINT, arg5:HKL) : Int;

external (stdcall) ToUnicode(arg0:UINT, arg1:UINT, arg2:Pointer[BYTE], arg3:LPWSTR, arg4:Int, arg5:UINT) : Int;

external (stdcall) OemKeyScan(arg0:WORD) : DWORD;

external (stdcall) VkKeyScanA(arg0:CHAR) : SHORT;

external (stdcall) VkKeyScanW(arg0:WCHAR) : SHORT;

external (stdcall) VkKeyScanExA(arg0:CHAR, arg1:HKL) : SHORT;

external (stdcall) VkKeyScanExW(arg0:WCHAR, arg1:HKL) : SHORT;

external (stdcall) keybd_event(arg0:BYTE, arg1:BYTE, arg2:DWORD, arg3:ULONG_PTR) : ;

external (stdcall) mouse_event(arg0:DWORD, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:ULONG_PTR) : ;

record Struct_tagMOUSEINPUT (
    dx : LONG,
    dy : LONG,
    mouseData : DWORD,
    dwFlags : DWORD,
    time : DWORD,
    dwExtraInfo : ULONG_PTR,
);

alias MOUSEINPUT = Struct_tagMOUSEINPUT;

alias PMOUSEINPUT = Pointer[Struct_tagMOUSEINPUT];

alias LPMOUSEINPUT = Pointer[Struct_tagMOUSEINPUT];

record Struct_tagKEYBDINPUT (
    wVk : WORD,
    wScan : WORD,
    dwFlags : DWORD,
    time : DWORD,
    dwExtraInfo : ULONG_PTR,
);

alias KEYBDINPUT = Struct_tagKEYBDINPUT;

alias PKEYBDINPUT = Pointer[Struct_tagKEYBDINPUT];

alias LPKEYBDINPUT = Pointer[Struct_tagKEYBDINPUT];

record Struct_tagHARDWAREINPUT (
    uMsg : DWORD,
    wParamL : WORD,
    wParamH : WORD,
);

alias HARDWAREINPUT = Struct_tagHARDWAREINPUT;

alias PHARDWAREINPUT = Pointer[Struct_tagHARDWAREINPUT];

alias LPHARDWAREINPUT = Pointer[Struct_tagHARDWAREINPUT];

record Struct_tagINPUT (
    type : DWORD,
);

alias Union_Unnamed140 = Union[
    /* mi */ MOUSEINPUT,
    /* ki */ KEYBDINPUT,
    /* hi */ HARDWAREINPUT,
];

alias INPUT = Struct_tagINPUT;

alias PINPUT = Pointer[Struct_tagINPUT];

alias LPINPUT = Pointer[Struct_tagINPUT];

external (stdcall) SendInput(arg0:UINT, arg1:LPINPUT, arg2:Int) : UINT;

record Struct_HTOUCHINPUT__ (
    unused : Int,
);

alias HTOUCHINPUT = Pointer[Struct_HTOUCHINPUT__];

record Struct_tagTOUCHINPUT (
    x : LONG,
    y : LONG,
    hSource : HANDLE,
    dwID : DWORD,
    dwFlags : DWORD,
    dwMask : DWORD,
    dwTime : DWORD,
    dwExtraInfo : ULONG_PTR,
    cxContact : DWORD,
    cyContact : DWORD,
);

alias TOUCHINPUT = Struct_tagTOUCHINPUT;

alias PTOUCHINPUT = Pointer[Struct_tagTOUCHINPUT];

alias PCTOUCHINPUT = Pointer[TOUCHINPUT];

external (stdcall) GetTouchInputInfo(arg0:HTOUCHINPUT, arg1:UINT, arg2:PTOUCHINPUT, arg3:Int) : BOOL;

external (stdcall) CloseTouchInputHandle(arg0:HTOUCHINPUT) : BOOL;

external (stdcall) RegisterTouchWindow(arg0:HWND, arg1:ULONG) : BOOL;

external (stdcall) UnregisterTouchWindow(arg0:HWND) : BOOL;

external (stdcall) IsTouchWindow(arg0:HWND, arg1:PULONG) : BOOL;

record Struct_tagLASTINPUTINFO (
    cbSize : UINT,
    dwTime : DWORD,
);

alias LASTINPUTINFO = Struct_tagLASTINPUTINFO;

alias PLASTINPUTINFO = Pointer[Struct_tagLASTINPUTINFO];

external (stdcall) GetLastInputInfo(arg0:PLASTINPUTINFO) : BOOL;

external (stdcall) MapVirtualKeyA(arg0:UINT, arg1:UINT) : UINT;

external (stdcall) MapVirtualKeyW(arg0:UINT, arg1:UINT) : UINT;

external (stdcall) MapVirtualKeyExA(arg0:UINT, arg1:UINT, arg2:HKL) : UINT;

external (stdcall) MapVirtualKeyExW(arg0:UINT, arg1:UINT, arg2:HKL) : UINT;

external (stdcall) GetInputState() : BOOL;

external (stdcall) GetQueueStatus(arg0:UINT) : DWORD;

external (stdcall) GetCapture() : HWND;

external (stdcall) SetCapture(arg0:HWND) : HWND;

external (stdcall) ReleaseCapture() : BOOL;

external (stdcall) MsgWaitForMultipleObjects(arg0:DWORD, arg1:Pointer[HANDLE], arg2:BOOL, arg3:DWORD, arg4:DWORD) : DWORD;

external (stdcall) MsgWaitForMultipleObjectsEx(arg0:DWORD, arg1:Pointer[HANDLE], arg2:DWORD, arg3:DWORD, arg4:DWORD) : DWORD;

external (stdcall) SetTimer(arg0:HWND, arg1:UINT_PTR, arg2:UINT, arg3:TIMERPROC) : UINT_PTR;

external (stdcall) KillTimer(arg0:HWND, arg1:UINT_PTR) : BOOL;

external (stdcall) IsWindowUnicode(arg0:HWND) : BOOL;

external (stdcall) EnableWindow(arg0:HWND, arg1:BOOL) : BOOL;

external (stdcall) IsWindowEnabled(arg0:HWND) : BOOL;

external (stdcall) LoadAcceleratorsA(arg0:HINSTANCE, arg1:LPCSTR) : HACCEL;

external (stdcall) LoadAcceleratorsW(arg0:HINSTANCE, arg1:LPCWSTR) : HACCEL;

external (stdcall) CreateAcceleratorTableA(arg0:LPACCEL, arg1:Int) : HACCEL;

external (stdcall) CreateAcceleratorTableW(arg0:LPACCEL, arg1:Int) : HACCEL;

external (stdcall) DestroyAcceleratorTable(arg0:HACCEL) : BOOL;

external (stdcall) CopyAcceleratorTableA(arg0:HACCEL, arg1:LPACCEL, arg2:Int) : Int;

external (stdcall) CopyAcceleratorTableW(arg0:HACCEL, arg1:LPACCEL, arg2:Int) : Int;

external (stdcall) TranslateAcceleratorA(arg0:HWND, arg1:HACCEL, arg2:LPMSG) : Int;

external (stdcall) TranslateAcceleratorW(arg0:HWND, arg1:HACCEL, arg2:LPMSG) : Int;

external (stdcall) GetSystemMetrics(arg0:Int) : Int;

external (stdcall) LoadMenuA(arg0:HINSTANCE, arg1:LPCSTR) : HMENU;

external (stdcall) LoadMenuW(arg0:HINSTANCE, arg1:LPCWSTR) : HMENU;

external (stdcall) LoadMenuIndirectA(arg0:Pointer[MENUTEMPLATEA]) : HMENU;

external (stdcall) LoadMenuIndirectW(arg0:Pointer[MENUTEMPLATEW]) : HMENU;

external (stdcall) GetMenu(arg0:HWND) : HMENU;

external (stdcall) SetMenu(arg0:HWND, arg1:HMENU) : BOOL;

external (stdcall) ChangeMenuA(arg0:HMENU, arg1:UINT, arg2:LPCSTR, arg3:UINT, arg4:UINT) : BOOL;

external (stdcall) ChangeMenuW(arg0:HMENU, arg1:UINT, arg2:LPCWSTR, arg3:UINT, arg4:UINT) : BOOL;

external (stdcall) HiliteMenuItem(arg0:HWND, arg1:HMENU, arg2:UINT, arg3:UINT) : BOOL;

external (stdcall) GetMenuStringA(arg0:HMENU, arg1:UINT, arg2:LPSTR, arg3:Int, arg4:UINT) : Int;

external (stdcall) GetMenuStringW(arg0:HMENU, arg1:UINT, arg2:LPWSTR, arg3:Int, arg4:UINT) : Int;

external (stdcall) GetMenuState(arg0:HMENU, arg1:UINT, arg2:UINT) : UINT;

external (stdcall) DrawMenuBar(arg0:HWND) : BOOL;

external (stdcall) GetSystemMenu(arg0:HWND, arg1:BOOL) : HMENU;

external (stdcall) CreateMenu() : HMENU;

external (stdcall) CreatePopupMenu() : HMENU;

external (stdcall) DestroyMenu(arg0:HMENU) : BOOL;

external (stdcall) CheckMenuItem(arg0:HMENU, arg1:UINT, arg2:UINT) : DWORD;

external (stdcall) EnableMenuItem(arg0:HMENU, arg1:UINT, arg2:UINT) : BOOL;

external (stdcall) GetSubMenu(arg0:HMENU, arg1:Int) : HMENU;

external (stdcall) GetMenuItemID(arg0:HMENU, arg1:Int) : UINT;

external (stdcall) GetMenuItemCount(arg0:HMENU) : Int;

external (stdcall) InsertMenuA(arg0:HMENU, arg1:UINT, arg2:UINT, arg3:UINT_PTR, arg4:LPCSTR) : BOOL;

external (stdcall) InsertMenuW(arg0:HMENU, arg1:UINT, arg2:UINT, arg3:UINT_PTR, arg4:LPCWSTR) : BOOL;

external (stdcall) AppendMenuA(arg0:HMENU, arg1:UINT, arg2:UINT_PTR, arg3:LPCSTR) : BOOL;

external (stdcall) AppendMenuW(arg0:HMENU, arg1:UINT, arg2:UINT_PTR, arg3:LPCWSTR) : BOOL;

external (stdcall) ModifyMenuA(arg0:HMENU, arg1:UINT, arg2:UINT, arg3:UINT_PTR, arg4:LPCSTR) : BOOL;

external (stdcall) ModifyMenuW(arg0:HMENU, arg1:UINT, arg2:UINT, arg3:UINT_PTR, arg4:LPCWSTR) : BOOL;

external (stdcall) RemoveMenu(arg0:HMENU, arg1:UINT, arg2:UINT) : BOOL;

external (stdcall) DeleteMenu(arg0:HMENU, arg1:UINT, arg2:UINT) : BOOL;

external (stdcall) SetMenuItemBitmaps(arg0:HMENU, arg1:UINT, arg2:UINT, arg3:HBITMAP, arg4:HBITMAP) : BOOL;

external (stdcall) GetMenuCheckMarkDimensions() : LONG;

external (stdcall) TrackPopupMenu(arg0:HMENU, arg1:UINT, arg2:Int, arg3:Int, arg4:Int, arg5:HWND, arg6:Pointer[RECT]) : BOOL;

record Struct_tagTPMPARAMS (
    cbSize : UINT,
    rcExclude : RECT,
);

alias TPMPARAMS = Struct_tagTPMPARAMS;

alias LPTPMPARAMS = Pointer[TPMPARAMS];

external (stdcall) TrackPopupMenuEx(arg0:HMENU, arg1:UINT, arg2:Int, arg3:Int, arg4:HWND, arg5:LPTPMPARAMS) : BOOL;

external (stdcall) CalculatePopupWindowPosition(arg0:Pointer[POINT], arg1:Pointer[SIZE], arg2:UINT, arg3:Pointer[RECT], arg4:Pointer[RECT]) : BOOL;

record Struct_tagMENUINFO (
    cbSize : DWORD,
    fMask : DWORD,
    dwStyle : DWORD,
    cyMax : UINT,
    hbrBack : HBRUSH,
    dwContextHelpID : DWORD,
    dwMenuData : ULONG_PTR,
);

alias MENUINFO = Struct_tagMENUINFO;

alias LPMENUINFO = Pointer[Struct_tagMENUINFO];

alias LPCMENUINFO = Pointer[MENUINFO];

external (stdcall) GetMenuInfo(arg0:HMENU, arg1:LPMENUINFO) : BOOL;

external (stdcall) SetMenuInfo(arg0:HMENU, arg1:LPCMENUINFO) : BOOL;

external (stdcall) EndMenu() : BOOL;

record Struct_tagMENUGETOBJECTINFO (
    dwFlags : DWORD,
    uPos : UINT,
    hmenu : HMENU,
    riid : PVOID,
    pvObj : PVOID,
);

alias MENUGETOBJECTINFO = Struct_tagMENUGETOBJECTINFO;

alias PMENUGETOBJECTINFO = Pointer[Struct_tagMENUGETOBJECTINFO];

record Struct_tagMENUITEMINFOA (
    cbSize : UINT,
    fMask : UINT,
    fType : UINT,
    fState : UINT,
    wID : UINT,
    hSubMenu : HMENU,
    hbmpChecked : HBITMAP,
    hbmpUnchecked : HBITMAP,
    dwItemData : ULONG_PTR,
    dwTypeData : LPSTR,
    cch : UINT,
    hbmpItem : HBITMAP,
);

alias MENUITEMINFOA = Struct_tagMENUITEMINFOA;

alias LPMENUITEMINFOA = Pointer[Struct_tagMENUITEMINFOA];

record Struct_tagMENUITEMINFOW (
    cbSize : UINT,
    fMask : UINT,
    fType : UINT,
    fState : UINT,
    wID : UINT,
    hSubMenu : HMENU,
    hbmpChecked : HBITMAP,
    hbmpUnchecked : HBITMAP,
    dwItemData : ULONG_PTR,
    dwTypeData : LPWSTR,
    cch : UINT,
    hbmpItem : HBITMAP,
);

alias MENUITEMINFOW = Struct_tagMENUITEMINFOW;

alias LPMENUITEMINFOW = Pointer[Struct_tagMENUITEMINFOW];

alias MENUITEMINFO = MENUITEMINFOA;

alias LPMENUITEMINFO = LPMENUITEMINFOA;

alias LPCMENUITEMINFOA = Pointer[MENUITEMINFOA];

alias LPCMENUITEMINFOW = Pointer[MENUITEMINFOW];

alias LPCMENUITEMINFO = LPCMENUITEMINFOA;

external (stdcall) InsertMenuItemA(arg0:HMENU, arg1:UINT, arg2:BOOL, arg3:LPCMENUITEMINFOA) : BOOL;

external (stdcall) InsertMenuItemW(arg0:HMENU, arg1:UINT, arg2:BOOL, arg3:LPCMENUITEMINFOW) : BOOL;

external (stdcall) GetMenuItemInfoA(arg0:HMENU, arg1:UINT, arg2:BOOL, arg3:LPMENUITEMINFOA) : BOOL;

external (stdcall) GetMenuItemInfoW(arg0:HMENU, arg1:UINT, arg2:BOOL, arg3:LPMENUITEMINFOW) : BOOL;

external (stdcall) SetMenuItemInfoA(arg0:HMENU, arg1:UINT, arg2:BOOL, arg3:LPCMENUITEMINFOA) : BOOL;

external (stdcall) SetMenuItemInfoW(arg0:HMENU, arg1:UINT, arg2:BOOL, arg3:LPCMENUITEMINFOW) : BOOL;

external (stdcall) GetMenuDefaultItem(arg0:HMENU, arg1:UINT, arg2:UINT) : UINT;

external (stdcall) SetMenuDefaultItem(arg0:HMENU, arg1:UINT, arg2:UINT) : BOOL;

external (stdcall) GetMenuItemRect(arg0:HWND, arg1:HMENU, arg2:UINT, arg3:LPRECT) : BOOL;

external (stdcall) MenuItemFromPoint(arg0:HWND, arg1:HMENU, arg2:POINT) : Int;

record Struct_tagDROPSTRUCT (
    hwndSource : HWND,
    hwndSink : HWND,
    wFmt : DWORD,
    dwData : ULONG_PTR,
    ptDrop : POINT,
    dwControlData : DWORD,
);

alias DROPSTRUCT = Struct_tagDROPSTRUCT;

alias PDROPSTRUCT = Pointer[Struct_tagDROPSTRUCT];

alias LPDROPSTRUCT = Pointer[Struct_tagDROPSTRUCT];

external (stdcall) DragObject(arg0:HWND, arg1:HWND, arg2:UINT, arg3:ULONG_PTR, arg4:HCURSOR) : DWORD;

external (stdcall) DragDetect(arg0:HWND, arg1:POINT) : BOOL;

external (stdcall) DrawIcon(arg0:HDC, arg1:Int, arg2:Int, arg3:HICON) : BOOL;

record Struct_tagDRAWTEXTPARAMS (
    cbSize : UINT,
    iTabLength : Int,
    iLeftMargin : Int,
    iRightMargin : Int,
    uiLengthDrawn : UINT,
);

alias DRAWTEXTPARAMS = Struct_tagDRAWTEXTPARAMS;

alias LPDRAWTEXTPARAMS = Pointer[Struct_tagDRAWTEXTPARAMS];

external (stdcall) DrawTextA(arg0:HDC, arg1:LPCSTR, arg2:Int, arg3:LPRECT, arg4:UINT) : Int;

external (stdcall) DrawTextW(arg0:HDC, arg1:LPCWSTR, arg2:Int, arg3:LPRECT, arg4:UINT) : Int;

external (stdcall) DrawTextExA(arg0:HDC, arg1:LPSTR, arg2:Int, arg3:LPRECT, arg4:UINT, arg5:LPDRAWTEXTPARAMS) : Int;

external (stdcall) DrawTextExW(arg0:HDC, arg1:LPWSTR, arg2:Int, arg3:LPRECT, arg4:UINT, arg5:LPDRAWTEXTPARAMS) : Int;

external (stdcall) GrayStringA(arg0:HDC, arg1:HBRUSH, arg2:GRAYSTRINGPROC, arg3:LPARAM, arg4:Int, arg5:Int, arg6:Int, arg7:Int, arg8:Int) : BOOL;

external (stdcall) GrayStringW(arg0:HDC, arg1:HBRUSH, arg2:GRAYSTRINGPROC, arg3:LPARAM, arg4:Int, arg5:Int, arg6:Int, arg7:Int, arg8:Int) : BOOL;

external (stdcall) DrawStateA(arg0:HDC, arg1:HBRUSH, arg2:DRAWSTATEPROC, arg3:LPARAM, arg4:WPARAM, arg5:Int, arg6:Int, arg7:Int, arg8:Int, arg9:UINT) : BOOL;

external (stdcall) DrawStateW(arg0:HDC, arg1:HBRUSH, arg2:DRAWSTATEPROC, arg3:LPARAM, arg4:WPARAM, arg5:Int, arg6:Int, arg7:Int, arg8:Int, arg9:UINT) : BOOL;

external (stdcall) TabbedTextOutA(arg0:HDC, arg1:Int, arg2:Int, arg3:LPCSTR, arg4:Int, arg5:Int, arg6:Pointer[INT], arg7:Int) : LONG;

external (stdcall) TabbedTextOutW(arg0:HDC, arg1:Int, arg2:Int, arg3:LPCWSTR, arg4:Int, arg5:Int, arg6:Pointer[INT], arg7:Int) : LONG;

external (stdcall) GetTabbedTextExtentA(arg0:HDC, arg1:LPCSTR, arg2:Int, arg3:Int, arg4:Pointer[INT]) : DWORD;

external (stdcall) GetTabbedTextExtentW(arg0:HDC, arg1:LPCWSTR, arg2:Int, arg3:Int, arg4:Pointer[INT]) : DWORD;

external (stdcall) UpdateWindow(arg0:HWND) : BOOL;

external (stdcall) SetActiveWindow(arg0:HWND) : HWND;

external (stdcall) GetForegroundWindow() : HWND;

external (stdcall) PaintDesktop(arg0:HDC) : BOOL;

external (stdcall) SwitchToThisWindow(arg0:HWND, arg1:BOOL) : ;

external (stdcall) SetForegroundWindow(arg0:HWND) : BOOL;

external (stdcall) AllowSetForegroundWindow(arg0:DWORD) : BOOL;

external (stdcall) LockSetForegroundWindow(arg0:UINT) : BOOL;

external (stdcall) WindowFromDC(arg0:HDC) : HWND;

external (stdcall) GetDC(arg0:HWND) : HDC;

external (stdcall) GetDCEx(arg0:HWND, arg1:HRGN, arg2:DWORD) : HDC;

external (stdcall) GetWindowDC(arg0:HWND) : HDC;

external (stdcall) ReleaseDC(arg0:HWND, arg1:HDC) : Int;

external (stdcall) BeginPaint(arg0:HWND, arg1:LPPAINTSTRUCT) : HDC;

external (stdcall) EndPaint(arg0:HWND, arg1:Pointer[PAINTSTRUCT]) : BOOL;

external (stdcall) GetUpdateRect(arg0:HWND, arg1:LPRECT, arg2:BOOL) : BOOL;

external (stdcall) GetUpdateRgn(arg0:HWND, arg1:HRGN, arg2:BOOL) : Int;

external (stdcall) SetWindowRgn(arg0:HWND, arg1:HRGN, arg2:BOOL) : Int;

external (stdcall) GetWindowRgn(arg0:HWND, arg1:HRGN) : Int;

external (stdcall) GetWindowRgnBox(arg0:HWND, arg1:LPRECT) : Int;

external (stdcall) ExcludeUpdateRgn(arg0:HDC, arg1:HWND) : Int;

external (stdcall) InvalidateRect(arg0:HWND, arg1:Pointer[RECT], arg2:BOOL) : BOOL;

external (stdcall) ValidateRect(arg0:HWND, arg1:Pointer[RECT]) : BOOL;

external (stdcall) InvalidateRgn(arg0:HWND, arg1:HRGN, arg2:BOOL) : BOOL;

external (stdcall) ValidateRgn(arg0:HWND, arg1:HRGN) : BOOL;

external (stdcall) RedrawWindow(arg0:HWND, arg1:Pointer[RECT], arg2:HRGN, arg3:UINT) : BOOL;

external (stdcall) LockWindowUpdate(arg0:HWND) : BOOL;

external (stdcall) ScrollWindow(arg0:HWND, arg1:Int, arg2:Int, arg3:Pointer[RECT], arg4:Pointer[RECT]) : BOOL;

external (stdcall) ScrollDC(arg0:HDC, arg1:Int, arg2:Int, arg3:Pointer[RECT], arg4:Pointer[RECT], arg5:HRGN, arg6:LPRECT) : BOOL;

external (stdcall) ScrollWindowEx(arg0:HWND, arg1:Int, arg2:Int, arg3:Pointer[RECT], arg4:Pointer[RECT], arg5:HRGN, arg6:LPRECT, arg7:UINT) : Int;

external (stdcall) SetScrollPos(arg0:HWND, arg1:Int, arg2:Int, arg3:BOOL) : Int;

external (stdcall) GetScrollPos(arg0:HWND, arg1:Int) : Int;

external (stdcall) SetScrollRange(arg0:HWND, arg1:Int, arg2:Int, arg3:Int, arg4:BOOL) : BOOL;

external (stdcall) GetScrollRange(arg0:HWND, arg1:Int, arg2:LPINT, arg3:LPINT) : BOOL;

external (stdcall) ShowScrollBar(arg0:HWND, arg1:Int, arg2:BOOL) : BOOL;

external (stdcall) EnableScrollBar(arg0:HWND, arg1:UINT, arg2:UINT) : BOOL;

external (stdcall) SetPropA(arg0:HWND, arg1:LPCSTR, arg2:HANDLE) : BOOL;

external (stdcall) SetPropW(arg0:HWND, arg1:LPCWSTR, arg2:HANDLE) : BOOL;

external (stdcall) GetPropA(arg0:HWND, arg1:LPCSTR) : HANDLE;

external (stdcall) GetPropW(arg0:HWND, arg1:LPCWSTR) : HANDLE;

external (stdcall) RemovePropA(arg0:HWND, arg1:LPCSTR) : HANDLE;

external (stdcall) RemovePropW(arg0:HWND, arg1:LPCWSTR) : HANDLE;

external (stdcall) EnumPropsExA(arg0:HWND, arg1:PROPENUMPROCEXA, arg2:LPARAM) : Int;

external (stdcall) EnumPropsExW(arg0:HWND, arg1:PROPENUMPROCEXW, arg2:LPARAM) : Int;

external (stdcall) EnumPropsA(arg0:HWND, arg1:PROPENUMPROCA) : Int;

external (stdcall) EnumPropsW(arg0:HWND, arg1:PROPENUMPROCW) : Int;

external (stdcall) SetWindowTextA(arg0:HWND, arg1:LPCSTR) : BOOL;

external (stdcall) SetWindowTextW(arg0:HWND, arg1:LPCWSTR) : BOOL;

external (stdcall) GetWindowTextA(arg0:HWND, arg1:LPSTR, arg2:Int) : Int;

external (stdcall) GetWindowTextW(arg0:HWND, arg1:LPWSTR, arg2:Int) : Int;

external (stdcall) GetWindowTextLengthA(arg0:HWND) : Int;

external (stdcall) GetWindowTextLengthW(arg0:HWND) : Int;

external (stdcall) GetClientRect(arg0:HWND, arg1:LPRECT) : BOOL;

external (stdcall) GetWindowRect(arg0:HWND, arg1:LPRECT) : BOOL;

external (stdcall) AdjustWindowRect(arg0:LPRECT, arg1:DWORD, arg2:BOOL) : BOOL;

external (stdcall) AdjustWindowRectEx(arg0:LPRECT, arg1:DWORD, arg2:BOOL, arg3:DWORD) : BOOL;

record Struct_tagHELPINFO (
    cbSize : UINT,
    iContextType : Int,
    iCtrlId : Int,
    hItemHandle : HANDLE,
    dwContextId : DWORD_PTR,
    MousePos : POINT,
);

alias HELPINFO = Struct_tagHELPINFO;

alias LPHELPINFO = Pointer[Struct_tagHELPINFO];

external (stdcall) SetWindowContextHelpId(arg0:HWND, arg1:DWORD) : BOOL;

external (stdcall) GetWindowContextHelpId(arg0:HWND) : DWORD;

external (stdcall) SetMenuContextHelpId(arg0:HMENU, arg1:DWORD) : BOOL;

external (stdcall) GetMenuContextHelpId(arg0:HMENU) : DWORD;

external (stdcall) MessageBoxA(arg0:HWND, arg1:LPCSTR, arg2:LPCSTR, arg3:UINT) : Int;

external (stdcall) MessageBoxW(arg0:HWND, arg1:LPCWSTR, arg2:LPCWSTR, arg3:UINT) : Int;

external (stdcall) MessageBoxExA(arg0:HWND, arg1:LPCSTR, arg2:LPCSTR, arg3:UINT, arg4:WORD) : Int;

external (stdcall) MessageBoxExW(arg0:HWND, arg1:LPCWSTR, arg2:LPCWSTR, arg3:UINT, arg4:WORD) : Int;

alias MSGBOXCALLBACK = StdCallCodePointer[[LPHELPINFO],[]];

record Struct_tagMSGBOXPARAMSA (
    cbSize : UINT,
    hwndOwner : HWND,
    hInstance : HINSTANCE,
    lpszText : LPCSTR,
    lpszCaption : LPCSTR,
    dwStyle : DWORD,
    lpszIcon : LPCSTR,
    dwContextHelpId : DWORD_PTR,
    lpfnMsgBoxCallback : MSGBOXCALLBACK,
    dwLanguageId : DWORD,
);

alias MSGBOXPARAMSA = Struct_tagMSGBOXPARAMSA;

alias PMSGBOXPARAMSA = Pointer[Struct_tagMSGBOXPARAMSA];

alias LPMSGBOXPARAMSA = Pointer[Struct_tagMSGBOXPARAMSA];

record Struct_tagMSGBOXPARAMSW (
    cbSize : UINT,
    hwndOwner : HWND,
    hInstance : HINSTANCE,
    lpszText : LPCWSTR,
    lpszCaption : LPCWSTR,
    dwStyle : DWORD,
    lpszIcon : LPCWSTR,
    dwContextHelpId : DWORD_PTR,
    lpfnMsgBoxCallback : MSGBOXCALLBACK,
    dwLanguageId : DWORD,
);

alias MSGBOXPARAMSW = Struct_tagMSGBOXPARAMSW;

alias PMSGBOXPARAMSW = Pointer[Struct_tagMSGBOXPARAMSW];

alias LPMSGBOXPARAMSW = Pointer[Struct_tagMSGBOXPARAMSW];

alias MSGBOXPARAMS = MSGBOXPARAMSA;

alias PMSGBOXPARAMS = PMSGBOXPARAMSA;

alias LPMSGBOXPARAMS = LPMSGBOXPARAMSA;

external (stdcall) MessageBoxIndirectA(arg0:Pointer[MSGBOXPARAMSA]) : Int;

external (stdcall) MessageBoxIndirectW(arg0:Pointer[MSGBOXPARAMSW]) : Int;

external (stdcall) MessageBeep(arg0:UINT) : BOOL;

external (stdcall) ShowCursor(arg0:BOOL) : Int;

external (stdcall) SetCursorPos(arg0:Int, arg1:Int) : BOOL;

external (stdcall) SetPhysicalCursorPos(arg0:Int, arg1:Int) : BOOL;

external (stdcall) SetCursor(arg0:HCURSOR) : HCURSOR;

external (stdcall) GetCursorPos(arg0:LPPOINT) : BOOL;

external (stdcall) GetPhysicalCursorPos(arg0:LPPOINT) : BOOL;

external (stdcall) ClipCursor(arg0:Pointer[RECT]) : BOOL;

external (stdcall) GetClipCursor(arg0:LPRECT) : BOOL;

external (stdcall) GetCursor() : HCURSOR;

external (stdcall) CreateCaret(arg0:HWND, arg1:HBITMAP, arg2:Int, arg3:Int) : BOOL;

external (stdcall) GetCaretBlinkTime() : UINT;

external (stdcall) SetCaretBlinkTime(arg0:UINT) : BOOL;

external (stdcall) DestroyCaret() : BOOL;

external (stdcall) HideCaret(arg0:HWND) : BOOL;

external (stdcall) ShowCaret(arg0:HWND) : BOOL;

external (stdcall) SetCaretPos(arg0:Int, arg1:Int) : BOOL;

external (stdcall) GetCaretPos(arg0:LPPOINT) : BOOL;

external (stdcall) ClientToScreen(arg0:HWND, arg1:LPPOINT) : BOOL;

external (stdcall) ScreenToClient(arg0:HWND, arg1:LPPOINT) : BOOL;

external (stdcall) LogicalToPhysicalPoint(arg0:HWND, arg1:LPPOINT) : BOOL;

external (stdcall) PhysicalToLogicalPoint(arg0:HWND, arg1:LPPOINT) : BOOL;

external (stdcall) MapWindowPoints(arg0:HWND, arg1:HWND, arg2:LPPOINT, arg3:UINT) : Int;

external (stdcall) WindowFromPoint(arg0:POINT) : HWND;

external (stdcall) WindowFromPhysicalPoint(arg0:POINT) : HWND;

external (stdcall) ChildWindowFromPoint(arg0:HWND, arg1:POINT) : HWND;

external (stdcall) ChildWindowFromPointEx(arg0:HWND, arg1:POINT, arg2:UINT) : HWND;

external (stdcall) GetSysColor(arg0:Int) : DWORD;

external (stdcall) GetSysColorBrush(arg0:Int) : HBRUSH;

external (stdcall) SetSysColors(arg0:Int, arg1:Pointer[INT], arg2:Pointer[COLORREF]) : BOOL;

external (stdcall) DrawFocusRect(arg0:HDC, arg1:Pointer[RECT]) : BOOL;

external (stdcall) FillRect(arg0:HDC, arg1:Pointer[RECT], arg2:HBRUSH) : Int;

external (stdcall) FrameRect(arg0:HDC, arg1:Pointer[RECT], arg2:HBRUSH) : Int;

external (stdcall) InvertRect(arg0:HDC, arg1:Pointer[RECT]) : BOOL;

external (stdcall) SetRect(arg0:LPRECT, arg1:Int, arg2:Int, arg3:Int, arg4:Int) : BOOL;

external (stdcall) SetRectEmpty(arg0:LPRECT) : BOOL;

external (stdcall) CopyRect(arg0:LPRECT, arg1:Pointer[RECT]) : BOOL;

external (stdcall) InflateRect(arg0:LPRECT, arg1:Int, arg2:Int) : BOOL;

external (stdcall) IntersectRect(arg0:LPRECT, arg1:Pointer[RECT], arg2:Pointer[RECT]) : BOOL;

external (stdcall) UnionRect(arg0:LPRECT, arg1:Pointer[RECT], arg2:Pointer[RECT]) : BOOL;

external (stdcall) SubtractRect(arg0:LPRECT, arg1:Pointer[RECT], arg2:Pointer[RECT]) : BOOL;

external (stdcall) OffsetRect(arg0:LPRECT, arg1:Int, arg2:Int) : BOOL;

external (stdcall) IsRectEmpty(arg0:Pointer[RECT]) : BOOL;

external (stdcall) EqualRect(arg0:Pointer[RECT], arg1:Pointer[RECT]) : BOOL;

external (stdcall) PtInRect(arg0:Pointer[RECT], arg1:POINT) : BOOL;

external (stdcall) GetWindowWord(arg0:HWND, arg1:Int) : WORD;

external (stdcall) SetWindowWord(arg0:HWND, arg1:Int, arg2:WORD) : WORD;

external (stdcall) GetWindowLongA(arg0:HWND, arg1:Int) : LONG;

external (stdcall) GetWindowLongW(arg0:HWND, arg1:Int) : LONG;

external (stdcall) SetWindowLongA(arg0:HWND, arg1:Int, arg2:LONG) : LONG;

external (stdcall) SetWindowLongW(arg0:HWND, arg1:Int, arg2:LONG) : LONG;

external (stdcall) GetClassWord(arg0:HWND, arg1:Int) : WORD;

external (stdcall) SetClassWord(arg0:HWND, arg1:Int, arg2:WORD) : WORD;

external (stdcall) GetClassLongA(arg0:HWND, arg1:Int) : DWORD;

external (stdcall) GetClassLongW(arg0:HWND, arg1:Int) : DWORD;

external (stdcall) SetClassLongA(arg0:HWND, arg1:Int, arg2:LONG) : DWORD;

external (stdcall) SetClassLongW(arg0:HWND, arg1:Int, arg2:LONG) : DWORD;

external (stdcall) GetProcessDefaultLayout(arg0:Pointer[DWORD]) : BOOL;

external (stdcall) SetProcessDefaultLayout(arg0:DWORD) : BOOL;

external (stdcall) GetDesktopWindow() : HWND;

external (stdcall) GetParent(arg0:HWND) : HWND;

external (stdcall) SetParent(arg0:HWND, arg1:HWND) : HWND;

external (stdcall) EnumChildWindows(arg0:HWND, arg1:WNDENUMPROC, arg2:LPARAM) : BOOL;

external (stdcall) FindWindowA(arg0:LPCSTR, arg1:LPCSTR) : HWND;

external (stdcall) FindWindowW(arg0:LPCWSTR, arg1:LPCWSTR) : HWND;

external (stdcall) FindWindowExA(arg0:HWND, arg1:HWND, arg2:LPCSTR, arg3:LPCSTR) : HWND;

external (stdcall) FindWindowExW(arg0:HWND, arg1:HWND, arg2:LPCWSTR, arg3:LPCWSTR) : HWND;

external (stdcall) GetShellWindow() : HWND;

external (stdcall) RegisterShellHookWindow(arg0:HWND) : BOOL;

external (stdcall) DeregisterShellHookWindow(arg0:HWND) : BOOL;

external (stdcall) EnumWindows(arg0:WNDENUMPROC, arg1:LPARAM) : BOOL;

external (stdcall) EnumThreadWindows(arg0:DWORD, arg1:WNDENUMPROC, arg2:LPARAM) : BOOL;

external (stdcall) GetClassNameA(arg0:HWND, arg1:LPSTR, arg2:Int) : Int;

external (stdcall) GetClassNameW(arg0:HWND, arg1:LPWSTR, arg2:Int) : Int;

external (stdcall) GetTopWindow(arg0:HWND) : HWND;

external (stdcall) GetWindowThreadProcessId(arg0:HWND, arg1:LPDWORD) : DWORD;

external (stdcall) IsGUIThread(arg0:BOOL) : BOOL;

external (stdcall) GetLastActivePopup(arg0:HWND) : HWND;

external (stdcall) GetWindow(arg0:HWND, arg1:UINT) : HWND;

external (stdcall) SetWindowsHookA(arg0:Int, arg1:HOOKPROC) : HHOOK;

external (stdcall) SetWindowsHookW(arg0:Int, arg1:HOOKPROC) : HHOOK;

external (stdcall) UnhookWindowsHook(arg0:Int, arg1:HOOKPROC) : BOOL;

external (stdcall) SetWindowsHookExA(arg0:Int, arg1:HOOKPROC, arg2:HINSTANCE, arg3:DWORD) : HHOOK;

external (stdcall) SetWindowsHookExW(arg0:Int, arg1:HOOKPROC, arg2:HINSTANCE, arg3:DWORD) : HHOOK;

external (stdcall) UnhookWindowsHookEx(arg0:HHOOK) : BOOL;

external (stdcall) CallNextHookEx(arg0:HHOOK, arg1:Int, arg2:WPARAM, arg3:LPARAM) : LRESULT;

external (stdcall) CheckMenuRadioItem(arg0:HMENU, arg1:UINT, arg2:UINT, arg3:UINT, arg4:UINT) : BOOL;

record Struct_Unnamed141 (
    versionNumber : WORD,
    offset : WORD,
);

alias MENUITEMTEMPLATEHEADER = Struct_Unnamed141;

alias PMENUITEMTEMPLATEHEADER = Pointer[Struct_Unnamed141];

record Struct_Unnamed142 (
    mtOption : WORD,
    mtID : WORD,
    mtString : Array[WCHAR, 1],
);

alias MENUITEMTEMPLATE = Struct_Unnamed142;

alias PMENUITEMTEMPLATE = Pointer[Struct_Unnamed142];

external (stdcall) LoadBitmapA(arg0:HINSTANCE, arg1:LPCSTR) : HBITMAP;

external (stdcall) LoadBitmapW(arg0:HINSTANCE, arg1:LPCWSTR) : HBITMAP;

external (stdcall) LoadCursorA(arg0:HINSTANCE, arg1:LPCSTR) : HCURSOR;

external (stdcall) LoadCursorW(arg0:HINSTANCE, arg1:LPCWSTR) : HCURSOR;

external (stdcall) LoadCursorFromFileA(arg0:LPCSTR) : HCURSOR;

external (stdcall) LoadCursorFromFileW(arg0:LPCWSTR) : HCURSOR;

external (stdcall) CreateCursor(arg0:HINSTANCE, arg1:Int, arg2:Int, arg3:Int, arg4:Int, arg5:OpaquePointer, arg6:OpaquePointer) : HCURSOR;

external (stdcall) DestroyCursor(arg0:HCURSOR) : BOOL;

external (stdcall) SetSystemCursor(arg0:HCURSOR, arg1:DWORD) : BOOL;

record Struct__ICONINFO (
    fIcon : BOOL,
    xHotspot : DWORD,
    yHotspot : DWORD,
    hbmMask : HBITMAP,
    hbmColor : HBITMAP,
);

alias ICONINFO = Struct__ICONINFO;

alias PICONINFO = Pointer[ICONINFO];

external (stdcall) LoadIconA(arg0:HINSTANCE, arg1:LPCSTR) : HICON;

external (stdcall) LoadIconW(arg0:HINSTANCE, arg1:LPCWSTR) : HICON;

external (stdcall) PrivateExtractIconsA(arg0:LPCSTR, arg1:Int, arg2:Int, arg3:Int, arg4:Pointer[HICON], arg5:Pointer[UINT], arg6:UINT, arg7:UINT) : UINT;

external (stdcall) PrivateExtractIconsW(arg0:LPCWSTR, arg1:Int, arg2:Int, arg3:Int, arg4:Pointer[HICON], arg5:Pointer[UINT], arg6:UINT, arg7:UINT) : UINT;

external (stdcall) CreateIcon(arg0:HINSTANCE, arg1:Int, arg2:Int, arg3:BYTE, arg4:BYTE, arg5:Pointer[BYTE], arg6:Pointer[BYTE]) : HICON;

external (stdcall) DestroyIcon(arg0:HICON) : BOOL;

external (stdcall) LookupIconIdFromDirectory(arg0:PBYTE, arg1:BOOL) : Int;

external (stdcall) LookupIconIdFromDirectoryEx(arg0:PBYTE, arg1:BOOL, arg2:Int, arg3:Int, arg4:UINT) : Int;

external (stdcall) CreateIconFromResource(arg0:PBYTE, arg1:DWORD, arg2:BOOL, arg3:DWORD) : HICON;

external (stdcall) CreateIconFromResourceEx(arg0:PBYTE, arg1:DWORD, arg2:BOOL, arg3:DWORD, arg4:Int, arg5:Int, arg6:UINT) : HICON;

record Struct_tagCURSORSHAPE (
    xHotSpot : Int,
    yHotSpot : Int,
    cx : Int,
    cy : Int,
    cbWidth : Int,
    Planes : BYTE,
    BitsPixel : BYTE,
);

alias CURSORSHAPE = Struct_tagCURSORSHAPE;

alias LPCURSORSHAPE = Pointer[Struct_tagCURSORSHAPE];

external (stdcall) LoadImageA(arg0:HINSTANCE, arg1:LPCSTR, arg2:UINT, arg3:Int, arg4:Int, arg5:UINT) : HANDLE;

external (stdcall) LoadImageW(arg0:HINSTANCE, arg1:LPCWSTR, arg2:UINT, arg3:Int, arg4:Int, arg5:UINT) : HANDLE;

external (stdcall) CopyImage(arg0:HANDLE, arg1:UINT, arg2:Int, arg3:Int, arg4:UINT) : HANDLE;

external (stdcall) DrawIconEx(arg0:HDC, arg1:Int, arg2:Int, arg3:HICON, arg4:Int, arg5:Int, arg6:UINT, arg7:HBRUSH, arg8:UINT) : BOOL;

external (stdcall) CreateIconIndirect(arg0:PICONINFO) : HICON;

external (stdcall) CopyIcon(arg0:HICON) : HICON;

external (stdcall) GetIconInfo(arg0:HICON, arg1:PICONINFO) : BOOL;

record Struct__ICONINFOEXA (
    cbSize : DWORD,
    fIcon : BOOL,
    xHotspot : DWORD,
    yHotspot : DWORD,
    hbmMask : HBITMAP,
    hbmColor : HBITMAP,
    wResID : WORD,
    szModName : Array[CHAR, 260],
    szResName : Array[CHAR, 260],
);

alias ICONINFOEXA = Struct__ICONINFOEXA;

alias PICONINFOEXA = Pointer[Struct__ICONINFOEXA];

record Struct__ICONINFOEXW (
    cbSize : DWORD,
    fIcon : BOOL,
    xHotspot : DWORD,
    yHotspot : DWORD,
    hbmMask : HBITMAP,
    hbmColor : HBITMAP,
    wResID : WORD,
    szModName : Array[WCHAR, 260],
    szResName : Array[WCHAR, 260],
);

alias ICONINFOEXW = Struct__ICONINFOEXW;

alias PICONINFOEXW = Pointer[Struct__ICONINFOEXW];

alias ICONINFOEX = ICONINFOEXA;

alias PICONINFOEX = PICONINFOEXA;

external (stdcall) GetIconInfoExA(arg0:HICON, arg1:PICONINFOEXA) : BOOL;

external (stdcall) GetIconInfoExW(arg0:HICON, arg1:PICONINFOEXW) : BOOL;

external (stdcall) LoadStringA(arg0:HINSTANCE, arg1:UINT, arg2:LPSTR, arg3:Int) : Int;

external (stdcall) LoadStringW(arg0:HINSTANCE, arg1:UINT, arg2:LPWSTR, arg3:Int) : Int;

external (stdcall) IsDialogMessageA(arg0:HWND, arg1:LPMSG) : BOOL;

external (stdcall) IsDialogMessageW(arg0:HWND, arg1:LPMSG) : BOOL;

external (stdcall) MapDialogRect(arg0:HWND, arg1:LPRECT) : BOOL;

external (stdcall) DlgDirListA(arg0:HWND, arg1:LPSTR, arg2:Int, arg3:Int, arg4:UINT) : Int;

external (stdcall) DlgDirListW(arg0:HWND, arg1:LPWSTR, arg2:Int, arg3:Int, arg4:UINT) : Int;

external (stdcall) DlgDirSelectExA(arg0:HWND, arg1:LPSTR, arg2:Int, arg3:Int) : BOOL;

external (stdcall) DlgDirSelectExW(arg0:HWND, arg1:LPWSTR, arg2:Int, arg3:Int) : BOOL;

external (stdcall) DlgDirListComboBoxA(arg0:HWND, arg1:LPSTR, arg2:Int, arg3:Int, arg4:UINT) : Int;

external (stdcall) DlgDirListComboBoxW(arg0:HWND, arg1:LPWSTR, arg2:Int, arg3:Int, arg4:UINT) : Int;

external (stdcall) DlgDirSelectComboBoxExA(arg0:HWND, arg1:LPSTR, arg2:Int, arg3:Int) : BOOL;

external (stdcall) DlgDirSelectComboBoxExW(arg0:HWND, arg1:LPWSTR, arg2:Int, arg3:Int) : BOOL;

record Struct_tagSCROLLINFO (
    cbSize : UINT,
    fMask : UINT,
    nMin : Int,
    nMax : Int,
    nPage : UINT,
    nPos : Int,
    nTrackPos : Int,
);

alias SCROLLINFO = Struct_tagSCROLLINFO;

alias LPSCROLLINFO = Pointer[Struct_tagSCROLLINFO];

alias LPCSCROLLINFO = Pointer[SCROLLINFO];

external (stdcall) SetScrollInfo(arg0:HWND, arg1:Int, arg2:LPCSCROLLINFO, arg3:BOOL) : Int;

external (stdcall) GetScrollInfo(arg0:HWND, arg1:Int, arg2:LPSCROLLINFO) : BOOL;

record Struct_tagMDICREATESTRUCTA (
    szClass : LPCSTR,
    szTitle : LPCSTR,
    hOwner : HANDLE,
    x : Int,
    y : Int,
    cx : Int,
    cy : Int,
    style : DWORD,
    lParam : LPARAM,
);

alias MDICREATESTRUCTA = Struct_tagMDICREATESTRUCTA;

alias LPMDICREATESTRUCTA = Pointer[Struct_tagMDICREATESTRUCTA];

record Struct_tagMDICREATESTRUCTW (
    szClass : LPCWSTR,
    szTitle : LPCWSTR,
    hOwner : HANDLE,
    x : Int,
    y : Int,
    cx : Int,
    cy : Int,
    style : DWORD,
    lParam : LPARAM,
);

alias MDICREATESTRUCTW = Struct_tagMDICREATESTRUCTW;

alias LPMDICREATESTRUCTW = Pointer[Struct_tagMDICREATESTRUCTW];

alias MDICREATESTRUCT = MDICREATESTRUCTA;

alias LPMDICREATESTRUCT = LPMDICREATESTRUCTA;

record Struct_tagCLIENTCREATESTRUCT (
    hWindowMenu : HANDLE,
    idFirstChild : UINT,
);

alias CLIENTCREATESTRUCT = Struct_tagCLIENTCREATESTRUCT;

alias LPCLIENTCREATESTRUCT = Pointer[Struct_tagCLIENTCREATESTRUCT];

external (stdcall) DefFrameProcA(arg0:HWND, arg1:HWND, arg2:UINT, arg3:WPARAM, arg4:LPARAM) : LRESULT;

external (stdcall) DefFrameProcW(arg0:HWND, arg1:HWND, arg2:UINT, arg3:WPARAM, arg4:LPARAM) : LRESULT;

external (stdcall) DefMDIChildProcA(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : LRESULT;

external (stdcall) DefMDIChildProcW(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : LRESULT;

external (stdcall) TranslateMDISysAccel(arg0:HWND, arg1:LPMSG) : BOOL;

external (stdcall) ArrangeIconicWindows(arg0:HWND) : UINT;

external (stdcall) CreateMDIWindowA(arg0:LPCSTR, arg1:LPCSTR, arg2:DWORD, arg3:Int, arg4:Int, arg5:Int, arg6:Int, arg7:HWND, arg8:HINSTANCE, arg9:LPARAM) : HWND;

external (stdcall) CreateMDIWindowW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:DWORD, arg3:Int, arg4:Int, arg5:Int, arg6:Int, arg7:HWND, arg8:HINSTANCE, arg9:LPARAM) : HWND;

external (stdcall) TileWindows(arg0:HWND, arg1:UINT, arg2:Pointer[RECT], arg3:UINT, arg4:Pointer[HWND]) : WORD;

external (stdcall) CascadeWindows(arg0:HWND, arg1:UINT, arg2:Pointer[RECT], arg3:UINT, arg4:Pointer[HWND]) : WORD;

alias HELPPOLY = DWORD;

record Struct_tagMULTIKEYHELPA (
    mkSize : DWORD,
    mkKeylist : CHAR,
    szKeyphrase : Array[CHAR, 1],
);

alias MULTIKEYHELPA = Struct_tagMULTIKEYHELPA;

alias PMULTIKEYHELPA = Pointer[Struct_tagMULTIKEYHELPA];

alias LPMULTIKEYHELPA = Pointer[Struct_tagMULTIKEYHELPA];

record Struct_tagMULTIKEYHELPW (
    mkSize : DWORD,
    mkKeylist : WCHAR,
    szKeyphrase : Array[WCHAR, 1],
);

alias MULTIKEYHELPW = Struct_tagMULTIKEYHELPW;

alias PMULTIKEYHELPW = Pointer[Struct_tagMULTIKEYHELPW];

alias LPMULTIKEYHELPW = Pointer[Struct_tagMULTIKEYHELPW];

alias MULTIKEYHELP = MULTIKEYHELPA;

alias PMULTIKEYHELP = PMULTIKEYHELPA;

alias LPMULTIKEYHELP = LPMULTIKEYHELPA;

record Struct_tagHELPWININFOA (
    wStructSize : Int,
    x : Int,
    y : Int,
    dx : Int,
    dy : Int,
    wMax : Int,
    rgchMember : Array[CHAR, 2],
);

alias HELPWININFOA = Struct_tagHELPWININFOA;

alias PHELPWININFOA = Pointer[Struct_tagHELPWININFOA];

alias LPHELPWININFOA = Pointer[Struct_tagHELPWININFOA];

record Struct_tagHELPWININFOW (
    wStructSize : Int,
    x : Int,
    y : Int,
    dx : Int,
    dy : Int,
    wMax : Int,
    rgchMember : Array[WCHAR, 2],
);

alias HELPWININFOW = Struct_tagHELPWININFOW;

alias PHELPWININFOW = Pointer[Struct_tagHELPWININFOW];

alias LPHELPWININFOW = Pointer[Struct_tagHELPWININFOW];

alias HELPWININFO = HELPWININFOA;

alias PHELPWININFO = PHELPWININFOA;

alias LPHELPWININFO = LPHELPWININFOA;

external (stdcall) WinHelpA(arg0:HWND, arg1:LPCSTR, arg2:UINT, arg3:ULONG_PTR) : BOOL;

external (stdcall) WinHelpW(arg0:HWND, arg1:LPCWSTR, arg2:UINT, arg3:ULONG_PTR) : BOOL;

external (stdcall) GetGuiResources(arg0:HANDLE, arg1:DWORD) : DWORD;

record Struct_tagNONCLIENTMETRICSA (
    cbSize : UINT,
    iBorderWidth : Int,
    iScrollWidth : Int,
    iScrollHeight : Int,
    iCaptionWidth : Int,
    iCaptionHeight : Int,
    lfCaptionFont : LOGFONTA,
    iSmCaptionWidth : Int,
    iSmCaptionHeight : Int,
    lfSmCaptionFont : LOGFONTA,
    iMenuWidth : Int,
    iMenuHeight : Int,
    lfMenuFont : LOGFONTA,
    lfStatusFont : LOGFONTA,
    lfMessageFont : LOGFONTA,
    iPaddedBorderWidth : Int,
);

alias NONCLIENTMETRICSA = Struct_tagNONCLIENTMETRICSA;

alias PNONCLIENTMETRICSA = Pointer[Struct_tagNONCLIENTMETRICSA];

alias LPNONCLIENTMETRICSA = Pointer[Struct_tagNONCLIENTMETRICSA];

record Struct_tagNONCLIENTMETRICSW (
    cbSize : UINT,
    iBorderWidth : Int,
    iScrollWidth : Int,
    iScrollHeight : Int,
    iCaptionWidth : Int,
    iCaptionHeight : Int,
    lfCaptionFont : LOGFONTW,
    iSmCaptionWidth : Int,
    iSmCaptionHeight : Int,
    lfSmCaptionFont : LOGFONTW,
    iMenuWidth : Int,
    iMenuHeight : Int,
    lfMenuFont : LOGFONTW,
    lfStatusFont : LOGFONTW,
    lfMessageFont : LOGFONTW,
    iPaddedBorderWidth : Int,
);

alias NONCLIENTMETRICSW = Struct_tagNONCLIENTMETRICSW;

alias PNONCLIENTMETRICSW = Pointer[Struct_tagNONCLIENTMETRICSW];

alias LPNONCLIENTMETRICSW = Pointer[Struct_tagNONCLIENTMETRICSW];

alias NONCLIENTMETRICS = NONCLIENTMETRICSA;

alias PNONCLIENTMETRICS = PNONCLIENTMETRICSA;

alias LPNONCLIENTMETRICS = LPNONCLIENTMETRICSA;

record Struct_tagMINIMIZEDMETRICS (
    cbSize : UINT,
    iWidth : Int,
    iHorzGap : Int,
    iVertGap : Int,
    iArrange : Int,
);

alias MINIMIZEDMETRICS = Struct_tagMINIMIZEDMETRICS;

alias PMINIMIZEDMETRICS = Pointer[Struct_tagMINIMIZEDMETRICS];

alias LPMINIMIZEDMETRICS = Pointer[Struct_tagMINIMIZEDMETRICS];

record Struct_tagICONMETRICSA (
    cbSize : UINT,
    iHorzSpacing : Int,
    iVertSpacing : Int,
    iTitleWrap : Int,
    lfFont : LOGFONTA,
);

alias ICONMETRICSA = Struct_tagICONMETRICSA;

alias PICONMETRICSA = Pointer[Struct_tagICONMETRICSA];

alias LPICONMETRICSA = Pointer[Struct_tagICONMETRICSA];

record Struct_tagICONMETRICSW (
    cbSize : UINT,
    iHorzSpacing : Int,
    iVertSpacing : Int,
    iTitleWrap : Int,
    lfFont : LOGFONTW,
);

alias ICONMETRICSW = Struct_tagICONMETRICSW;

alias PICONMETRICSW = Pointer[Struct_tagICONMETRICSW];

alias LPICONMETRICSW = Pointer[Struct_tagICONMETRICSW];

alias ICONMETRICS = ICONMETRICSA;

alias PICONMETRICS = PICONMETRICSA;

alias LPICONMETRICS = LPICONMETRICSA;

record Struct_tagANIMATIONINFO (
    cbSize : UINT,
    iMinAnimate : Int,
);

alias ANIMATIONINFO = Struct_tagANIMATIONINFO;

alias LPANIMATIONINFO = Pointer[Struct_tagANIMATIONINFO];

record Struct_tagSERIALKEYSA (
    cbSize : UINT,
    dwFlags : DWORD,
    lpszActivePort : LPSTR,
    lpszPort : LPSTR,
    iBaudRate : UINT,
    iPortState : UINT,
    iActive : UINT,
);

alias SERIALKEYSA = Struct_tagSERIALKEYSA;

alias LPSERIALKEYSA = Pointer[Struct_tagSERIALKEYSA];

record Struct_tagSERIALKEYSW (
    cbSize : UINT,
    dwFlags : DWORD,
    lpszActivePort : LPWSTR,
    lpszPort : LPWSTR,
    iBaudRate : UINT,
    iPortState : UINT,
    iActive : UINT,
);

alias SERIALKEYSW = Struct_tagSERIALKEYSW;

alias LPSERIALKEYSW = Pointer[Struct_tagSERIALKEYSW];

alias SERIALKEYS = SERIALKEYSA;

alias LPSERIALKEYS = LPSERIALKEYSA;

record Struct_tagHIGHCONTRASTA (
    cbSize : UINT,
    dwFlags : DWORD,
    lpszDefaultScheme : LPSTR,
);

alias HIGHCONTRASTA = Struct_tagHIGHCONTRASTA;

alias LPHIGHCONTRASTA = Pointer[Struct_tagHIGHCONTRASTA];

record Struct_tagHIGHCONTRASTW (
    cbSize : UINT,
    dwFlags : DWORD,
    lpszDefaultScheme : LPWSTR,
);

alias HIGHCONTRASTW = Struct_tagHIGHCONTRASTW;

alias LPHIGHCONTRASTW = Pointer[Struct_tagHIGHCONTRASTW];

alias HIGHCONTRAST = HIGHCONTRASTA;

alias LPHIGHCONTRAST = LPHIGHCONTRASTA;

record Struct__VIDEOPARAMETERS (
    Guid : GUID,
    dwOffset : ULONG,
    dwCommand : ULONG,
    dwFlags : ULONG,
    dwMode : ULONG,
    dwTVStandard : ULONG,
    dwAvailableModes : ULONG,
    dwAvailableTVStandard : ULONG,
    dwFlickerFilter : ULONG,
    dwOverScanX : ULONG,
    dwOverScanY : ULONG,
    dwMaxUnscaledX : ULONG,
    dwMaxUnscaledY : ULONG,
    dwPositionX : ULONG,
    dwPositionY : ULONG,
    dwBrightness : ULONG,
    dwContrast : ULONG,
    dwCPType : ULONG,
    dwCPCommand : ULONG,
    dwCPStandard : ULONG,
    dwCPKey : ULONG,
    bCP_APSTriggerBits : ULONG,
    bOEMCopyProtection : Array[UCHAR, 256],
);

alias VIDEOPARAMETERS = Struct__VIDEOPARAMETERS;

alias PVIDEOPARAMETERS = Pointer[Struct__VIDEOPARAMETERS];

alias LPVIDEOPARAMETERS = Pointer[Struct__VIDEOPARAMETERS];

external (stdcall) ChangeDisplaySettingsA(arg0:Pointer[DEVMODEA], arg1:DWORD) : LONG;

external (stdcall) ChangeDisplaySettingsW(arg0:Pointer[DEVMODEW], arg1:DWORD) : LONG;

external (stdcall) ChangeDisplaySettingsExA(arg0:LPCSTR, arg1:Pointer[DEVMODEA], arg2:HWND, arg3:DWORD, arg4:LPVOID) : LONG;

external (stdcall) ChangeDisplaySettingsExW(arg0:LPCWSTR, arg1:Pointer[DEVMODEW], arg2:HWND, arg3:DWORD, arg4:LPVOID) : LONG;

external (stdcall) EnumDisplaySettingsA(arg0:LPCSTR, arg1:DWORD, arg2:Pointer[DEVMODEA]) : BOOL;

external (stdcall) EnumDisplaySettingsW(arg0:LPCWSTR, arg1:DWORD, arg2:Pointer[DEVMODEW]) : BOOL;

external (stdcall) EnumDisplaySettingsExA(arg0:LPCSTR, arg1:DWORD, arg2:Pointer[DEVMODEA], arg3:DWORD) : BOOL;

external (stdcall) EnumDisplaySettingsExW(arg0:LPCWSTR, arg1:DWORD, arg2:Pointer[DEVMODEW], arg3:DWORD) : BOOL;

external (stdcall) EnumDisplayDevicesA(arg0:LPCSTR, arg1:DWORD, arg2:PDISPLAY_DEVICEA, arg3:DWORD) : BOOL;

external (stdcall) EnumDisplayDevicesW(arg0:LPCWSTR, arg1:DWORD, arg2:PDISPLAY_DEVICEW, arg3:DWORD) : BOOL;

external (stdcall) GetDisplayConfigBufferSizes(arg0:UINT32, arg1:Pointer[UINT32], arg2:Pointer[UINT32]) : LONG;

external (stdcall) SetDisplayConfig(arg0:UINT32, arg1:Pointer[DISPLAYCONFIG_PATH_INFO], arg2:UINT32, arg3:Pointer[DISPLAYCONFIG_MODE_INFO], arg4:UINT32) : LONG;

external (stdcall) QueryDisplayConfig(arg0:UINT32, arg1:Pointer[UINT32], arg2:Pointer[DISPLAYCONFIG_PATH_INFO], arg3:Pointer[UINT32], arg4:Pointer[DISPLAYCONFIG_MODE_INFO], arg5:Pointer[DISPLAYCONFIG_TOPOLOGY_ID]) : LONG;

external (stdcall) DisplayConfigGetDeviceInfo(arg0:Pointer[DISPLAYCONFIG_DEVICE_INFO_HEADER]) : LONG;

external (stdcall) DisplayConfigSetDeviceInfo(arg0:Pointer[DISPLAYCONFIG_DEVICE_INFO_HEADER]) : LONG;

external (stdcall) SystemParametersInfoA(arg0:UINT, arg1:UINT, arg2:PVOID, arg3:UINT) : BOOL;

external (stdcall) SystemParametersInfoW(arg0:UINT, arg1:UINT, arg2:PVOID, arg3:UINT) : BOOL;

record Struct_tagFILTERKEYS (
    cbSize : UINT,
    dwFlags : DWORD,
    iWaitMSec : DWORD,
    iDelayMSec : DWORD,
    iRepeatMSec : DWORD,
    iBounceMSec : DWORD,
);

alias FILTERKEYS = Struct_tagFILTERKEYS;

alias LPFILTERKEYS = Pointer[Struct_tagFILTERKEYS];

record Struct_tagSTICKYKEYS (
    cbSize : UINT,
    dwFlags : DWORD,
);

alias STICKYKEYS = Struct_tagSTICKYKEYS;

alias LPSTICKYKEYS = Pointer[Struct_tagSTICKYKEYS];

record Struct_tagMOUSEKEYS (
    cbSize : UINT,
    dwFlags : DWORD,
    iMaxSpeed : DWORD,
    iTimeToMaxSpeed : DWORD,
    iCtrlSpeed : DWORD,
    dwReserved1 : DWORD,
    dwReserved2 : DWORD,
);

alias MOUSEKEYS = Struct_tagMOUSEKEYS;

alias LPMOUSEKEYS = Pointer[Struct_tagMOUSEKEYS];

record Struct_tagACCESSTIMEOUT (
    cbSize : UINT,
    dwFlags : DWORD,
    iTimeOutMSec : DWORD,
);

alias ACCESSTIMEOUT = Struct_tagACCESSTIMEOUT;

alias LPACCESSTIMEOUT = Pointer[Struct_tagACCESSTIMEOUT];

record Struct_tagSOUNDSENTRYA (
    cbSize : UINT,
    dwFlags : DWORD,
    iFSTextEffect : DWORD,
    iFSTextEffectMSec : DWORD,
    iFSTextEffectColorBits : DWORD,
    iFSGrafEffect : DWORD,
    iFSGrafEffectMSec : DWORD,
    iFSGrafEffectColor : DWORD,
    iWindowsEffect : DWORD,
    iWindowsEffectMSec : DWORD,
    lpszWindowsEffectDLL : LPSTR,
    iWindowsEffectOrdinal : DWORD,
);

alias SOUNDSENTRYA = Struct_tagSOUNDSENTRYA;

alias LPSOUNDSENTRYA = Pointer[Struct_tagSOUNDSENTRYA];

record Struct_tagSOUNDSENTRYW (
    cbSize : UINT,
    dwFlags : DWORD,
    iFSTextEffect : DWORD,
    iFSTextEffectMSec : DWORD,
    iFSTextEffectColorBits : DWORD,
    iFSGrafEffect : DWORD,
    iFSGrafEffectMSec : DWORD,
    iFSGrafEffectColor : DWORD,
    iWindowsEffect : DWORD,
    iWindowsEffectMSec : DWORD,
    lpszWindowsEffectDLL : LPWSTR,
    iWindowsEffectOrdinal : DWORD,
);

alias SOUNDSENTRYW = Struct_tagSOUNDSENTRYW;

alias LPSOUNDSENTRYW = Pointer[Struct_tagSOUNDSENTRYW];

alias SOUNDSENTRY = SOUNDSENTRYA;

alias LPSOUNDSENTRY = LPSOUNDSENTRYA;

external (stdcall) SoundSentry() : BOOL;

record Struct_tagTOGGLEKEYS (
    cbSize : UINT,
    dwFlags : DWORD,
);

alias TOGGLEKEYS = Struct_tagTOGGLEKEYS;

alias LPTOGGLEKEYS = Pointer[Struct_tagTOGGLEKEYS];

record Struct_tagAUDIODESCRIPTION (
    cbSize : UINT,
    Enabled : BOOL,
    Locale : LCID,
);

alias AUDIODESCRIPTION = Struct_tagAUDIODESCRIPTION;

alias LPAUDIODESCRIPTION = Pointer[Struct_tagAUDIODESCRIPTION];

external (stdcall) SetDebugErrorLevel(arg0:DWORD) : ;

external (stdcall) SetLastErrorEx(arg0:DWORD, arg1:DWORD) : ;

external (stdcall) InternalGetWindowText(arg0:HWND, arg1:LPWSTR, arg2:Int) : Int;

external (stdcall) CancelShutdown() : BOOL;

external (stdcall) MonitorFromPoint(arg0:POINT, arg1:DWORD) : HMONITOR;

external (stdcall) MonitorFromRect(arg0:LPCRECT, arg1:DWORD) : HMONITOR;

external (stdcall) MonitorFromWindow(arg0:HWND, arg1:DWORD) : HMONITOR;

record Struct_tagMONITORINFO (
    cbSize : DWORD,
    rcMonitor : RECT,
    rcWork : RECT,
    dwFlags : DWORD,
);

alias MONITORINFO = Struct_tagMONITORINFO;

alias LPMONITORINFO = Pointer[Struct_tagMONITORINFO];

record Struct_tagMONITORINFOEXA (
    szDevice : Array[CHAR, 32],
);

alias MONITORINFOEXA = Struct_tagMONITORINFOEXA;

alias LPMONITORINFOEXA = Pointer[Struct_tagMONITORINFOEXA];

record Struct_tagMONITORINFOEXW (
    szDevice : Array[WCHAR, 32],
);

alias MONITORINFOEXW = Struct_tagMONITORINFOEXW;

alias LPMONITORINFOEXW = Pointer[Struct_tagMONITORINFOEXW];

alias MONITORINFOEX = MONITORINFOEXA;

alias LPMONITORINFOEX = LPMONITORINFOEXA;

external (stdcall) GetMonitorInfoA(arg0:HMONITOR, arg1:LPMONITORINFO) : BOOL;

external (stdcall) GetMonitorInfoW(arg0:HMONITOR, arg1:LPMONITORINFO) : BOOL;

alias MONITORENUMPROC = StdCallCodePointer[[HMONITOR, HDC, LPRECT, LPARAM],[BOOL]];

external (stdcall) EnumDisplayMonitors(arg0:HDC, arg1:LPCRECT, arg2:MONITORENUMPROC, arg3:LPARAM) : BOOL;

external (stdcall) NotifyWinEvent(arg0:DWORD, arg1:HWND, arg2:LONG, arg3:LONG) : ;

alias WINEVENTPROC = StdCallCodePointer[[HWINEVENTHOOK, DWORD, HWND, LONG, LONG, DWORD, DWORD],[]];

external (stdcall) SetWinEventHook(arg0:DWORD, arg1:DWORD, arg2:HMODULE, arg3:WINEVENTPROC, arg4:DWORD, arg5:DWORD, arg6:DWORD) : HWINEVENTHOOK;

external (stdcall) IsWinEventHookInstalled(arg0:DWORD) : BOOL;

external (stdcall) UnhookWinEvent(arg0:HWINEVENTHOOK) : BOOL;

record Struct_tagGUITHREADINFO (
    cbSize : DWORD,
    flags : DWORD,
    hwndActive : HWND,
    hwndFocus : HWND,
    hwndCapture : HWND,
    hwndMenuOwner : HWND,
    hwndMoveSize : HWND,
    hwndCaret : HWND,
    rcCaret : RECT,
);

alias GUITHREADINFO = Struct_tagGUITHREADINFO;

alias PGUITHREADINFO = Pointer[Struct_tagGUITHREADINFO];

alias LPGUITHREADINFO = Pointer[Struct_tagGUITHREADINFO];

external (stdcall) GetGUIThreadInfo(arg0:DWORD, arg1:PGUITHREADINFO) : BOOL;

external (stdcall) BlockInput(arg0:BOOL) : BOOL;

external (stdcall) SetProcessDPIAware() : BOOL;

external (stdcall) IsProcessDPIAware() : BOOL;

external (stdcall) GetWindowModuleFileNameA(arg0:HWND, arg1:LPSTR, arg2:UINT) : UINT;

external (stdcall) GetWindowModuleFileNameW(arg0:HWND, arg1:LPWSTR, arg2:UINT) : UINT;

record Struct_tagCURSORINFO (
    cbSize : DWORD,
    flags : DWORD,
    hCursor : HCURSOR,
    ptScreenPos : POINT,
);

alias CURSORINFO = Struct_tagCURSORINFO;

alias PCURSORINFO = Pointer[Struct_tagCURSORINFO];

alias LPCURSORINFO = Pointer[Struct_tagCURSORINFO];

external (stdcall) GetCursorInfo(arg0:PCURSORINFO) : BOOL;

record Struct_tagWINDOWINFO (
    cbSize : DWORD,
    rcWindow : RECT,
    rcClient : RECT,
    dwStyle : DWORD,
    dwExStyle : DWORD,
    dwWindowStatus : DWORD,
    cxWindowBorders : UINT,
    cyWindowBorders : UINT,
    atomWindowType : ATOM,
    wCreatorVersion : WORD,
);

alias WINDOWINFO = Struct_tagWINDOWINFO;

alias PWINDOWINFO = Pointer[Struct_tagWINDOWINFO];

alias LPWINDOWINFO = Pointer[Struct_tagWINDOWINFO];

external (stdcall) GetWindowInfo(arg0:HWND, arg1:PWINDOWINFO) : BOOL;

record Struct_tagTITLEBARINFO (
    cbSize : DWORD,
    rcTitleBar : RECT,
    rgstate : Array[DWORD, 6],
);

alias TITLEBARINFO = Struct_tagTITLEBARINFO;

alias PTITLEBARINFO = Pointer[Struct_tagTITLEBARINFO];

alias LPTITLEBARINFO = Pointer[Struct_tagTITLEBARINFO];

external (stdcall) GetTitleBarInfo(arg0:HWND, arg1:PTITLEBARINFO) : BOOL;

record Struct_tagTITLEBARINFOEX (
    cbSize : DWORD,
    rcTitleBar : RECT,
    rgstate : Array[DWORD, 6],
    rgrect : Array[RECT, 6],
);

alias TITLEBARINFOEX = Struct_tagTITLEBARINFOEX;

alias PTITLEBARINFOEX = Pointer[Struct_tagTITLEBARINFOEX];

alias LPTITLEBARINFOEX = Pointer[Struct_tagTITLEBARINFOEX];

record Struct_tagMENUBARINFO (
    cbSize : DWORD,
    rcBar : RECT,
    hMenu : HMENU,
    hwndMenu : HWND,
    fBarFocused : BOOL,
    fFocused : BOOL,
);

alias MENUBARINFO = Struct_tagMENUBARINFO;

alias PMENUBARINFO = Pointer[Struct_tagMENUBARINFO];

alias LPMENUBARINFO = Pointer[Struct_tagMENUBARINFO];

external (stdcall) GetMenuBarInfo(arg0:HWND, arg1:LONG, arg2:LONG, arg3:PMENUBARINFO) : BOOL;

record Struct_tagSCROLLBARINFO (
    cbSize : DWORD,
    rcScrollBar : RECT,
    dxyLineButton : Int,
    xyThumbTop : Int,
    xyThumbBottom : Int,
    reserved : Int,
    rgstate : Array[DWORD, 6],
);

alias SCROLLBARINFO = Struct_tagSCROLLBARINFO;

alias PSCROLLBARINFO = Pointer[Struct_tagSCROLLBARINFO];

alias LPSCROLLBARINFO = Pointer[Struct_tagSCROLLBARINFO];

external (stdcall) GetScrollBarInfo(arg0:HWND, arg1:LONG, arg2:PSCROLLBARINFO) : BOOL;

record Struct_tagCOMBOBOXINFO (
    cbSize : DWORD,
    rcItem : RECT,
    rcButton : RECT,
    stateButton : DWORD,
    hwndCombo : HWND,
    hwndItem : HWND,
    hwndList : HWND,
);

alias COMBOBOXINFO = Struct_tagCOMBOBOXINFO;

alias PCOMBOBOXINFO = Pointer[Struct_tagCOMBOBOXINFO];

alias LPCOMBOBOXINFO = Pointer[Struct_tagCOMBOBOXINFO];

external (stdcall) GetComboBoxInfo(arg0:HWND, arg1:PCOMBOBOXINFO) : BOOL;

external (stdcall) GetAncestor(arg0:HWND, arg1:UINT) : HWND;

external (stdcall) RealChildWindowFromPoint(arg0:HWND, arg1:POINT) : HWND;

external (stdcall) RealGetWindowClassA(arg0:HWND, arg1:LPSTR, arg2:UINT) : UINT;

external (stdcall) RealGetWindowClassW(arg0:HWND, arg1:LPWSTR, arg2:UINT) : UINT;

record Struct_tagALTTABINFO (
    cbSize : DWORD,
    cItems : Int,
    cColumns : Int,
    cRows : Int,
    iColFocus : Int,
    iRowFocus : Int,
    cxItem : Int,
    cyItem : Int,
    ptStart : POINT,
);

alias ALTTABINFO = Struct_tagALTTABINFO;

alias PALTTABINFO = Pointer[Struct_tagALTTABINFO];

alias LPALTTABINFO = Pointer[Struct_tagALTTABINFO];

external (stdcall) GetAltTabInfoA(arg0:HWND, arg1:Int, arg2:PALTTABINFO, arg3:LPSTR, arg4:UINT) : BOOL;

external (stdcall) GetAltTabInfoW(arg0:HWND, arg1:Int, arg2:PALTTABINFO, arg3:LPWSTR, arg4:UINT) : BOOL;

external (stdcall) GetListBoxInfo(arg0:HWND) : DWORD;

external (stdcall) LockWorkStation() : BOOL;

external (stdcall) UserHandleGrantAccess(arg0:HANDLE, arg1:HANDLE, arg2:BOOL) : BOOL;

record Struct_HRAWINPUT__ (
    unused : Int,
);

alias HRAWINPUT = Pointer[Struct_HRAWINPUT__];

record Struct_tagRAWINPUTHEADER (
    dwType : DWORD,
    dwSize : DWORD,
    hDevice : HANDLE,
    wParam : WPARAM,
);

alias RAWINPUTHEADER = Struct_tagRAWINPUTHEADER;

alias PRAWINPUTHEADER = Pointer[Struct_tagRAWINPUTHEADER];

alias LPRAWINPUTHEADER = Pointer[Struct_tagRAWINPUTHEADER];

record Struct_tagRAWMOUSE (
    usFlags : USHORT,
    ulRawButtons : ULONG,
    lLastX : LONG,
    lLastY : LONG,
    ulExtraInformation : ULONG,
);

alias Union_Unnamed143 = Union[
    /* ulButtons */ ULONG,
];

record Struct_Unnamed144 (
    usButtonFlags : USHORT,
    usButtonData : USHORT,
);

alias RAWMOUSE = Struct_tagRAWMOUSE;

alias PRAWMOUSE = Pointer[Struct_tagRAWMOUSE];

alias LPRAWMOUSE = Pointer[Struct_tagRAWMOUSE];

record Struct_tagRAWKEYBOARD (
    MakeCode : USHORT,
    Flags : USHORT,
    Reserved : USHORT,
    VKey : USHORT,
    Message : UINT,
    ExtraInformation : ULONG,
);

alias RAWKEYBOARD = Struct_tagRAWKEYBOARD;

alias PRAWKEYBOARD = Pointer[Struct_tagRAWKEYBOARD];

alias LPRAWKEYBOARD = Pointer[Struct_tagRAWKEYBOARD];

record Struct_tagRAWHID (
    dwSizeHid : DWORD,
    dwCount : DWORD,
    bRawData : Array[BYTE, 1],
);

alias RAWHID = Struct_tagRAWHID;

alias PRAWHID = Pointer[Struct_tagRAWHID];

alias LPRAWHID = Pointer[Struct_tagRAWHID];

record Struct_tagRAWINPUT (
    header : RAWINPUTHEADER,
    data : Union_Unnamed145,
);

alias Union_Unnamed145 = Union[
    /* mouse */ RAWMOUSE,
    /* keyboard */ RAWKEYBOARD,
    /* hid */ RAWHID,
];

alias RAWINPUT = Struct_tagRAWINPUT;

alias PRAWINPUT = Pointer[Struct_tagRAWINPUT];

alias LPRAWINPUT = Pointer[Struct_tagRAWINPUT];

external (stdcall) GetRawInputData(arg0:HRAWINPUT, arg1:UINT, arg2:LPVOID, arg3:PUINT, arg4:UINT) : UINT;

record Struct_tagRID_DEVICE_INFO_MOUSE (
    dwId : DWORD,
    dwNumberOfButtons : DWORD,
    dwSampleRate : DWORD,
    fHasHorizontalWheel : BOOL,
);

alias RID_DEVICE_INFO_MOUSE = Struct_tagRID_DEVICE_INFO_MOUSE;

alias PRID_DEVICE_INFO_MOUSE = Pointer[Struct_tagRID_DEVICE_INFO_MOUSE];

record Struct_tagRID_DEVICE_INFO_KEYBOARD (
    dwType : DWORD,
    dwSubType : DWORD,
    dwKeyboardMode : DWORD,
    dwNumberOfFunctionKeys : DWORD,
    dwNumberOfIndicators : DWORD,
    dwNumberOfKeysTotal : DWORD,
);

alias RID_DEVICE_INFO_KEYBOARD = Struct_tagRID_DEVICE_INFO_KEYBOARD;

alias PRID_DEVICE_INFO_KEYBOARD = Pointer[Struct_tagRID_DEVICE_INFO_KEYBOARD];

record Struct_tagRID_DEVICE_INFO_HID (
    dwVendorId : DWORD,
    dwProductId : DWORD,
    dwVersionNumber : DWORD,
    usUsagePage : USHORT,
    usUsage : USHORT,
);

alias RID_DEVICE_INFO_HID = Struct_tagRID_DEVICE_INFO_HID;

alias PRID_DEVICE_INFO_HID = Pointer[Struct_tagRID_DEVICE_INFO_HID];

record Struct_tagRID_DEVICE_INFO (
    cbSize : DWORD,
    dwType : DWORD,
);

alias Union_Unnamed146 = Union[
    /* mouse */ RID_DEVICE_INFO_MOUSE,
    /* keyboard */ RID_DEVICE_INFO_KEYBOARD,
    /* hid */ RID_DEVICE_INFO_HID,
];

alias RID_DEVICE_INFO = Struct_tagRID_DEVICE_INFO;

alias PRID_DEVICE_INFO = Pointer[Struct_tagRID_DEVICE_INFO];

alias LPRID_DEVICE_INFO = Pointer[Struct_tagRID_DEVICE_INFO];

external (stdcall) GetRawInputDeviceInfoA(arg0:HANDLE, arg1:UINT, arg2:LPVOID, arg3:PUINT) : UINT;

external (stdcall) GetRawInputDeviceInfoW(arg0:HANDLE, arg1:UINT, arg2:LPVOID, arg3:PUINT) : UINT;

external (stdcall) GetRawInputBuffer(arg0:PRAWINPUT, arg1:PUINT, arg2:UINT) : UINT;

record Struct_tagRAWINPUTDEVICE (
    usUsagePage : USHORT,
    usUsage : USHORT,
    dwFlags : DWORD,
    hwndTarget : HWND,
);

alias RAWINPUTDEVICE = Struct_tagRAWINPUTDEVICE;

alias PRAWINPUTDEVICE = Pointer[Struct_tagRAWINPUTDEVICE];

alias LPRAWINPUTDEVICE = Pointer[Struct_tagRAWINPUTDEVICE];

alias PCRAWINPUTDEVICE = Pointer[RAWINPUTDEVICE];

external (stdcall) RegisterRawInputDevices(arg0:PCRAWINPUTDEVICE, arg1:UINT, arg2:UINT) : BOOL;

external (stdcall) GetRegisteredRawInputDevices(arg0:PRAWINPUTDEVICE, arg1:PUINT, arg2:UINT) : UINT;

record Struct_tagRAWINPUTDEVICELIST (
    hDevice : HANDLE,
    dwType : DWORD,
);

alias RAWINPUTDEVICELIST = Struct_tagRAWINPUTDEVICELIST;

alias PRAWINPUTDEVICELIST = Pointer[Struct_tagRAWINPUTDEVICELIST];

external (stdcall) GetRawInputDeviceList(arg0:PRAWINPUTDEVICELIST, arg1:PUINT, arg2:UINT) : UINT;

external (stdcall) DefRawInputProc(arg0:Pointer[PRAWINPUT], arg1:INT, arg2:UINT) : LRESULT;

external (stdcall) ChangeWindowMessageFilter(arg0:UINT, arg1:DWORD) : BOOL;

record Struct_tagCHANGEFILTERSTRUCT (
    cbSize : DWORD,
    ExtStatus : DWORD,
);

alias CHANGEFILTERSTRUCT = Struct_tagCHANGEFILTERSTRUCT;

alias PCHANGEFILTERSTRUCT = Pointer[Struct_tagCHANGEFILTERSTRUCT];

external (stdcall) ChangeWindowMessageFilterEx(arg0:HWND, arg1:UINT, arg2:DWORD, arg3:PCHANGEFILTERSTRUCT) : BOOL;

record Struct_HGESTUREINFO__ (
    unused : Int,
);

alias HGESTUREINFO = Pointer[Struct_HGESTUREINFO__];

record Struct_tagGESTUREINFO (
    cbSize : UINT,
    dwFlags : DWORD,
    dwID : DWORD,
    hwndTarget : HWND,
    ptsLocation : POINTS,
    dwInstanceID : DWORD,
    dwSequenceID : DWORD,
    ullArguments : ULONGLONG,
    cbExtraArgs : UINT,
);

alias GESTUREINFO = Struct_tagGESTUREINFO;

alias PGESTUREINFO = Pointer[Struct_tagGESTUREINFO];

alias PCGESTUREINFO = Pointer[GESTUREINFO];

record Struct_tagGESTURENOTIFYSTRUCT (
    cbSize : UINT,
    dwFlags : DWORD,
    hwndTarget : HWND,
    ptsLocation : POINTS,
    dwInstanceID : DWORD,
);

alias GESTURENOTIFYSTRUCT = Struct_tagGESTURENOTIFYSTRUCT;

alias PGESTURENOTIFYSTRUCT = Pointer[Struct_tagGESTURENOTIFYSTRUCT];

external (stdcall) GetGestureInfo(arg0:HGESTUREINFO, arg1:PGESTUREINFO) : BOOL;

external (stdcall) GetGestureExtraArgs(arg0:HGESTUREINFO, arg1:UINT, arg2:PBYTE) : BOOL;

external (stdcall) CloseGestureInfoHandle(arg0:HGESTUREINFO) : BOOL;

record Struct_tagGESTURECONFIG (
    dwID : DWORD,
    dwWant : DWORD,
    dwBlock : DWORD,
);

alias GESTURECONFIG = Struct_tagGESTURECONFIG;

alias PGESTURECONFIG = Pointer[Struct_tagGESTURECONFIG];

external (stdcall) SetGestureConfig(arg0:HWND, arg1:DWORD, arg2:UINT, arg3:PGESTURECONFIG, arg4:UINT) : BOOL;

external (stdcall) GetGestureConfig(arg0:HWND, arg1:DWORD, arg2:DWORD, arg3:PUINT, arg4:PGESTURECONFIG, arg5:UINT) : BOOL;

external (stdcall) ShutdownBlockReasonCreate(arg0:HWND, arg1:LPCWSTR) : BOOL;

external (stdcall) ShutdownBlockReasonQuery(arg0:HWND, arg1:LPWSTR, arg2:Pointer[DWORD]) : BOOL;

external (stdcall) ShutdownBlockReasonDestroy(arg0:HWND) : BOOL;

alias LGRPID = DWORD;

alias LCTYPE = DWORD;

alias CALTYPE = DWORD;

alias CALID = DWORD;

record Struct__cpinfo (
    MaxCharSize : UINT,
    DefaultChar : Array[BYTE, 2],
    LeadByte : Array[BYTE, 12],
);

alias CPINFO = Struct__cpinfo;

alias LPCPINFO = Pointer[Struct__cpinfo];

record Struct__cpinfoexA (
    MaxCharSize : UINT,
    DefaultChar : Array[BYTE, 2],
    LeadByte : Array[BYTE, 12],
    UnicodeDefaultChar : WCHAR,
    CodePage : UINT,
    CodePageName : Array[CHAR, 260],
);

alias CPINFOEXA = Struct__cpinfoexA;

alias LPCPINFOEXA = Pointer[Struct__cpinfoexA];

record Struct__cpinfoexW (
    MaxCharSize : UINT,
    DefaultChar : Array[BYTE, 2],
    LeadByte : Array[BYTE, 12],
    UnicodeDefaultChar : WCHAR,
    CodePage : UINT,
    CodePageName : Array[WCHAR, 260],
);

alias CPINFOEXW = Struct__cpinfoexW;

alias LPCPINFOEXW = Pointer[Struct__cpinfoexW];

alias CPINFOEX = CPINFOEXA;

alias LPCPINFOEX = LPCPINFOEXA;

record Struct__numberfmtA (
    NumDigits : UINT,
    LeadingZero : UINT,
    Grouping : UINT,
    lpDecimalSep : LPSTR,
    lpThousandSep : LPSTR,
    NegativeOrder : UINT,
);

alias NUMBERFMTA = Struct__numberfmtA;

alias LPNUMBERFMTA = Pointer[Struct__numberfmtA];

record Struct__numberfmtW (
    NumDigits : UINT,
    LeadingZero : UINT,
    Grouping : UINT,
    lpDecimalSep : LPWSTR,
    lpThousandSep : LPWSTR,
    NegativeOrder : UINT,
);

alias NUMBERFMTW = Struct__numberfmtW;

alias LPNUMBERFMTW = Pointer[Struct__numberfmtW];

alias NUMBERFMT = NUMBERFMTA;

alias LPNUMBERFMT = LPNUMBERFMTA;

record Struct__currencyfmtA (
    NumDigits : UINT,
    LeadingZero : UINT,
    Grouping : UINT,
    lpDecimalSep : LPSTR,
    lpThousandSep : LPSTR,
    NegativeOrder : UINT,
    PositiveOrder : UINT,
    lpCurrencySymbol : LPSTR,
);

alias CURRENCYFMTA = Struct__currencyfmtA;

alias LPCURRENCYFMTA = Pointer[Struct__currencyfmtA];

record Struct__currencyfmtW (
    NumDigits : UINT,
    LeadingZero : UINT,
    Grouping : UINT,
    lpDecimalSep : LPWSTR,
    lpThousandSep : LPWSTR,
    NegativeOrder : UINT,
    PositiveOrder : UINT,
    lpCurrencySymbol : LPWSTR,
);

alias CURRENCYFMTW = Struct__currencyfmtW;

alias LPCURRENCYFMTW = Pointer[Struct__currencyfmtW];

alias CURRENCYFMT = CURRENCYFMTA;

alias LPCURRENCYFMT = LPCURRENCYFMTA;

alias Enum_SYSNLS_FUNCTION = Int;
alias COMPARE_STRING = 1;

alias NLS_FUNCTION = DWORD;

record Struct__nlsversioninfo (
    dwNLSVersionInfoSize : DWORD,
    dwNLSVersion : DWORD,
    dwDefinedVersion : DWORD,
);

alias NLSVERSIONINFO = Struct__nlsversioninfo;

alias LPNLSVERSIONINFO = Pointer[Struct__nlsversioninfo];

record Struct__nlsversioninfoex (
    dwNLSVersionInfoSize : DWORD,
    dwNLSVersion : DWORD,
    dwDefinedVersion : DWORD,
    dwEffectiveId : DWORD,
    guidCustomVersion : GUID,
);

alias NLSVERSIONINFOEX = Struct__nlsversioninfoex;

alias LPNLSVERSIONINFOEX = Pointer[Struct__nlsversioninfoex];

alias GEOID = LONG;

alias GEOTYPE = DWORD;

alias GEOCLASS = DWORD;

alias Enum_SYSGEOTYPE = Int;
alias GEO_NATION = 1;
alias GEO_LATITUDE = 2;
alias GEO_LONGITUDE = 3;
alias GEO_ISO2 = 4;
alias GEO_ISO3 = 5;
alias GEO_RFC1766 = 6;
alias GEO_LCID = 7;
alias GEO_FRIENDLYNAME = 8;
alias GEO_OFFICIALNAME = 9;
alias GEO_TIMEZONES = 10;
alias GEO_OFFICIALLANGUAGES = 11;

alias Enum_SYSGEOCLASS = Int;
alias GEOCLASS_NATION = 16;
alias GEOCLASS_REGION = 14;

alias Enum__NORM_FORM = Int;
alias NormalizationOther = 0;
alias NormalizationC = 1;
alias NormalizationD = 2;
alias NormalizationKC = 5;
alias NormalizationKD = 6;

alias NORM_FORM = Enum__NORM_FORM;

alias LANGUAGEGROUP_ENUMPROCA = StdCallCodePointer[[LGRPID, LPSTR, LPSTR, DWORD, LONG_PTR],[BOOL]];

alias LANGGROUPLOCALE_ENUMPROCA = StdCallCodePointer[[LGRPID, LCID, LPSTR, LONG_PTR],[BOOL]];

alias UILANGUAGE_ENUMPROCA = StdCallCodePointer[[LPSTR, LONG_PTR],[BOOL]];

alias LOCALE_ENUMPROCA = StdCallCodePointer[[LPSTR],[BOOL]];

alias CODEPAGE_ENUMPROCA = StdCallCodePointer[[LPSTR],[BOOL]];

alias DATEFMT_ENUMPROCA = StdCallCodePointer[[LPSTR],[BOOL]];

alias DATEFMT_ENUMPROCEXA = StdCallCodePointer[[LPSTR, CALID],[BOOL]];

alias TIMEFMT_ENUMPROCA = StdCallCodePointer[[LPSTR],[BOOL]];

alias CALINFO_ENUMPROCA = StdCallCodePointer[[LPSTR],[BOOL]];

alias CALINFO_ENUMPROCEXA = StdCallCodePointer[[LPSTR, CALID],[BOOL]];

alias LANGUAGEGROUP_ENUMPROCW = StdCallCodePointer[[LGRPID, LPWSTR, LPWSTR, DWORD, LONG_PTR],[BOOL]];

alias LANGGROUPLOCALE_ENUMPROCW = StdCallCodePointer[[LGRPID, LCID, LPWSTR, LONG_PTR],[BOOL]];

alias UILANGUAGE_ENUMPROCW = StdCallCodePointer[[LPWSTR, LONG_PTR],[BOOL]];

alias LOCALE_ENUMPROCW = StdCallCodePointer[[LPWSTR],[BOOL]];

alias CODEPAGE_ENUMPROCW = StdCallCodePointer[[LPWSTR],[BOOL]];

alias DATEFMT_ENUMPROCW = StdCallCodePointer[[LPWSTR],[BOOL]];

alias DATEFMT_ENUMPROCEXW = StdCallCodePointer[[LPWSTR, CALID],[BOOL]];

alias TIMEFMT_ENUMPROCW = StdCallCodePointer[[LPWSTR],[BOOL]];

alias CALINFO_ENUMPROCW = StdCallCodePointer[[LPWSTR],[BOOL]];

alias CALINFO_ENUMPROCEXW = StdCallCodePointer[[LPWSTR, CALID],[BOOL]];

alias GEO_ENUMPROC = StdCallCodePointer[[GEOID],[BOOL]];

record Struct__FILEMUIINFO (
    dwSize : DWORD,
    dwVersion : DWORD,
    dwFileType : DWORD,
    pChecksum : Array[BYTE, 16],
    pServiceChecksum : Array[BYTE, 16],
    dwLanguageNameOffset : DWORD,
    dwTypeIDMainSize : DWORD,
    dwTypeIDMainOffset : DWORD,
    dwTypeNameMainOffset : DWORD,
    dwTypeIDMUISize : DWORD,
    dwTypeIDMUIOffset : DWORD,
    dwTypeNameMUIOffset : DWORD,
    abBuffer : Array[BYTE, 8],
);

alias FILEMUIINFO = Struct__FILEMUIINFO;

alias PFILEMUIINFO = Pointer[Struct__FILEMUIINFO];

external (stdcall) IsValidCodePage(arg0:UINT) : BOOL;

external (stdcall) GetACP() : UINT;

external (stdcall) GetOEMCP() : UINT;

external (stdcall) GetCPInfo(arg0:UINT, arg1:LPCPINFO) : BOOL;

external (stdcall) GetCPInfoExA(arg0:UINT, arg1:DWORD, arg2:LPCPINFOEXA) : BOOL;

external (stdcall) GetCPInfoExW(arg0:UINT, arg1:DWORD, arg2:LPCPINFOEXW) : BOOL;

external (stdcall) IsDBCSLeadByte(arg0:BYTE) : BOOL;

external (stdcall) IsDBCSLeadByteEx(arg0:UINT, arg1:BYTE) : BOOL;

external (stdcall) MultiByteToWideChar(arg0:UINT, arg1:DWORD, arg2:LPCSTR, arg3:Int, arg4:LPWSTR, arg5:Int) : Int;

external (stdcall) WideCharToMultiByte(arg0:UINT, arg1:DWORD, arg2:LPCWSTR, arg3:Int, arg4:LPSTR, arg5:Int, arg6:LPCSTR, arg7:LPBOOL) : Int;

external (stdcall) CompareStringA(arg0:LCID, arg1:DWORD, arg2:PCNZCH, arg3:Int, arg4:PCNZCH, arg5:Int) : Int;

external (stdcall) CompareStringW(arg0:LCID, arg1:DWORD, arg2:PCNZWCH, arg3:Int, arg4:PCNZWCH, arg5:Int) : Int;

external (stdcall) FindNLSString(arg0:LCID, arg1:DWORD, arg2:LPCWSTR, arg3:Int, arg4:LPCWSTR, arg5:Int, arg6:LPINT) : Int;

external (stdcall) FindStringOrdinal(arg0:DWORD, arg1:LPCWSTR, arg2:Int, arg3:LPCWSTR, arg4:Int, arg5:BOOL) : Int;

external (stdcall) LCMapStringA(arg0:LCID, arg1:DWORD, arg2:LPCSTR, arg3:Int, arg4:LPSTR, arg5:Int) : Int;

external (stdcall) LCMapStringW(arg0:LCID, arg1:DWORD, arg2:LPCWSTR, arg3:Int, arg4:LPWSTR, arg5:Int) : Int;

external (stdcall) GetLocaleInfoA(arg0:LCID, arg1:LCTYPE, arg2:LPSTR, arg3:Int) : Int;

external (stdcall) GetLocaleInfoW(arg0:LCID, arg1:LCTYPE, arg2:LPWSTR, arg3:Int) : Int;

external (stdcall) SetLocaleInfoA(arg0:LCID, arg1:LCTYPE, arg2:LPCSTR) : BOOL;

external (stdcall) SetLocaleInfoW(arg0:LCID, arg1:LCTYPE, arg2:LPCWSTR) : BOOL;

external (stdcall) GetCalendarInfoA(arg0:LCID, arg1:CALID, arg2:CALTYPE, arg3:LPSTR, arg4:Int, arg5:LPDWORD) : Int;

external (stdcall) GetCalendarInfoW(arg0:LCID, arg1:CALID, arg2:CALTYPE, arg3:LPWSTR, arg4:Int, arg5:LPDWORD) : Int;

external (stdcall) SetCalendarInfoA(arg0:LCID, arg1:CALID, arg2:CALTYPE, arg3:LPCSTR) : BOOL;

external (stdcall) SetCalendarInfoW(arg0:LCID, arg1:CALID, arg2:CALTYPE, arg3:LPCWSTR) : BOOL;

external (stdcall) LCIDToLocaleName(arg0:LCID, arg1:LPWSTR, arg2:Int, arg3:DWORD) : Int;

external (stdcall) LocaleNameToLCID(arg0:LPCWSTR, arg1:DWORD) : LCID;

external (stdcall) GetTimeFormatA(arg0:LCID, arg1:DWORD, arg2:Pointer[SYSTEMTIME], arg3:LPCSTR, arg4:LPSTR, arg5:Int) : Int;

external (stdcall) GetTimeFormatW(arg0:LCID, arg1:DWORD, arg2:Pointer[SYSTEMTIME], arg3:LPCWSTR, arg4:LPWSTR, arg5:Int) : Int;

external (stdcall) GetDurationFormat(arg0:LCID, arg1:DWORD, arg2:Pointer[SYSTEMTIME], arg3:ULONGLONG, arg4:LPCWSTR, arg5:LPWSTR, arg6:Int) : Int;

external (stdcall) GetDateFormatA(arg0:LCID, arg1:DWORD, arg2:Pointer[SYSTEMTIME], arg3:LPCSTR, arg4:LPSTR, arg5:Int) : Int;

external (stdcall) GetDateFormatW(arg0:LCID, arg1:DWORD, arg2:Pointer[SYSTEMTIME], arg3:LPCWSTR, arg4:LPWSTR, arg5:Int) : Int;

external (stdcall) GetNumberFormatA(arg0:LCID, arg1:DWORD, arg2:LPCSTR, arg3:Pointer[NUMBERFMTA], arg4:LPSTR, arg5:Int) : Int;

external (stdcall) GetNumberFormatW(arg0:LCID, arg1:DWORD, arg2:LPCWSTR, arg3:Pointer[NUMBERFMTW], arg4:LPWSTR, arg5:Int) : Int;

external (stdcall) GetCurrencyFormatA(arg0:LCID, arg1:DWORD, arg2:LPCSTR, arg3:Pointer[CURRENCYFMTA], arg4:LPSTR, arg5:Int) : Int;

external (stdcall) GetCurrencyFormatW(arg0:LCID, arg1:DWORD, arg2:LPCWSTR, arg3:Pointer[CURRENCYFMTW], arg4:LPWSTR, arg5:Int) : Int;

external (stdcall) EnumCalendarInfoA(arg0:CALINFO_ENUMPROCA, arg1:LCID, arg2:CALID, arg3:CALTYPE) : BOOL;

external (stdcall) EnumCalendarInfoW(arg0:CALINFO_ENUMPROCW, arg1:LCID, arg2:CALID, arg3:CALTYPE) : BOOL;

external (stdcall) EnumCalendarInfoExA(arg0:CALINFO_ENUMPROCEXA, arg1:LCID, arg2:CALID, arg3:CALTYPE) : BOOL;

external (stdcall) EnumCalendarInfoExW(arg0:CALINFO_ENUMPROCEXW, arg1:LCID, arg2:CALID, arg3:CALTYPE) : BOOL;

external (stdcall) EnumTimeFormatsA(arg0:TIMEFMT_ENUMPROCA, arg1:LCID, arg2:DWORD) : BOOL;

external (stdcall) EnumTimeFormatsW(arg0:TIMEFMT_ENUMPROCW, arg1:LCID, arg2:DWORD) : BOOL;

external (stdcall) EnumDateFormatsA(arg0:DATEFMT_ENUMPROCA, arg1:LCID, arg2:DWORD) : BOOL;

external (stdcall) EnumDateFormatsW(arg0:DATEFMT_ENUMPROCW, arg1:LCID, arg2:DWORD) : BOOL;

external (stdcall) EnumDateFormatsExA(arg0:DATEFMT_ENUMPROCEXA, arg1:LCID, arg2:DWORD) : BOOL;

external (stdcall) EnumDateFormatsExW(arg0:DATEFMT_ENUMPROCEXW, arg1:LCID, arg2:DWORD) : BOOL;

external (stdcall) IsValidLanguageGroup(arg0:LGRPID, arg1:DWORD) : BOOL;

external (stdcall) GetNLSVersion(arg0:NLS_FUNCTION, arg1:LCID, arg2:LPNLSVERSIONINFO) : BOOL;

external (stdcall) IsNLSDefinedString(arg0:NLS_FUNCTION, arg1:DWORD, arg2:LPNLSVERSIONINFO, arg3:LPCWSTR, arg4:INT) : BOOL;

external (stdcall) IsValidLocale(arg0:LCID, arg1:DWORD) : BOOL;

external (stdcall) GetGeoInfoA(arg0:GEOID, arg1:GEOTYPE, arg2:LPSTR, arg3:Int, arg4:LANGID) : Int;

external (stdcall) GetGeoInfoW(arg0:GEOID, arg1:GEOTYPE, arg2:LPWSTR, arg3:Int, arg4:LANGID) : Int;

external (stdcall) EnumSystemGeoID(arg0:GEOCLASS, arg1:GEOID, arg2:GEO_ENUMPROC) : BOOL;

external (stdcall) GetUserGeoID(arg0:GEOCLASS) : GEOID;

external (stdcall) SetUserGeoID(arg0:GEOID) : BOOL;

external (stdcall) ConvertDefaultLocale(arg0:LCID) : LCID;

external (stdcall) GetThreadLocale() : LCID;

external (stdcall) SetThreadLocale(arg0:LCID) : BOOL;

external (stdcall) GetSystemDefaultUILanguage() : LANGID;

external (stdcall) GetUserDefaultUILanguage() : LANGID;

external (stdcall) GetSystemDefaultLangID() : LANGID;

external (stdcall) GetUserDefaultLangID() : LANGID;

external (stdcall) GetSystemDefaultLCID() : LCID;

external (stdcall) GetUserDefaultLCID() : LCID;

external (stdcall) SetThreadUILanguage(arg0:LANGID) : LANGID;

external (stdcall) GetThreadUILanguage() : LANGID;

external (stdcall) GetProcessPreferredUILanguages(arg0:DWORD, arg1:PULONG, arg2:PZZWSTR, arg3:PULONG) : BOOL;

external (stdcall) SetProcessPreferredUILanguages(arg0:DWORD, arg1:PCZZWSTR, arg2:PULONG) : BOOL;

external (stdcall) GetUserPreferredUILanguages(arg0:DWORD, arg1:PULONG, arg2:PZZWSTR, arg3:PULONG) : BOOL;

external (stdcall) GetSystemPreferredUILanguages(arg0:DWORD, arg1:PULONG, arg2:PZZWSTR, arg3:PULONG) : BOOL;

external (stdcall) GetThreadPreferredUILanguages(arg0:DWORD, arg1:PULONG, arg2:PZZWSTR, arg3:PULONG) : BOOL;

external (stdcall) SetThreadPreferredUILanguages(arg0:DWORD, arg1:PCZZWSTR, arg2:PULONG) : BOOL;

external (stdcall) GetFileMUIInfo(arg0:DWORD, arg1:PCWSTR, arg2:PFILEMUIINFO, arg3:Pointer[DWORD]) : BOOL;

external (stdcall) GetFileMUIPath(arg0:DWORD, arg1:PCWSTR, arg2:PWSTR, arg3:PULONG, arg4:PWSTR, arg5:PULONG, arg6:PULONGLONG) : BOOL;

external (stdcall) GetUILanguageInfo(arg0:DWORD, arg1:PCZZWSTR, arg2:PZZWSTR, arg3:PDWORD, arg4:PDWORD) : BOOL;

external (stdcall) NotifyUILanguageChange(arg0:DWORD, arg1:PCWSTR, arg2:PCWSTR, arg3:DWORD, arg4:PDWORD) : BOOL;

external (stdcall) GetStringTypeExA(arg0:LCID, arg1:DWORD, arg2:LPCSTR, arg3:Int, arg4:LPWORD) : BOOL;

external (stdcall) GetStringTypeExW(arg0:LCID, arg1:DWORD, arg2:LPCWSTR, arg3:Int, arg4:LPWORD) : BOOL;

external (stdcall) GetStringTypeA(arg0:LCID, arg1:DWORD, arg2:LPCSTR, arg3:Int, arg4:LPWORD) : BOOL;

external (stdcall) GetStringTypeW(arg0:DWORD, arg1:LPCWSTR, arg2:Int, arg3:LPWORD) : BOOL;

external (stdcall) FoldStringA(arg0:DWORD, arg1:LPCSTR, arg2:Int, arg3:LPSTR, arg4:Int) : Int;

external (stdcall) FoldStringW(arg0:DWORD, arg1:LPCWSTR, arg2:Int, arg3:LPWSTR, arg4:Int) : Int;

external (stdcall) EnumSystemLanguageGroupsA(arg0:LANGUAGEGROUP_ENUMPROCA, arg1:DWORD, arg2:LONG_PTR) : BOOL;

external (stdcall) EnumSystemLanguageGroupsW(arg0:LANGUAGEGROUP_ENUMPROCW, arg1:DWORD, arg2:LONG_PTR) : BOOL;

external (stdcall) EnumLanguageGroupLocalesA(arg0:LANGGROUPLOCALE_ENUMPROCA, arg1:LGRPID, arg2:DWORD, arg3:LONG_PTR) : BOOL;

external (stdcall) EnumLanguageGroupLocalesW(arg0:LANGGROUPLOCALE_ENUMPROCW, arg1:LGRPID, arg2:DWORD, arg3:LONG_PTR) : BOOL;

external (stdcall) EnumUILanguagesA(arg0:UILANGUAGE_ENUMPROCA, arg1:DWORD, arg2:LONG_PTR) : BOOL;

external (stdcall) EnumUILanguagesW(arg0:UILANGUAGE_ENUMPROCW, arg1:DWORD, arg2:LONG_PTR) : BOOL;

external (stdcall) EnumSystemLocalesA(arg0:LOCALE_ENUMPROCA, arg1:DWORD) : BOOL;

external (stdcall) EnumSystemLocalesW(arg0:LOCALE_ENUMPROCW, arg1:DWORD) : BOOL;

external (stdcall) EnumSystemCodePagesA(arg0:CODEPAGE_ENUMPROCA, arg1:DWORD) : BOOL;

external (stdcall) EnumSystemCodePagesW(arg0:CODEPAGE_ENUMPROCW, arg1:DWORD) : BOOL;

external (stdcall) NormalizeString(arg0:NORM_FORM, arg1:LPCWSTR, arg2:Int, arg3:LPWSTR, arg4:Int) : Int;

external (stdcall) IsNormalizedString(arg0:NORM_FORM, arg1:LPCWSTR, arg2:Int) : BOOL;

external (stdcall) IdnToAscii(arg0:DWORD, arg1:LPCWSTR, arg2:Int, arg3:LPWSTR, arg4:Int) : Int;

external (stdcall) IdnToNameprepUnicode(arg0:DWORD, arg1:LPCWSTR, arg2:Int, arg3:LPWSTR, arg4:Int) : Int;

external (stdcall) IdnToUnicode(arg0:DWORD, arg1:LPCWSTR, arg2:Int, arg3:LPWSTR, arg4:Int) : Int;

external (stdcall) VerifyScripts(arg0:DWORD, arg1:LPCWSTR, arg2:Int, arg3:LPCWSTR, arg4:Int) : BOOL;

external (stdcall) GetStringScripts(arg0:DWORD, arg1:LPCWSTR, arg2:Int, arg3:LPWSTR, arg4:Int) : Int;

external (stdcall) GetLocaleInfoEx(arg0:LPCWSTR, arg1:LCTYPE, arg2:LPWSTR, arg3:Int) : Int;

external (stdcall) GetCalendarInfoEx(arg0:LPCWSTR, arg1:CALID, arg2:LPCWSTR, arg3:CALTYPE, arg4:LPWSTR, arg5:Int, arg6:LPDWORD) : Int;

external (stdcall) GetTimeFormatEx(arg0:LPCWSTR, arg1:DWORD, arg2:Pointer[SYSTEMTIME], arg3:LPCWSTR, arg4:LPWSTR, arg5:Int) : Int;

external (stdcall) GetDateFormatEx(arg0:LPCWSTR, arg1:DWORD, arg2:Pointer[SYSTEMTIME], arg3:LPCWSTR, arg4:LPWSTR, arg5:Int, arg6:LPCWSTR) : Int;

external (stdcall) GetDurationFormatEx(arg0:LPCWSTR, arg1:DWORD, arg2:Pointer[SYSTEMTIME], arg3:ULONGLONG, arg4:LPCWSTR, arg5:LPWSTR, arg6:Int) : Int;

external (stdcall) GetNumberFormatEx(arg0:LPCWSTR, arg1:DWORD, arg2:LPCWSTR, arg3:Pointer[NUMBERFMTW], arg4:LPWSTR, arg5:Int) : Int;

external (stdcall) GetCurrencyFormatEx(arg0:LPCWSTR, arg1:DWORD, arg2:LPCWSTR, arg3:Pointer[CURRENCYFMTW], arg4:LPWSTR, arg5:Int) : Int;

external (stdcall) GetUserDefaultLocaleName(arg0:LPWSTR, arg1:Int) : Int;

external (stdcall) GetSystemDefaultLocaleName(arg0:LPWSTR, arg1:Int) : Int;

external (stdcall) GetNLSVersionEx(arg0:NLS_FUNCTION, arg1:LPCWSTR, arg2:LPNLSVERSIONINFOEX) : BOOL;

external (stdcall) CompareStringEx(arg0:LPCWSTR, arg1:DWORD, arg2:LPCWSTR, arg3:Int, arg4:LPCWSTR, arg5:Int, arg6:LPNLSVERSIONINFO, arg7:LPVOID, arg8:LPARAM) : Int;

external (stdcall) FindNLSStringEx(arg0:LPCWSTR, arg1:DWORD, arg2:LPCWSTR, arg3:Int, arg4:LPCWSTR, arg5:Int, arg6:LPINT, arg7:LPNLSVERSIONINFO, arg8:LPVOID, arg9:LPARAM) : Int;

external (stdcall) LCMapStringEx(arg0:LPCWSTR, arg1:DWORD, arg2:LPCWSTR, arg3:Int, arg4:LPWSTR, arg5:Int, arg6:LPNLSVERSIONINFO, arg7:LPVOID, arg8:LPARAM) : Int;

external (stdcall) CompareStringOrdinal(arg0:LPCWSTR, arg1:Int, arg2:LPCWSTR, arg3:Int, arg4:BOOL) : Int;

external (stdcall) IsValidLocaleName(arg0:LPCWSTR) : BOOL;

alias CALINFO_ENUMPROCEXEX = StdCallCodePointer[[LPWSTR, CALID, LPWSTR, LPARAM],[BOOL]];

external (stdcall) EnumCalendarInfoExEx(arg0:CALINFO_ENUMPROCEXEX, arg1:LPCWSTR, arg2:CALID, arg3:LPCWSTR, arg4:CALTYPE, arg5:LPARAM) : BOOL;

alias DATEFMT_ENUMPROCEXEX = StdCallCodePointer[[LPWSTR, CALID, LPARAM],[BOOL]];

external (stdcall) EnumDateFormatsExEx(arg0:DATEFMT_ENUMPROCEXEX, arg1:LPCWSTR, arg2:DWORD, arg3:LPARAM) : BOOL;

alias TIMEFMT_ENUMPROCEX = StdCallCodePointer[[LPWSTR, LPARAM],[BOOL]];

external (stdcall) EnumTimeFormatsEx(arg0:TIMEFMT_ENUMPROCEX, arg1:LPCWSTR, arg2:DWORD, arg3:LPARAM) : BOOL;

alias LOCALE_ENUMPROCEX = StdCallCodePointer[[LPWSTR, DWORD, LPARAM],[BOOL]];

external (stdcall) EnumSystemLocalesEx(arg0:LOCALE_ENUMPROCEX, arg1:DWORD, arg2:LPARAM, arg3:LPVOID) : BOOL;

external (stdcall) ResolveLocaleName(arg0:LPCWSTR, arg1:LPWSTR, arg2:Int) : Int;

record Struct__COORD (
    X : SHORT,
    Y : SHORT,
);

alias COORD = Struct__COORD;

alias PCOORD = Pointer[Struct__COORD];

record Struct__SMALL_RECT (
    Left : SHORT,
    Top : SHORT,
    Right : SHORT,
    Bottom : SHORT,
);

alias SMALL_RECT = Struct__SMALL_RECT;

alias PSMALL_RECT = Pointer[Struct__SMALL_RECT];

record Struct__KEY_EVENT_RECORD (
    bKeyDown : BOOL,
    wRepeatCount : WORD,
    wVirtualKeyCode : WORD,
    wVirtualScanCode : WORD,
    uChar : Union_Unnamed147,
    dwControlKeyState : DWORD,
);

alias Union_Unnamed147 = Union[
    /* UnicodeChar */ WCHAR,
    /* AsciiChar */ CHAR,
];

alias KEY_EVENT_RECORD = Struct__KEY_EVENT_RECORD;

alias PKEY_EVENT_RECORD = Pointer[Struct__KEY_EVENT_RECORD];

record Struct__MOUSE_EVENT_RECORD (
    dwMousePosition : COORD,
    dwButtonState : DWORD,
    dwControlKeyState : DWORD,
    dwEventFlags : DWORD,
);

alias MOUSE_EVENT_RECORD = Struct__MOUSE_EVENT_RECORD;

alias PMOUSE_EVENT_RECORD = Pointer[Struct__MOUSE_EVENT_RECORD];

record Struct__WINDOW_BUFFER_SIZE_RECORD (
    dwSize : COORD,
);

alias WINDOW_BUFFER_SIZE_RECORD = Struct__WINDOW_BUFFER_SIZE_RECORD;

alias PWINDOW_BUFFER_SIZE_RECORD = Pointer[Struct__WINDOW_BUFFER_SIZE_RECORD];

record Struct__MENU_EVENT_RECORD (
    dwCommandId : UINT,
);

alias MENU_EVENT_RECORD = Struct__MENU_EVENT_RECORD;

alias PMENU_EVENT_RECORD = Pointer[Struct__MENU_EVENT_RECORD];

record Struct__FOCUS_EVENT_RECORD (
    bSetFocus : BOOL,
);

alias FOCUS_EVENT_RECORD = Struct__FOCUS_EVENT_RECORD;

alias PFOCUS_EVENT_RECORD = Pointer[Struct__FOCUS_EVENT_RECORD];

record Struct__INPUT_RECORD (
    EventType : WORD,
    Event : Union_Unnamed148,
);

alias Union_Unnamed148 = Union[
    /* KeyEvent */ KEY_EVENT_RECORD,
    /* MouseEvent */ MOUSE_EVENT_RECORD,
    /* WindowBufferSizeEvent */ WINDOW_BUFFER_SIZE_RECORD,
    /* MenuEvent */ MENU_EVENT_RECORD,
    /* FocusEvent */ FOCUS_EVENT_RECORD,
];

alias INPUT_RECORD = Struct__INPUT_RECORD;

alias PINPUT_RECORD = Pointer[Struct__INPUT_RECORD];

record Struct__CHAR_INFO (
    Char : Union_Unnamed149,
    Attributes : WORD,
);

alias Union_Unnamed149 = Union[
    /* UnicodeChar */ WCHAR,
    /* AsciiChar */ CHAR,
];

alias CHAR_INFO = Struct__CHAR_INFO;

alias PCHAR_INFO = Pointer[Struct__CHAR_INFO];

record Struct__CONSOLE_SCREEN_BUFFER_INFO (
    dwSize : COORD,
    dwCursorPosition : COORD,
    wAttributes : WORD,
    srWindow : SMALL_RECT,
    dwMaximumWindowSize : COORD,
);

alias CONSOLE_SCREEN_BUFFER_INFO = Struct__CONSOLE_SCREEN_BUFFER_INFO;

alias PCONSOLE_SCREEN_BUFFER_INFO = Pointer[Struct__CONSOLE_SCREEN_BUFFER_INFO];

record Struct__CONSOLE_SCREEN_BUFFER_INFOEX (
    cbSize : ULONG,
    dwSize : COORD,
    dwCursorPosition : COORD,
    wAttributes : WORD,
    srWindow : SMALL_RECT,
    dwMaximumWindowSize : COORD,
    wPopupAttributes : WORD,
    bFullscreenSupported : BOOL,
    ColorTable : Array[COLORREF, 16],
);

alias CONSOLE_SCREEN_BUFFER_INFOEX = Struct__CONSOLE_SCREEN_BUFFER_INFOEX;

alias PCONSOLE_SCREEN_BUFFER_INFOEX = Pointer[Struct__CONSOLE_SCREEN_BUFFER_INFOEX];

record Struct__CONSOLE_CURSOR_INFO (
    dwSize : DWORD,
    bVisible : BOOL,
);

alias CONSOLE_CURSOR_INFO = Struct__CONSOLE_CURSOR_INFO;

alias PCONSOLE_CURSOR_INFO = Pointer[Struct__CONSOLE_CURSOR_INFO];

record Struct__CONSOLE_FONT_INFO (
    nFont : DWORD,
    dwFontSize : COORD,
);

alias CONSOLE_FONT_INFO = Struct__CONSOLE_FONT_INFO;

alias PCONSOLE_FONT_INFO = Pointer[Struct__CONSOLE_FONT_INFO];

record Struct__CONSOLE_FONT_INFOEX (
    cbSize : ULONG,
    nFont : DWORD,
    dwFontSize : COORD,
    FontFamily : UINT,
    FontWeight : UINT,
    FaceName : Array[WCHAR, 32],
);

alias CONSOLE_FONT_INFOEX = Struct__CONSOLE_FONT_INFOEX;

alias PCONSOLE_FONT_INFOEX = Pointer[Struct__CONSOLE_FONT_INFOEX];

record Struct__CONSOLE_HISTORY_INFO (
    cbSize : UINT,
    HistoryBufferSize : UINT,
    NumberOfHistoryBuffers : UINT,
    dwFlags : DWORD,
);

alias CONSOLE_HISTORY_INFO = Struct__CONSOLE_HISTORY_INFO;

alias PCONSOLE_HISTORY_INFO = Pointer[Struct__CONSOLE_HISTORY_INFO];

record Struct__CONSOLE_SELECTION_INFO (
    dwFlags : DWORD,
    dwSelectionAnchor : COORD,
    srSelection : SMALL_RECT,
);

alias CONSOLE_SELECTION_INFO = Struct__CONSOLE_SELECTION_INFO;

alias PCONSOLE_SELECTION_INFO = Pointer[Struct__CONSOLE_SELECTION_INFO];

alias PHANDLER_ROUTINE = StdCallCodePointer[[DWORD],[BOOL]];

external (stdcall) PeekConsoleInputA(arg0:HANDLE, arg1:PINPUT_RECORD, arg2:DWORD, arg3:LPDWORD) : BOOL;

external (stdcall) PeekConsoleInputW(arg0:HANDLE, arg1:PINPUT_RECORD, arg2:DWORD, arg3:LPDWORD) : BOOL;

external (stdcall) ReadConsoleInputA(arg0:HANDLE, arg1:PINPUT_RECORD, arg2:DWORD, arg3:LPDWORD) : BOOL;

external (stdcall) ReadConsoleInputW(arg0:HANDLE, arg1:PINPUT_RECORD, arg2:DWORD, arg3:LPDWORD) : BOOL;

external (stdcall) WriteConsoleInputA(arg0:HANDLE, arg1:Pointer[INPUT_RECORD], arg2:DWORD, arg3:LPDWORD) : BOOL;

external (stdcall) WriteConsoleInputW(arg0:HANDLE, arg1:Pointer[INPUT_RECORD], arg2:DWORD, arg3:LPDWORD) : BOOL;

external (stdcall) ReadConsoleOutputA(arg0:HANDLE, arg1:PCHAR_INFO, arg2:COORD, arg3:COORD, arg4:PSMALL_RECT) : BOOL;

external (stdcall) ReadConsoleOutputW(arg0:HANDLE, arg1:PCHAR_INFO, arg2:COORD, arg3:COORD, arg4:PSMALL_RECT) : BOOL;

external (stdcall) WriteConsoleOutputA(arg0:HANDLE, arg1:Pointer[CHAR_INFO], arg2:COORD, arg3:COORD, arg4:PSMALL_RECT) : BOOL;

external (stdcall) WriteConsoleOutputW(arg0:HANDLE, arg1:Pointer[CHAR_INFO], arg2:COORD, arg3:COORD, arg4:PSMALL_RECT) : BOOL;

external (stdcall) ReadConsoleOutputCharacterA(arg0:HANDLE, arg1:LPSTR, arg2:DWORD, arg3:COORD, arg4:LPDWORD) : BOOL;

external (stdcall) ReadConsoleOutputCharacterW(arg0:HANDLE, arg1:LPWSTR, arg2:DWORD, arg3:COORD, arg4:LPDWORD) : BOOL;

external (stdcall) ReadConsoleOutputAttribute(arg0:HANDLE, arg1:LPWORD, arg2:DWORD, arg3:COORD, arg4:LPDWORD) : BOOL;

external (stdcall) WriteConsoleOutputCharacterA(arg0:HANDLE, arg1:LPCSTR, arg2:DWORD, arg3:COORD, arg4:LPDWORD) : BOOL;

external (stdcall) WriteConsoleOutputCharacterW(arg0:HANDLE, arg1:LPCWSTR, arg2:DWORD, arg3:COORD, arg4:LPDWORD) : BOOL;

external (stdcall) WriteConsoleOutputAttribute(arg0:HANDLE, arg1:Pointer[WORD], arg2:DWORD, arg3:COORD, arg4:LPDWORD) : BOOL;

external (stdcall) FillConsoleOutputCharacterA(arg0:HANDLE, arg1:CHAR, arg2:DWORD, arg3:COORD, arg4:LPDWORD) : BOOL;

external (stdcall) FillConsoleOutputCharacterW(arg0:HANDLE, arg1:WCHAR, arg2:DWORD, arg3:COORD, arg4:LPDWORD) : BOOL;

external (stdcall) FillConsoleOutputAttribute(arg0:HANDLE, arg1:WORD, arg2:DWORD, arg3:COORD, arg4:LPDWORD) : BOOL;

external (stdcall) GetConsoleMode(arg0:HANDLE, arg1:LPDWORD) : BOOL;

external (stdcall) GetNumberOfConsoleInputEvents(arg0:HANDLE, arg1:LPDWORD) : BOOL;

external (stdcall) GetConsoleScreenBufferInfo(arg0:HANDLE, arg1:PCONSOLE_SCREEN_BUFFER_INFO) : BOOL;

external (stdcall) GetConsoleScreenBufferInfoEx(arg0:HANDLE, arg1:PCONSOLE_SCREEN_BUFFER_INFOEX) : BOOL;

external (stdcall) SetConsoleScreenBufferInfoEx(arg0:HANDLE, arg1:PCONSOLE_SCREEN_BUFFER_INFOEX) : BOOL;

external (stdcall) GetLargestConsoleWindowSize(arg0:HANDLE) : COORD;

external (stdcall) GetConsoleCursorInfo(arg0:HANDLE, arg1:PCONSOLE_CURSOR_INFO) : BOOL;

external (stdcall) GetCurrentConsoleFont(arg0:HANDLE, arg1:BOOL, arg2:PCONSOLE_FONT_INFO) : BOOL;

external (stdcall) GetCurrentConsoleFontEx(arg0:HANDLE, arg1:BOOL, arg2:PCONSOLE_FONT_INFOEX) : BOOL;

external (stdcall) SetCurrentConsoleFontEx(arg0:HANDLE, arg1:BOOL, arg2:PCONSOLE_FONT_INFOEX) : BOOL;

external (stdcall) GetConsoleHistoryInfo(arg0:PCONSOLE_HISTORY_INFO) : BOOL;

external (stdcall) SetConsoleHistoryInfo(arg0:PCONSOLE_HISTORY_INFO) : BOOL;

external (stdcall) GetConsoleFontSize(arg0:HANDLE, arg1:DWORD) : COORD;

external (stdcall) GetConsoleSelectionInfo(arg0:PCONSOLE_SELECTION_INFO) : BOOL;

external (stdcall) GetNumberOfConsoleMouseButtons(arg0:LPDWORD) : BOOL;

external (stdcall) SetConsoleMode(arg0:HANDLE, arg1:DWORD) : BOOL;

external (stdcall) SetConsoleActiveScreenBuffer(arg0:HANDLE) : BOOL;

external (stdcall) FlushConsoleInputBuffer(arg0:HANDLE) : BOOL;

external (stdcall) SetConsoleScreenBufferSize(arg0:HANDLE, arg1:COORD) : BOOL;

external (stdcall) SetConsoleCursorPosition(arg0:HANDLE, arg1:COORD) : BOOL;

external (stdcall) SetConsoleCursorInfo(arg0:HANDLE, arg1:Pointer[CONSOLE_CURSOR_INFO]) : BOOL;

external (stdcall) ScrollConsoleScreenBufferA(arg0:HANDLE, arg1:Pointer[SMALL_RECT], arg2:Pointer[SMALL_RECT], arg3:COORD, arg4:Pointer[CHAR_INFO]) : BOOL;

external (stdcall) ScrollConsoleScreenBufferW(arg0:HANDLE, arg1:Pointer[SMALL_RECT], arg2:Pointer[SMALL_RECT], arg3:COORD, arg4:Pointer[CHAR_INFO]) : BOOL;

external (stdcall) SetConsoleWindowInfo(arg0:HANDLE, arg1:BOOL, arg2:Pointer[SMALL_RECT]) : BOOL;

external (stdcall) SetConsoleTextAttribute(arg0:HANDLE, arg1:WORD) : BOOL;

external (stdcall) SetConsoleCtrlHandler(arg0:PHANDLER_ROUTINE, arg1:BOOL) : BOOL;

external (stdcall) GenerateConsoleCtrlEvent(arg0:DWORD, arg1:DWORD) : BOOL;

external (stdcall) AllocConsole() : BOOL;

external (stdcall) FreeConsole() : BOOL;

external (stdcall) AttachConsole(arg0:DWORD) : BOOL;

external (stdcall) GetConsoleTitleA(arg0:LPSTR, arg1:DWORD) : DWORD;

external (stdcall) GetConsoleTitleW(arg0:LPWSTR, arg1:DWORD) : DWORD;

external (stdcall) GetConsoleOriginalTitleA(arg0:LPSTR, arg1:DWORD) : DWORD;

external (stdcall) GetConsoleOriginalTitleW(arg0:LPWSTR, arg1:DWORD) : DWORD;

external (stdcall) SetConsoleTitleA(arg0:LPCSTR) : BOOL;

external (stdcall) SetConsoleTitleW(arg0:LPCWSTR) : BOOL;

record Struct__CONSOLE_READCONSOLE_CONTROL (
    nLength : ULONG,
    nInitialChars : ULONG,
    dwCtrlWakeupMask : ULONG,
    dwControlKeyState : ULONG,
);

alias CONSOLE_READCONSOLE_CONTROL = Struct__CONSOLE_READCONSOLE_CONTROL;

alias PCONSOLE_READCONSOLE_CONTROL = Pointer[Struct__CONSOLE_READCONSOLE_CONTROL];

external (stdcall) ReadConsoleA(arg0:HANDLE, arg1:LPVOID, arg2:DWORD, arg3:LPDWORD, arg4:PCONSOLE_READCONSOLE_CONTROL) : BOOL;

external (stdcall) ReadConsoleW(arg0:HANDLE, arg1:LPVOID, arg2:DWORD, arg3:LPDWORD, arg4:PCONSOLE_READCONSOLE_CONTROL) : BOOL;

external (stdcall) WriteConsoleA(arg0:HANDLE, arg1:OpaquePointer, arg2:DWORD, arg3:LPDWORD, arg4:LPVOID) : BOOL;

external (stdcall) WriteConsoleW(arg0:HANDLE, arg1:OpaquePointer, arg2:DWORD, arg3:LPDWORD, arg4:LPVOID) : BOOL;

external (stdcall) CreateConsoleScreenBuffer(arg0:DWORD, arg1:DWORD, arg2:Pointer[SECURITY_ATTRIBUTES], arg3:DWORD, arg4:LPVOID) : HANDLE;

external (stdcall) GetConsoleCP() : UINT;

external (stdcall) SetConsoleCP(arg0:UINT) : BOOL;

external (stdcall) GetConsoleOutputCP() : UINT;

external (stdcall) SetConsoleOutputCP(arg0:UINT) : BOOL;

external (stdcall) GetConsoleDisplayMode(arg0:LPDWORD) : BOOL;

external (stdcall) SetConsoleDisplayMode(arg0:HANDLE, arg1:DWORD, arg2:PCOORD) : BOOL;

external (stdcall) GetConsoleWindow() : HWND;

external (stdcall) GetConsoleProcessList(arg0:LPDWORD, arg1:DWORD) : DWORD;

external (stdcall) AddConsoleAliasA(arg0:LPSTR, arg1:LPSTR, arg2:LPSTR) : BOOL;

external (stdcall) AddConsoleAliasW(arg0:LPWSTR, arg1:LPWSTR, arg2:LPWSTR) : BOOL;

external (stdcall) GetConsoleAliasA(arg0:LPSTR, arg1:LPSTR, arg2:DWORD, arg3:LPSTR) : DWORD;

external (stdcall) GetConsoleAliasW(arg0:LPWSTR, arg1:LPWSTR, arg2:DWORD, arg3:LPWSTR) : DWORD;

external (stdcall) GetConsoleAliasesLengthA(arg0:LPSTR) : DWORD;

external (stdcall) GetConsoleAliasesLengthW(arg0:LPWSTR) : DWORD;

external (stdcall) GetConsoleAliasExesLengthA() : DWORD;

external (stdcall) GetConsoleAliasExesLengthW() : DWORD;

external (stdcall) GetConsoleAliasesA(arg0:LPSTR, arg1:DWORD, arg2:LPSTR) : DWORD;

external (stdcall) GetConsoleAliasesW(arg0:LPWSTR, arg1:DWORD, arg2:LPWSTR) : DWORD;

external (stdcall) GetConsoleAliasExesA(arg0:LPSTR, arg1:DWORD) : DWORD;

external (stdcall) GetConsoleAliasExesW(arg0:LPWSTR, arg1:DWORD) : DWORD;

record Struct_tagVS_FIXEDFILEINFO (
    dwSignature : DWORD,
    dwStrucVersion : DWORD,
    dwFileVersionMS : DWORD,
    dwFileVersionLS : DWORD,
    dwProductVersionMS : DWORD,
    dwProductVersionLS : DWORD,
    dwFileFlagsMask : DWORD,
    dwFileFlags : DWORD,
    dwFileOS : DWORD,
    dwFileType : DWORD,
    dwFileSubtype : DWORD,
    dwFileDateMS : DWORD,
    dwFileDateLS : DWORD,
);

alias VS_FIXEDFILEINFO = Struct_tagVS_FIXEDFILEINFO;

external (stdcall) VerFindFileA(arg0:DWORD, arg1:LPCSTR, arg2:LPCSTR, arg3:LPCSTR, arg4:LPSTR, arg5:PUINT, arg6:LPSTR, arg7:PUINT) : DWORD;

external (stdcall) VerFindFileW(arg0:DWORD, arg1:LPCWSTR, arg2:LPCWSTR, arg3:LPCWSTR, arg4:LPWSTR, arg5:PUINT, arg6:LPWSTR, arg7:PUINT) : DWORD;

external (stdcall) VerInstallFileA(arg0:DWORD, arg1:LPCSTR, arg2:LPCSTR, arg3:LPCSTR, arg4:LPCSTR, arg5:LPCSTR, arg6:LPSTR, arg7:PUINT) : DWORD;

external (stdcall) VerInstallFileW(arg0:DWORD, arg1:LPCWSTR, arg2:LPCWSTR, arg3:LPCWSTR, arg4:LPCWSTR, arg5:LPCWSTR, arg6:LPWSTR, arg7:PUINT) : DWORD;

external (stdcall) GetFileVersionInfoSizeA(arg0:LPCSTR, arg1:LPDWORD) : DWORD;

external (stdcall) GetFileVersionInfoSizeW(arg0:LPCWSTR, arg1:LPDWORD) : DWORD;

external (stdcall) GetFileVersionInfoA(arg0:LPCSTR, arg1:DWORD, arg2:DWORD, arg3:LPVOID) : BOOL;

external (stdcall) GetFileVersionInfoW(arg0:LPCWSTR, arg1:DWORD, arg2:DWORD, arg3:LPVOID) : BOOL;

external (stdcall) GetFileVersionInfoSizeExA(arg0:DWORD, arg1:LPCSTR, arg2:LPDWORD) : DWORD;

external (stdcall) GetFileVersionInfoSizeExW(arg0:DWORD, arg1:LPCWSTR, arg2:LPDWORD) : DWORD;

external (stdcall) GetFileVersionInfoExA(arg0:DWORD, arg1:LPCSTR, arg2:DWORD, arg3:DWORD, arg4:LPVOID) : BOOL;

external (stdcall) GetFileVersionInfoExW(arg0:DWORD, arg1:LPCWSTR, arg2:DWORD, arg3:DWORD, arg4:LPVOID) : BOOL;

external (stdcall) VerLanguageNameA(arg0:DWORD, arg1:LPSTR, arg2:DWORD) : DWORD;

external (stdcall) VerLanguageNameW(arg0:DWORD, arg1:LPWSTR, arg2:DWORD) : DWORD;

external (stdcall) VerQueryValueA(arg0:LPCVOID, arg1:LPCSTR, arg2:Pointer[LPVOID], arg3:PUINT) : BOOL;

external (stdcall) VerQueryValueW(arg0:LPCVOID, arg1:LPCWSTR, arg2:Pointer[LPVOID], arg3:PUINT) : BOOL;

alias REGSAM = ACCESS_MASK;

record Struct_val_context (
    valuelen : Int,
    value_context : LPVOID,
    val_buff_ptr : LPVOID,
);

alias PVALCONTEXT = Pointer[Struct_val_context];

record Struct_pvalueA (
    pv_valuename : LPSTR,
    pv_valuelen : Int,
    pv_value_context : LPVOID,
    pv_type : DWORD,
);

alias PVALUEA = Struct_pvalueA;

alias PPVALUEA = Pointer[Struct_pvalueA];

record Struct_pvalueW (
    pv_valuename : LPWSTR,
    pv_valuelen : Int,
    pv_value_context : LPVOID,
    pv_type : DWORD,
);

alias PVALUEW = Struct_pvalueW;

alias PPVALUEW = Pointer[Struct_pvalueW];

alias PVALUE = PVALUEA;

alias PPVALUE = PPVALUEA;

alias QUERYHANDLER = /* unknown kind FunctionProto */ Opaque;

alias PQUERYHANDLER = Pointer[QUERYHANDLER];

record Struct_provider_info (
    pi_R0_1val : PQUERYHANDLER,
    pi_R0_allvals : PQUERYHANDLER,
    pi_R3_1val : PQUERYHANDLER,
    pi_R3_allvals : PQUERYHANDLER,
    pi_flags : DWORD,
    pi_key_context : LPVOID,
);

alias REG_PROVIDER = Struct_provider_info;

alias PPROVIDER = Pointer[Struct_provider_info];

record Struct_value_entA (
    ve_valuename : LPSTR,
    ve_valuelen : DWORD,
    ve_valueptr : DWORD_PTR,
    ve_type : DWORD,
);

alias VALENTA = Struct_value_entA;

alias PVALENTA = Pointer[Struct_value_entA];

record Struct_value_entW (
    ve_valuename : LPWSTR,
    ve_valuelen : DWORD,
    ve_valueptr : DWORD_PTR,
    ve_type : DWORD,
);

alias VALENTW = Struct_value_entW;

alias PVALENTW = Pointer[Struct_value_entW];

alias VALENT = VALENTA;

alias PVALENT = PVALENTA;

alias LSTATUS = LONG;

external (stdcall) RegCloseKey(arg0:HKEY) : LSTATUS;

external (stdcall) RegOverridePredefKey(arg0:HKEY, arg1:HKEY) : LSTATUS;

external (stdcall) RegOpenUserClassesRoot(arg0:HANDLE, arg1:DWORD, arg2:REGSAM, arg3:PHKEY) : LSTATUS;

external (stdcall) RegOpenCurrentUser(arg0:REGSAM, arg1:PHKEY) : LSTATUS;

external (stdcall) RegDisablePredefinedCache() : LSTATUS;

external (stdcall) RegDisablePredefinedCacheEx() : LSTATUS;

external (stdcall) RegConnectRegistryA(arg0:LPCSTR, arg1:HKEY, arg2:PHKEY) : LSTATUS;

external (stdcall) RegConnectRegistryW(arg0:LPCWSTR, arg1:HKEY, arg2:PHKEY) : LSTATUS;

external (stdcall) RegConnectRegistryExA(arg0:LPCSTR, arg1:HKEY, arg2:ULONG, arg3:PHKEY) : LSTATUS;

external (stdcall) RegConnectRegistryExW(arg0:LPCWSTR, arg1:HKEY, arg2:ULONG, arg3:PHKEY) : LSTATUS;

external (stdcall) RegCreateKeyA(arg0:HKEY, arg1:LPCSTR, arg2:PHKEY) : LSTATUS;

external (stdcall) RegCreateKeyW(arg0:HKEY, arg1:LPCWSTR, arg2:PHKEY) : LSTATUS;

external (stdcall) RegCreateKeyExA(arg0:HKEY, arg1:LPCSTR, arg2:DWORD, arg3:LPSTR, arg4:DWORD, arg5:REGSAM, arg6:LPSECURITY_ATTRIBUTES, arg7:PHKEY, arg8:LPDWORD) : LSTATUS;

external (stdcall) RegCreateKeyExW(arg0:HKEY, arg1:LPCWSTR, arg2:DWORD, arg3:LPWSTR, arg4:DWORD, arg5:REGSAM, arg6:LPSECURITY_ATTRIBUTES, arg7:PHKEY, arg8:LPDWORD) : LSTATUS;

external (stdcall) RegCreateKeyTransactedA(arg0:HKEY, arg1:LPCSTR, arg2:DWORD, arg3:LPSTR, arg4:DWORD, arg5:REGSAM, arg6:LPSECURITY_ATTRIBUTES, arg7:PHKEY, arg8:LPDWORD, arg9:HANDLE, arg10:PVOID) : LSTATUS;

external (stdcall) RegCreateKeyTransactedW(arg0:HKEY, arg1:LPCWSTR, arg2:DWORD, arg3:LPWSTR, arg4:DWORD, arg5:REGSAM, arg6:LPSECURITY_ATTRIBUTES, arg7:PHKEY, arg8:LPDWORD, arg9:HANDLE, arg10:PVOID) : LSTATUS;

external (stdcall) RegDeleteKeyA(arg0:HKEY, arg1:LPCSTR) : LSTATUS;

external (stdcall) RegDeleteKeyW(arg0:HKEY, arg1:LPCWSTR) : LSTATUS;

external (stdcall) RegDeleteKeyExA(arg0:HKEY, arg1:LPCSTR, arg2:REGSAM, arg3:DWORD) : LSTATUS;

external (stdcall) RegDeleteKeyExW(arg0:HKEY, arg1:LPCWSTR, arg2:REGSAM, arg3:DWORD) : LSTATUS;

external (stdcall) RegDeleteKeyTransactedA(arg0:HKEY, arg1:LPCSTR, arg2:REGSAM, arg3:DWORD, arg4:HANDLE, arg5:PVOID) : LSTATUS;

external (stdcall) RegDeleteKeyTransactedW(arg0:HKEY, arg1:LPCWSTR, arg2:REGSAM, arg3:DWORD, arg4:HANDLE, arg5:PVOID) : LSTATUS;

external (stdcall) RegDisableReflectionKey(arg0:HKEY) : LONG;

external (stdcall) RegEnableReflectionKey(arg0:HKEY) : LONG;

external (stdcall) RegQueryReflectionKey(arg0:HKEY, arg1:Pointer[BOOL]) : LONG;

external (stdcall) RegDeleteValueA(arg0:HKEY, arg1:LPCSTR) : LSTATUS;

external (stdcall) RegDeleteValueW(arg0:HKEY, arg1:LPCWSTR) : LSTATUS;

external (stdcall) RegEnumKeyA(arg0:HKEY, arg1:DWORD, arg2:LPSTR, arg3:DWORD) : LSTATUS;

external (stdcall) RegEnumKeyW(arg0:HKEY, arg1:DWORD, arg2:LPWSTR, arg3:DWORD) : LSTATUS;

external (stdcall) RegEnumKeyExA(arg0:HKEY, arg1:DWORD, arg2:LPSTR, arg3:LPDWORD, arg4:LPDWORD, arg5:LPSTR, arg6:LPDWORD, arg7:PFILETIME) : LSTATUS;

external (stdcall) RegEnumKeyExW(arg0:HKEY, arg1:DWORD, arg2:LPWSTR, arg3:LPDWORD, arg4:LPDWORD, arg5:LPWSTR, arg6:LPDWORD, arg7:PFILETIME) : LSTATUS;

external (stdcall) RegEnumValueA(arg0:HKEY, arg1:DWORD, arg2:LPSTR, arg3:LPDWORD, arg4:LPDWORD, arg5:LPDWORD, arg6:LPBYTE, arg7:LPDWORD) : LSTATUS;

external (stdcall) RegEnumValueW(arg0:HKEY, arg1:DWORD, arg2:LPWSTR, arg3:LPDWORD, arg4:LPDWORD, arg5:LPDWORD, arg6:LPBYTE, arg7:LPDWORD) : LSTATUS;

external (stdcall) RegFlushKey(arg0:HKEY) : LSTATUS;

external (stdcall) RegGetKeySecurity(arg0:HKEY, arg1:SECURITY_INFORMATION, arg2:PSECURITY_DESCRIPTOR, arg3:LPDWORD) : LSTATUS;

external (stdcall) RegLoadKeyA(arg0:HKEY, arg1:LPCSTR, arg2:LPCSTR) : LSTATUS;

external (stdcall) RegLoadKeyW(arg0:HKEY, arg1:LPCWSTR, arg2:LPCWSTR) : LSTATUS;

external (stdcall) RegNotifyChangeKeyValue(arg0:HKEY, arg1:BOOL, arg2:DWORD, arg3:HANDLE, arg4:BOOL) : LSTATUS;

external (stdcall) RegOpenKeyA(arg0:HKEY, arg1:LPCSTR, arg2:PHKEY) : LSTATUS;

external (stdcall) RegOpenKeyW(arg0:HKEY, arg1:LPCWSTR, arg2:PHKEY) : LSTATUS;

external (stdcall) RegOpenKeyExA(arg0:HKEY, arg1:LPCSTR, arg2:DWORD, arg3:REGSAM, arg4:PHKEY) : LSTATUS;

external (stdcall) RegOpenKeyExW(arg0:HKEY, arg1:LPCWSTR, arg2:DWORD, arg3:REGSAM, arg4:PHKEY) : LSTATUS;

external (stdcall) RegOpenKeyTransactedA(arg0:HKEY, arg1:LPCSTR, arg2:DWORD, arg3:REGSAM, arg4:PHKEY, arg5:HANDLE, arg6:PVOID) : LSTATUS;

external (stdcall) RegOpenKeyTransactedW(arg0:HKEY, arg1:LPCWSTR, arg2:DWORD, arg3:REGSAM, arg4:PHKEY, arg5:HANDLE, arg6:PVOID) : LSTATUS;

external (stdcall) RegQueryInfoKeyA(arg0:HKEY, arg1:LPSTR, arg2:LPDWORD, arg3:LPDWORD, arg4:LPDWORD, arg5:LPDWORD, arg6:LPDWORD, arg7:LPDWORD, arg8:LPDWORD, arg9:LPDWORD, arg10:LPDWORD, arg11:PFILETIME) : LSTATUS;

external (stdcall) RegQueryInfoKeyW(arg0:HKEY, arg1:LPWSTR, arg2:LPDWORD, arg3:LPDWORD, arg4:LPDWORD, arg5:LPDWORD, arg6:LPDWORD, arg7:LPDWORD, arg8:LPDWORD, arg9:LPDWORD, arg10:LPDWORD, arg11:PFILETIME) : LSTATUS;

external (stdcall) RegQueryValueA(arg0:HKEY, arg1:LPCSTR, arg2:LPSTR, arg3:PLONG) : LSTATUS;

external (stdcall) RegQueryValueW(arg0:HKEY, arg1:LPCWSTR, arg2:LPWSTR, arg3:PLONG) : LSTATUS;

external (stdcall) RegQueryMultipleValuesA(arg0:HKEY, arg1:PVALENTA, arg2:DWORD, arg3:LPSTR, arg4:LPDWORD) : LSTATUS;

external (stdcall) RegQueryMultipleValuesW(arg0:HKEY, arg1:PVALENTW, arg2:DWORD, arg3:LPWSTR, arg4:LPDWORD) : LSTATUS;

external (stdcall) RegQueryValueExA(arg0:HKEY, arg1:LPCSTR, arg2:LPDWORD, arg3:LPDWORD, arg4:LPBYTE, arg5:LPDWORD) : LSTATUS;

external (stdcall) RegQueryValueExW(arg0:HKEY, arg1:LPCWSTR, arg2:LPDWORD, arg3:LPDWORD, arg4:LPBYTE, arg5:LPDWORD) : LSTATUS;

external (stdcall) RegReplaceKeyA(arg0:HKEY, arg1:LPCSTR, arg2:LPCSTR, arg3:LPCSTR) : LSTATUS;

external (stdcall) RegReplaceKeyW(arg0:HKEY, arg1:LPCWSTR, arg2:LPCWSTR, arg3:LPCWSTR) : LSTATUS;

external (stdcall) RegRestoreKeyA(arg0:HKEY, arg1:LPCSTR, arg2:DWORD) : LSTATUS;

external (stdcall) RegRestoreKeyW(arg0:HKEY, arg1:LPCWSTR, arg2:DWORD) : LSTATUS;

external (stdcall) RegRenameKey(arg0:HKEY, arg1:LPCWSTR, arg2:LPCWSTR) : LSTATUS;

external (stdcall) RegSaveKeyA(arg0:HKEY, arg1:LPCSTR, arg2:LPSECURITY_ATTRIBUTES) : LSTATUS;

external (stdcall) RegSaveKeyW(arg0:HKEY, arg1:LPCWSTR, arg2:LPSECURITY_ATTRIBUTES) : LSTATUS;

external (stdcall) RegSetKeySecurity(arg0:HKEY, arg1:SECURITY_INFORMATION, arg2:PSECURITY_DESCRIPTOR) : LSTATUS;

external (stdcall) RegSetValueA(arg0:HKEY, arg1:LPCSTR, arg2:DWORD, arg3:LPCSTR, arg4:DWORD) : LSTATUS;

external (stdcall) RegSetValueW(arg0:HKEY, arg1:LPCWSTR, arg2:DWORD, arg3:LPCWSTR, arg4:DWORD) : LSTATUS;

external (stdcall) RegSetValueExA(arg0:HKEY, arg1:LPCSTR, arg2:DWORD, arg3:DWORD, arg4:Pointer[BYTE], arg5:DWORD) : LSTATUS;

external (stdcall) RegSetValueExW(arg0:HKEY, arg1:LPCWSTR, arg2:DWORD, arg3:DWORD, arg4:Pointer[BYTE], arg5:DWORD) : LSTATUS;

external (stdcall) RegUnLoadKeyA(arg0:HKEY, arg1:LPCSTR) : LSTATUS;

external (stdcall) RegUnLoadKeyW(arg0:HKEY, arg1:LPCWSTR) : LSTATUS;

external (stdcall) RegDeleteKeyValueA(arg0:HKEY, arg1:LPCSTR, arg2:LPCSTR) : LSTATUS;

external (stdcall) RegDeleteKeyValueW(arg0:HKEY, arg1:LPCWSTR, arg2:LPCWSTR) : LSTATUS;

external (stdcall) RegSetKeyValueA(arg0:HKEY, arg1:LPCSTR, arg2:LPCSTR, arg3:DWORD, arg4:LPCVOID, arg5:DWORD) : LSTATUS;

external (stdcall) RegSetKeyValueW(arg0:HKEY, arg1:LPCWSTR, arg2:LPCWSTR, arg3:DWORD, arg4:LPCVOID, arg5:DWORD) : LSTATUS;

external (stdcall) RegDeleteTreeA(arg0:HKEY, arg1:LPCSTR) : LSTATUS;

external (stdcall) RegDeleteTreeW(arg0:HKEY, arg1:LPCWSTR) : LSTATUS;

external (stdcall) RegCopyTreeA(arg0:HKEY, arg1:LPCSTR, arg2:HKEY) : LSTATUS;

external (stdcall) RegCopyTreeW(arg0:HKEY, arg1:LPCWSTR, arg2:HKEY) : LSTATUS;

external (stdcall) RegGetValueA(arg0:HKEY, arg1:LPCSTR, arg2:LPCSTR, arg3:DWORD, arg4:LPDWORD, arg5:PVOID, arg6:LPDWORD) : LSTATUS;

external (stdcall) RegGetValueW(arg0:HKEY, arg1:LPCWSTR, arg2:LPCWSTR, arg3:DWORD, arg4:LPDWORD, arg5:PVOID, arg6:LPDWORD) : LSTATUS;

external (stdcall) RegLoadMUIStringA(arg0:HKEY, arg1:LPCSTR, arg2:LPSTR, arg3:DWORD, arg4:LPDWORD, arg5:DWORD, arg6:LPCSTR) : LSTATUS;

external (stdcall) RegLoadMUIStringW(arg0:HKEY, arg1:LPCWSTR, arg2:LPWSTR, arg3:DWORD, arg4:LPDWORD, arg5:DWORD, arg6:LPCWSTR) : LSTATUS;

external (stdcall) RegLoadAppKeyA(arg0:LPCSTR, arg1:PHKEY, arg2:REGSAM, arg3:DWORD, arg4:DWORD) : LSTATUS;

external (stdcall) RegLoadAppKeyW(arg0:LPCWSTR, arg1:PHKEY, arg2:REGSAM, arg3:DWORD, arg4:DWORD) : LSTATUS;

external (stdcall) InitiateSystemShutdownA(arg0:LPSTR, arg1:LPSTR, arg2:DWORD, arg3:BOOL, arg4:BOOL) : BOOL;

external (stdcall) InitiateSystemShutdownW(arg0:LPWSTR, arg1:LPWSTR, arg2:DWORD, arg3:BOOL, arg4:BOOL) : BOOL;

external (stdcall) AbortSystemShutdownA(arg0:LPSTR) : BOOL;

external (stdcall) AbortSystemShutdownW(arg0:LPWSTR) : BOOL;

external (stdcall) InitiateSystemShutdownExA(arg0:LPSTR, arg1:LPSTR, arg2:DWORD, arg3:BOOL, arg4:BOOL, arg5:DWORD) : BOOL;

external (stdcall) InitiateSystemShutdownExW(arg0:LPWSTR, arg1:LPWSTR, arg2:DWORD, arg3:BOOL, arg4:BOOL, arg5:DWORD) : BOOL;

external (stdcall) InitiateShutdownA(arg0:LPSTR, arg1:LPSTR, arg2:DWORD, arg3:DWORD, arg4:DWORD) : DWORD;

external (stdcall) InitiateShutdownW(arg0:LPWSTR, arg1:LPWSTR, arg2:DWORD, arg3:DWORD, arg4:DWORD) : DWORD;

external (stdcall) RegSaveKeyExA(arg0:HKEY, arg1:LPCSTR, arg2:LPSECURITY_ATTRIBUTES, arg3:DWORD) : LSTATUS;

external (stdcall) RegSaveKeyExW(arg0:HKEY, arg1:LPCWSTR, arg2:LPSECURITY_ATTRIBUTES, arg3:DWORD) : LSTATUS;

record Struct__NETRESOURCEA (
    dwScope : DWORD,
    dwType : DWORD,
    dwDisplayType : DWORD,
    dwUsage : DWORD,
    lpLocalName : LPSTR,
    lpRemoteName : LPSTR,
    lpComment : LPSTR,
    lpProvider : LPSTR,
);

alias NETRESOURCEA = Struct__NETRESOURCEA;

alias LPNETRESOURCEA = Pointer[Struct__NETRESOURCEA];

record Struct__NETRESOURCEW (
    dwScope : DWORD,
    dwType : DWORD,
    dwDisplayType : DWORD,
    dwUsage : DWORD,
    lpLocalName : LPWSTR,
    lpRemoteName : LPWSTR,
    lpComment : LPWSTR,
    lpProvider : LPWSTR,
);

alias NETRESOURCEW = Struct__NETRESOURCEW;

alias LPNETRESOURCEW = Pointer[Struct__NETRESOURCEW];

alias NETRESOURCE = NETRESOURCEA;

alias LPNETRESOURCE = LPNETRESOURCEA;

external (stdcall) WNetAddConnectionA(arg0:LPCSTR, arg1:LPCSTR, arg2:LPCSTR) : DWORD;

external (stdcall) WNetAddConnectionW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:LPCWSTR) : DWORD;

external (stdcall) WNetAddConnection2A(arg0:LPNETRESOURCEA, arg1:LPCSTR, arg2:LPCSTR, arg3:DWORD) : DWORD;

external (stdcall) WNetAddConnection2W(arg0:LPNETRESOURCEW, arg1:LPCWSTR, arg2:LPCWSTR, arg3:DWORD) : DWORD;

external (stdcall) WNetAddConnection3A(arg0:HWND, arg1:LPNETRESOURCEA, arg2:LPCSTR, arg3:LPCSTR, arg4:DWORD) : DWORD;

external (stdcall) WNetAddConnection3W(arg0:HWND, arg1:LPNETRESOURCEW, arg2:LPCWSTR, arg3:LPCWSTR, arg4:DWORD) : DWORD;

external (stdcall) WNetCancelConnectionA(arg0:LPCSTR, arg1:BOOL) : DWORD;

external (stdcall) WNetCancelConnectionW(arg0:LPCWSTR, arg1:BOOL) : DWORD;

external (stdcall) WNetCancelConnection2A(arg0:LPCSTR, arg1:DWORD, arg2:BOOL) : DWORD;

external (stdcall) WNetCancelConnection2W(arg0:LPCWSTR, arg1:DWORD, arg2:BOOL) : DWORD;

external (stdcall) WNetGetConnectionA(arg0:LPCSTR, arg1:LPSTR, arg2:LPDWORD) : DWORD;

external (stdcall) WNetGetConnectionW(arg0:LPCWSTR, arg1:LPWSTR, arg2:LPDWORD) : DWORD;

external (stdcall) WNetRestoreSingleConnectionW(arg0:HWND, arg1:LPCWSTR, arg2:BOOL) : DWORD;

external (stdcall) WNetUseConnectionA(arg0:HWND, arg1:LPNETRESOURCEA, arg2:LPCSTR, arg3:LPCSTR, arg4:DWORD, arg5:LPSTR, arg6:LPDWORD, arg7:LPDWORD) : DWORD;

external (stdcall) WNetUseConnectionW(arg0:HWND, arg1:LPNETRESOURCEW, arg2:LPCWSTR, arg3:LPCWSTR, arg4:DWORD, arg5:LPWSTR, arg6:LPDWORD, arg7:LPDWORD) : DWORD;

external (stdcall) WNetConnectionDialog(arg0:HWND, arg1:DWORD) : DWORD;

external (stdcall) WNetDisconnectDialog(arg0:HWND, arg1:DWORD) : DWORD;

record Struct__CONNECTDLGSTRUCTA (
    cbStructure : DWORD,
    hwndOwner : HWND,
    lpConnRes : LPNETRESOURCEA,
    dwFlags : DWORD,
    dwDevNum : DWORD,
);

alias CONNECTDLGSTRUCTA = Struct__CONNECTDLGSTRUCTA;

alias LPCONNECTDLGSTRUCTA = Pointer[Struct__CONNECTDLGSTRUCTA];

record Struct__CONNECTDLGSTRUCTW (
    cbStructure : DWORD,
    hwndOwner : HWND,
    lpConnRes : LPNETRESOURCEW,
    dwFlags : DWORD,
    dwDevNum : DWORD,
);

alias CONNECTDLGSTRUCTW = Struct__CONNECTDLGSTRUCTW;

alias LPCONNECTDLGSTRUCTW = Pointer[Struct__CONNECTDLGSTRUCTW];

alias CONNECTDLGSTRUCT = CONNECTDLGSTRUCTA;

alias LPCONNECTDLGSTRUCT = LPCONNECTDLGSTRUCTA;

external (stdcall) WNetConnectionDialog1A(arg0:LPCONNECTDLGSTRUCTA) : DWORD;

external (stdcall) WNetConnectionDialog1W(arg0:LPCONNECTDLGSTRUCTW) : DWORD;

record Struct__DISCDLGSTRUCTA (
    cbStructure : DWORD,
    hwndOwner : HWND,
    lpLocalName : LPSTR,
    lpRemoteName : LPSTR,
    dwFlags : DWORD,
);

alias DISCDLGSTRUCTA = Struct__DISCDLGSTRUCTA;

alias LPDISCDLGSTRUCTA = Pointer[Struct__DISCDLGSTRUCTA];

record Struct__DISCDLGSTRUCTW (
    cbStructure : DWORD,
    hwndOwner : HWND,
    lpLocalName : LPWSTR,
    lpRemoteName : LPWSTR,
    dwFlags : DWORD,
);

alias DISCDLGSTRUCTW = Struct__DISCDLGSTRUCTW;

alias LPDISCDLGSTRUCTW = Pointer[Struct__DISCDLGSTRUCTW];

alias DISCDLGSTRUCT = DISCDLGSTRUCTA;

alias LPDISCDLGSTRUCT = LPDISCDLGSTRUCTA;

external (stdcall) WNetDisconnectDialog1A(arg0:LPDISCDLGSTRUCTA) : DWORD;

external (stdcall) WNetDisconnectDialog1W(arg0:LPDISCDLGSTRUCTW) : DWORD;

external (stdcall) WNetOpenEnumA(arg0:DWORD, arg1:DWORD, arg2:DWORD, arg3:LPNETRESOURCEA, arg4:LPHANDLE) : DWORD;

external (stdcall) WNetOpenEnumW(arg0:DWORD, arg1:DWORD, arg2:DWORD, arg3:LPNETRESOURCEW, arg4:LPHANDLE) : DWORD;

external (stdcall) WNetEnumResourceA(arg0:HANDLE, arg1:LPDWORD, arg2:LPVOID, arg3:LPDWORD) : DWORD;

external (stdcall) WNetEnumResourceW(arg0:HANDLE, arg1:LPDWORD, arg2:LPVOID, arg3:LPDWORD) : DWORD;

external (stdcall) WNetCloseEnum(arg0:HANDLE) : DWORD;

external (stdcall) WNetGetResourceParentA(arg0:LPNETRESOURCEA, arg1:LPVOID, arg2:LPDWORD) : DWORD;

external (stdcall) WNetGetResourceParentW(arg0:LPNETRESOURCEW, arg1:LPVOID, arg2:LPDWORD) : DWORD;

external (stdcall) WNetGetResourceInformationA(arg0:LPNETRESOURCEA, arg1:LPVOID, arg2:LPDWORD, arg3:Pointer[LPSTR]) : DWORD;

external (stdcall) WNetGetResourceInformationW(arg0:LPNETRESOURCEW, arg1:LPVOID, arg2:LPDWORD, arg3:Pointer[LPWSTR]) : DWORD;

record Struct__UNIVERSAL_NAME_INFOA (
    lpUniversalName : LPSTR,
);

alias UNIVERSAL_NAME_INFOA = Struct__UNIVERSAL_NAME_INFOA;

alias LPUNIVERSAL_NAME_INFOA = Pointer[Struct__UNIVERSAL_NAME_INFOA];

record Struct__UNIVERSAL_NAME_INFOW (
    lpUniversalName : LPWSTR,
);

alias UNIVERSAL_NAME_INFOW = Struct__UNIVERSAL_NAME_INFOW;

alias LPUNIVERSAL_NAME_INFOW = Pointer[Struct__UNIVERSAL_NAME_INFOW];

alias UNIVERSAL_NAME_INFO = UNIVERSAL_NAME_INFOA;

alias LPUNIVERSAL_NAME_INFO = LPUNIVERSAL_NAME_INFOA;

record Struct__REMOTE_NAME_INFOA (
    lpUniversalName : LPSTR,
    lpConnectionName : LPSTR,
    lpRemainingPath : LPSTR,
);

alias REMOTE_NAME_INFOA = Struct__REMOTE_NAME_INFOA;

alias LPREMOTE_NAME_INFOA = Pointer[Struct__REMOTE_NAME_INFOA];

record Struct__REMOTE_NAME_INFOW (
    lpUniversalName : LPWSTR,
    lpConnectionName : LPWSTR,
    lpRemainingPath : LPWSTR,
);

alias REMOTE_NAME_INFOW = Struct__REMOTE_NAME_INFOW;

alias LPREMOTE_NAME_INFOW = Pointer[Struct__REMOTE_NAME_INFOW];

alias REMOTE_NAME_INFO = REMOTE_NAME_INFOA;

alias LPREMOTE_NAME_INFO = LPREMOTE_NAME_INFOA;

external (stdcall) WNetGetUniversalNameA(arg0:LPCSTR, arg1:DWORD, arg2:LPVOID, arg3:LPDWORD) : DWORD;

external (stdcall) WNetGetUniversalNameW(arg0:LPCWSTR, arg1:DWORD, arg2:LPVOID, arg3:LPDWORD) : DWORD;

external (stdcall) WNetGetUserA(arg0:LPCSTR, arg1:LPSTR, arg2:LPDWORD) : DWORD;

external (stdcall) WNetGetUserW(arg0:LPCWSTR, arg1:LPWSTR, arg2:LPDWORD) : DWORD;

external (stdcall) WNetGetProviderNameA(arg0:DWORD, arg1:LPSTR, arg2:LPDWORD) : DWORD;

external (stdcall) WNetGetProviderNameW(arg0:DWORD, arg1:LPWSTR, arg2:LPDWORD) : DWORD;

record Struct__NETINFOSTRUCT (
    cbStructure : DWORD,
    dwProviderVersion : DWORD,
    dwStatus : DWORD,
    dwCharacteristics : DWORD,
    dwHandle : ULONG_PTR,
    wNetType : WORD,
    dwPrinters : DWORD,
    dwDrives : DWORD,
);

alias NETINFOSTRUCT = Struct__NETINFOSTRUCT;

alias LPNETINFOSTRUCT = Pointer[Struct__NETINFOSTRUCT];

external (stdcall) WNetGetNetworkInformationA(arg0:LPCSTR, arg1:LPNETINFOSTRUCT) : DWORD;

external (stdcall) WNetGetNetworkInformationW(arg0:LPCWSTR, arg1:LPNETINFOSTRUCT) : DWORD;

external (stdcall) WNetGetLastErrorA(arg0:LPDWORD, arg1:LPSTR, arg2:DWORD, arg3:LPSTR, arg4:DWORD) : DWORD;

external (stdcall) WNetGetLastErrorW(arg0:LPDWORD, arg1:LPWSTR, arg2:DWORD, arg3:LPWSTR, arg4:DWORD) : DWORD;

record Struct__NETCONNECTINFOSTRUCT (
    cbStructure : DWORD,
    dwFlags : DWORD,
    dwSpeed : DWORD,
    dwDelay : DWORD,
    dwOptDataSize : DWORD,
);

alias NETCONNECTINFOSTRUCT = Struct__NETCONNECTINFOSTRUCT;

alias LPNETCONNECTINFOSTRUCT = Pointer[Struct__NETCONNECTINFOSTRUCT];

external (stdcall) MultinetGetConnectionPerformanceA(arg0:LPNETRESOURCEA, arg1:LPNETCONNECTINFOSTRUCT) : DWORD;

external (stdcall) MultinetGetConnectionPerformanceW(arg0:LPNETRESOURCEW, arg1:LPNETCONNECTINFOSTRUCT) : DWORD;

external (cdecl) ua_wcscpy(arg0:PUWSTR, arg1:PCUWSTR) : PUWSTR;

external NETWORK_MANAGER_FIRST_IP_ADDRESS_ARRIVAL_GUID : GUID;

external NETWORK_MANAGER_LAST_IP_ADDRESS_REMOVAL_GUID : GUID;

external DOMAIN_JOIN_GUID : GUID;

external DOMAIN_LEAVE_GUID : GUID;

external FIREWALL_PORT_OPEN_GUID : GUID;

external FIREWALL_PORT_CLOSE_GUID : GUID;

external MACHINE_POLICY_PRESENT_GUID : GUID;

external USER_POLICY_PRESENT_GUID : GUID;

record Struct__SERVICE_DESCRIPTIONA (
    lpDescription : LPSTR,
);

alias SERVICE_DESCRIPTIONA = Struct__SERVICE_DESCRIPTIONA;

alias LPSERVICE_DESCRIPTIONA = Pointer[Struct__SERVICE_DESCRIPTIONA];

record Struct__SERVICE_DESCRIPTIONW (
    lpDescription : LPWSTR,
);

alias SERVICE_DESCRIPTIONW = Struct__SERVICE_DESCRIPTIONW;

alias LPSERVICE_DESCRIPTIONW = Pointer[Struct__SERVICE_DESCRIPTIONW];

alias SERVICE_DESCRIPTION = SERVICE_DESCRIPTIONA;

alias LPSERVICE_DESCRIPTION = LPSERVICE_DESCRIPTIONA;

alias Enum__SC_ACTION_TYPE = Int;
alias SC_ACTION_NONE = 0;
alias SC_ACTION_RESTART = 1;
alias SC_ACTION_REBOOT = 2;
alias SC_ACTION_RUN_COMMAND = 3;

alias SC_ACTION_TYPE = Enum__SC_ACTION_TYPE;

record Struct__SC_ACTION (
    Type : SC_ACTION_TYPE,
    Delay : DWORD,
);

alias SC_ACTION = Struct__SC_ACTION;

alias LPSC_ACTION = Pointer[Struct__SC_ACTION];

record Struct__SERVICE_FAILURE_ACTIONSA (
    dwResetPeriod : DWORD,
    lpRebootMsg : LPSTR,
    lpCommand : LPSTR,
    cActions : DWORD,
    lpsaActions : Pointer[SC_ACTION],
);

alias SERVICE_FAILURE_ACTIONSA = Struct__SERVICE_FAILURE_ACTIONSA;

alias LPSERVICE_FAILURE_ACTIONSA = Pointer[Struct__SERVICE_FAILURE_ACTIONSA];

record Struct__SERVICE_FAILURE_ACTIONSW (
    dwResetPeriod : DWORD,
    lpRebootMsg : LPWSTR,
    lpCommand : LPWSTR,
    cActions : DWORD,
    lpsaActions : Pointer[SC_ACTION],
);

alias SERVICE_FAILURE_ACTIONSW = Struct__SERVICE_FAILURE_ACTIONSW;

alias LPSERVICE_FAILURE_ACTIONSW = Pointer[Struct__SERVICE_FAILURE_ACTIONSW];

alias SERVICE_FAILURE_ACTIONS = SERVICE_FAILURE_ACTIONSA;

alias LPSERVICE_FAILURE_ACTIONS = LPSERVICE_FAILURE_ACTIONSA;

record Struct__SERVICE_DELAYED_AUTO_START_INFO (
    fDelayedAutostart : BOOL,
);

alias SERVICE_DELAYED_AUTO_START_INFO = Struct__SERVICE_DELAYED_AUTO_START_INFO;

alias LPSERVICE_DELAYED_AUTO_START_INFO = Pointer[Struct__SERVICE_DELAYED_AUTO_START_INFO];

record Struct__SERVICE_FAILURE_ACTIONS_FLAG (
    fFailureActionsOnNonCrashFailures : BOOL,
);

alias SERVICE_FAILURE_ACTIONS_FLAG = Struct__SERVICE_FAILURE_ACTIONS_FLAG;

alias LPSERVICE_FAILURE_ACTIONS_FLAG = Pointer[Struct__SERVICE_FAILURE_ACTIONS_FLAG];

record Struct__SERVICE_SID_INFO (
    dwServiceSidType : DWORD,
);

alias SERVICE_SID_INFO = Struct__SERVICE_SID_INFO;

alias LPSERVICE_SID_INFO = Pointer[Struct__SERVICE_SID_INFO];

record Struct__SERVICE_REQUIRED_PRIVILEGES_INFOA (
    pmszRequiredPrivileges : LPSTR,
);

alias SERVICE_REQUIRED_PRIVILEGES_INFOA = Struct__SERVICE_REQUIRED_PRIVILEGES_INFOA;

alias LPSERVICE_REQUIRED_PRIVILEGES_INFOA = Pointer[Struct__SERVICE_REQUIRED_PRIVILEGES_INFOA];

record Struct__SERVICE_REQUIRED_PRIVILEGES_INFOW (
    pmszRequiredPrivileges : LPWSTR,
);

alias SERVICE_REQUIRED_PRIVILEGES_INFOW = Struct__SERVICE_REQUIRED_PRIVILEGES_INFOW;

alias LPSERVICE_REQUIRED_PRIVILEGES_INFOW = Pointer[Struct__SERVICE_REQUIRED_PRIVILEGES_INFOW];

alias SERVICE_REQUIRED_PRIVILEGES_INFO = SERVICE_REQUIRED_PRIVILEGES_INFOA;

alias LPSERVICE_REQUIRED_PRIVILEGES_INFO = LPSERVICE_REQUIRED_PRIVILEGES_INFOA;

record Struct__SERVICE_PRESHUTDOWN_INFO (
    dwPreshutdownTimeout : DWORD,
);

alias SERVICE_PRESHUTDOWN_INFO = Struct__SERVICE_PRESHUTDOWN_INFO;

alias LPSERVICE_PRESHUTDOWN_INFO = Pointer[Struct__SERVICE_PRESHUTDOWN_INFO];

record Struct__SERVICE_TRIGGER_SPECIFIC_DATA_ITEM (
    dwDataType : DWORD,
    cbData : DWORD,
    pData : PBYTE,
);

alias SERVICE_TRIGGER_SPECIFIC_DATA_ITEM = Struct__SERVICE_TRIGGER_SPECIFIC_DATA_ITEM;

alias PSERVICE_TRIGGER_SPECIFIC_DATA_ITEM = Pointer[Struct__SERVICE_TRIGGER_SPECIFIC_DATA_ITEM];

record Struct__SERVICE_TRIGGER (
    dwTriggerType : DWORD,
    dwAction : DWORD,
    pTriggerSubtype : Pointer[GUID],
    cDataItems : DWORD,
    pDataItems : PSERVICE_TRIGGER_SPECIFIC_DATA_ITEM,
);

alias SERVICE_TRIGGER = Struct__SERVICE_TRIGGER;

alias PSERVICE_TRIGGER = Pointer[Struct__SERVICE_TRIGGER];

record Struct__SERVICE_TRIGGER_INFO (
    cTriggers : DWORD,
    pTriggers : PSERVICE_TRIGGER,
    pReserved : PBYTE,
);

alias SERVICE_TRIGGER_INFO = Struct__SERVICE_TRIGGER_INFO;

alias PSERVICE_TRIGGER_INFO = Pointer[Struct__SERVICE_TRIGGER_INFO];

record Struct__SERVICE_PREFERRED_NODE_INFO (
    usPreferredNode : USHORT,
    fDelete : BOOLEAN,
);

alias SERVICE_PREFERRED_NODE_INFO = Struct__SERVICE_PREFERRED_NODE_INFO;

alias LPSERVICE_PREFERRED_NODE_INFO = Pointer[Struct__SERVICE_PREFERRED_NODE_INFO];

record Struct__SERVICE_TIMECHANGE_INFO (
    liNewTime : LARGE_INTEGER,
    liOldTime : LARGE_INTEGER,
);

alias SERVICE_TIMECHANGE_INFO = Struct__SERVICE_TIMECHANGE_INFO;

alias PSERVICE_TIMECHANGE_INFO = Pointer[Struct__SERVICE_TIMECHANGE_INFO];

record Struct_SC_HANDLE__ (
    unused : Int,
);

alias SC_HANDLE = Pointer[Struct_SC_HANDLE__];

alias LPSC_HANDLE = Pointer[SC_HANDLE];

record Struct_SERVICE_STATUS_HANDLE__ (
    unused : Int,
);

alias SERVICE_STATUS_HANDLE = Pointer[Struct_SERVICE_STATUS_HANDLE__];

alias Enum__SC_STATUS_TYPE = Int;
alias SC_STATUS_PROCESS_INFO = 0;

alias SC_STATUS_TYPE = Enum__SC_STATUS_TYPE;

alias Enum__SC_ENUM_TYPE = Int;
alias SC_ENUM_PROCESS_INFO = 0;

alias SC_ENUM_TYPE = Enum__SC_ENUM_TYPE;

record Struct__SERVICE_STATUS (
    dwServiceType : DWORD,
    dwCurrentState : DWORD,
    dwControlsAccepted : DWORD,
    dwWin32ExitCode : DWORD,
    dwServiceSpecificExitCode : DWORD,
    dwCheckPoint : DWORD,
    dwWaitHint : DWORD,
);

alias SERVICE_STATUS = Struct__SERVICE_STATUS;

alias LPSERVICE_STATUS = Pointer[Struct__SERVICE_STATUS];

record Struct__SERVICE_STATUS_PROCESS (
    dwServiceType : DWORD,
    dwCurrentState : DWORD,
    dwControlsAccepted : DWORD,
    dwWin32ExitCode : DWORD,
    dwServiceSpecificExitCode : DWORD,
    dwCheckPoint : DWORD,
    dwWaitHint : DWORD,
    dwProcessId : DWORD,
    dwServiceFlags : DWORD,
);

alias SERVICE_STATUS_PROCESS = Struct__SERVICE_STATUS_PROCESS;

alias LPSERVICE_STATUS_PROCESS = Pointer[Struct__SERVICE_STATUS_PROCESS];

record Struct__ENUM_SERVICE_STATUSA (
    lpServiceName : LPSTR,
    lpDisplayName : LPSTR,
    ServiceStatus : SERVICE_STATUS,
);

alias ENUM_SERVICE_STATUSA = Struct__ENUM_SERVICE_STATUSA;

alias LPENUM_SERVICE_STATUSA = Pointer[Struct__ENUM_SERVICE_STATUSA];

record Struct__ENUM_SERVICE_STATUSW (
    lpServiceName : LPWSTR,
    lpDisplayName : LPWSTR,
    ServiceStatus : SERVICE_STATUS,
);

alias ENUM_SERVICE_STATUSW = Struct__ENUM_SERVICE_STATUSW;

alias LPENUM_SERVICE_STATUSW = Pointer[Struct__ENUM_SERVICE_STATUSW];

alias ENUM_SERVICE_STATUS = ENUM_SERVICE_STATUSA;

alias LPENUM_SERVICE_STATUS = LPENUM_SERVICE_STATUSA;

record Struct__ENUM_SERVICE_STATUS_PROCESSA (
    lpServiceName : LPSTR,
    lpDisplayName : LPSTR,
    ServiceStatusProcess : SERVICE_STATUS_PROCESS,
);

alias ENUM_SERVICE_STATUS_PROCESSA = Struct__ENUM_SERVICE_STATUS_PROCESSA;

alias LPENUM_SERVICE_STATUS_PROCESSA = Pointer[Struct__ENUM_SERVICE_STATUS_PROCESSA];

record Struct__ENUM_SERVICE_STATUS_PROCESSW (
    lpServiceName : LPWSTR,
    lpDisplayName : LPWSTR,
    ServiceStatusProcess : SERVICE_STATUS_PROCESS,
);

alias ENUM_SERVICE_STATUS_PROCESSW = Struct__ENUM_SERVICE_STATUS_PROCESSW;

alias LPENUM_SERVICE_STATUS_PROCESSW = Pointer[Struct__ENUM_SERVICE_STATUS_PROCESSW];

alias ENUM_SERVICE_STATUS_PROCESS = ENUM_SERVICE_STATUS_PROCESSA;

alias LPENUM_SERVICE_STATUS_PROCESS = LPENUM_SERVICE_STATUS_PROCESSA;

alias SC_LOCK = LPVOID;

record Struct__QUERY_SERVICE_LOCK_STATUSA (
    fIsLocked : DWORD,
    lpLockOwner : LPSTR,
    dwLockDuration : DWORD,
);

alias QUERY_SERVICE_LOCK_STATUSA = Struct__QUERY_SERVICE_LOCK_STATUSA;

alias LPQUERY_SERVICE_LOCK_STATUSA = Pointer[Struct__QUERY_SERVICE_LOCK_STATUSA];

record Struct__QUERY_SERVICE_LOCK_STATUSW (
    fIsLocked : DWORD,
    lpLockOwner : LPWSTR,
    dwLockDuration : DWORD,
);

alias QUERY_SERVICE_LOCK_STATUSW = Struct__QUERY_SERVICE_LOCK_STATUSW;

alias LPQUERY_SERVICE_LOCK_STATUSW = Pointer[Struct__QUERY_SERVICE_LOCK_STATUSW];

alias QUERY_SERVICE_LOCK_STATUS = QUERY_SERVICE_LOCK_STATUSA;

alias LPQUERY_SERVICE_LOCK_STATUS = LPQUERY_SERVICE_LOCK_STATUSA;

record Struct__QUERY_SERVICE_CONFIGA (
    dwServiceType : DWORD,
    dwStartType : DWORD,
    dwErrorControl : DWORD,
    lpBinaryPathName : LPSTR,
    lpLoadOrderGroup : LPSTR,
    dwTagId : DWORD,
    lpDependencies : LPSTR,
    lpServiceStartName : LPSTR,
    lpDisplayName : LPSTR,
);

alias QUERY_SERVICE_CONFIGA = Struct__QUERY_SERVICE_CONFIGA;

alias LPQUERY_SERVICE_CONFIGA = Pointer[Struct__QUERY_SERVICE_CONFIGA];

record Struct__QUERY_SERVICE_CONFIGW (
    dwServiceType : DWORD,
    dwStartType : DWORD,
    dwErrorControl : DWORD,
    lpBinaryPathName : LPWSTR,
    lpLoadOrderGroup : LPWSTR,
    dwTagId : DWORD,
    lpDependencies : LPWSTR,
    lpServiceStartName : LPWSTR,
    lpDisplayName : LPWSTR,
);

alias QUERY_SERVICE_CONFIGW = Struct__QUERY_SERVICE_CONFIGW;

alias LPQUERY_SERVICE_CONFIGW = Pointer[Struct__QUERY_SERVICE_CONFIGW];

alias QUERY_SERVICE_CONFIG = QUERY_SERVICE_CONFIGA;

alias LPQUERY_SERVICE_CONFIG = LPQUERY_SERVICE_CONFIGA;

alias LPSERVICE_MAIN_FUNCTIONW = StdCallCodePointer[[DWORD, Pointer[LPWSTR]],[]];

alias LPSERVICE_MAIN_FUNCTIONA = StdCallCodePointer[[DWORD, Pointer[LPSTR]],[]];

record Struct__SERVICE_TABLE_ENTRYA (
    lpServiceName : LPSTR,
    lpServiceProc : LPSERVICE_MAIN_FUNCTIONA,
);

alias SERVICE_TABLE_ENTRYA = Struct__SERVICE_TABLE_ENTRYA;

alias LPSERVICE_TABLE_ENTRYA = Pointer[Struct__SERVICE_TABLE_ENTRYA];

record Struct__SERVICE_TABLE_ENTRYW (
    lpServiceName : LPWSTR,
    lpServiceProc : LPSERVICE_MAIN_FUNCTIONW,
);

alias SERVICE_TABLE_ENTRYW = Struct__SERVICE_TABLE_ENTRYW;

alias LPSERVICE_TABLE_ENTRYW = Pointer[Struct__SERVICE_TABLE_ENTRYW];

alias SERVICE_TABLE_ENTRY = SERVICE_TABLE_ENTRYA;

alias LPSERVICE_TABLE_ENTRY = LPSERVICE_TABLE_ENTRYA;

alias LPHANDLER_FUNCTION = StdCallCodePointer[[DWORD],[]];

alias LPHANDLER_FUNCTION_EX = StdCallCodePointer[[DWORD, DWORD, LPVOID, LPVOID],[DWORD]];

alias PFN_SC_NOTIFY_CALLBACK = StdCallCodePointer[[PVOID],[]];

record Struct__SERVICE_NOTIFY_1 (
    dwVersion : DWORD,
    pfnNotifyCallback : PFN_SC_NOTIFY_CALLBACK,
    pContext : PVOID,
    dwNotificationStatus : DWORD,
    ServiceStatus : SERVICE_STATUS_PROCESS,
);

alias SERVICE_NOTIFY_1 = Struct__SERVICE_NOTIFY_1;

alias PSERVICE_NOTIFY_1 = Pointer[Struct__SERVICE_NOTIFY_1];

record Struct__SERVICE_NOTIFY_2A (
    dwVersion : DWORD,
    pfnNotifyCallback : PFN_SC_NOTIFY_CALLBACK,
    pContext : PVOID,
    dwNotificationStatus : DWORD,
    ServiceStatus : SERVICE_STATUS_PROCESS,
    dwNotificationTriggered : DWORD,
    pszServiceNames : LPSTR,
);

alias SERVICE_NOTIFY_2A = Struct__SERVICE_NOTIFY_2A;

alias PSERVICE_NOTIFY_2A = Pointer[Struct__SERVICE_NOTIFY_2A];

record Struct__SERVICE_NOTIFY_2W (
    dwVersion : DWORD,
    pfnNotifyCallback : PFN_SC_NOTIFY_CALLBACK,
    pContext : PVOID,
    dwNotificationStatus : DWORD,
    ServiceStatus : SERVICE_STATUS_PROCESS,
    dwNotificationTriggered : DWORD,
    pszServiceNames : LPWSTR,
);

alias SERVICE_NOTIFY_2W = Struct__SERVICE_NOTIFY_2W;

alias PSERVICE_NOTIFY_2W = Pointer[Struct__SERVICE_NOTIFY_2W];

alias SERVICE_NOTIFY_2 = SERVICE_NOTIFY_2A;

alias PSERVICE_NOTIFY_2 = PSERVICE_NOTIFY_2A;

alias SERVICE_NOTIFYA = SERVICE_NOTIFY_2A;

alias PSERVICE_NOTIFYA = Pointer[SERVICE_NOTIFY_2A];

alias SERVICE_NOTIFYW = SERVICE_NOTIFY_2W;

alias PSERVICE_NOTIFYW = Pointer[SERVICE_NOTIFY_2W];

alias SERVICE_NOTIFY = SERVICE_NOTIFYA;

alias PSERVICE_NOTIFY = PSERVICE_NOTIFYA;

record Struct__SERVICE_CONTROL_STATUS_REASON_PARAMSA (
    dwReason : DWORD,
    pszComment : LPSTR,
    ServiceStatus : SERVICE_STATUS_PROCESS,
);

alias SERVICE_CONTROL_STATUS_REASON_PARAMSA = Struct__SERVICE_CONTROL_STATUS_REASON_PARAMSA;

alias PSERVICE_CONTROL_STATUS_REASON_PARAMSA = Pointer[Struct__SERVICE_CONTROL_STATUS_REASON_PARAMSA];

record Struct__SERVICE_CONTROL_STATUS_REASON_PARAMSW (
    dwReason : DWORD,
    pszComment : LPWSTR,
    ServiceStatus : SERVICE_STATUS_PROCESS,
);

alias SERVICE_CONTROL_STATUS_REASON_PARAMSW = Struct__SERVICE_CONTROL_STATUS_REASON_PARAMSW;

alias PSERVICE_CONTROL_STATUS_REASON_PARAMSW = Pointer[Struct__SERVICE_CONTROL_STATUS_REASON_PARAMSW];

alias SERVICE_CONTROL_STATUS_REASON_PARAMS = SERVICE_CONTROL_STATUS_REASON_PARAMSA;

alias PSERVICE_CONTROL_STATUS_REASON_PARAMS = PSERVICE_CONTROL_STATUS_REASON_PARAMSA;

external (stdcall) ChangeServiceConfigA(arg0:SC_HANDLE, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:LPCSTR, arg5:LPCSTR, arg6:LPDWORD, arg7:LPCSTR, arg8:LPCSTR, arg9:LPCSTR, arg10:LPCSTR) : BOOL;

external (stdcall) ChangeServiceConfigW(arg0:SC_HANDLE, arg1:DWORD, arg2:DWORD, arg3:DWORD, arg4:LPCWSTR, arg5:LPCWSTR, arg6:LPDWORD, arg7:LPCWSTR, arg8:LPCWSTR, arg9:LPCWSTR, arg10:LPCWSTR) : BOOL;

external (stdcall) ChangeServiceConfig2A(arg0:SC_HANDLE, arg1:DWORD, arg2:LPVOID) : BOOL;

external (stdcall) ChangeServiceConfig2W(arg0:SC_HANDLE, arg1:DWORD, arg2:LPVOID) : BOOL;

external (stdcall) CloseServiceHandle(arg0:SC_HANDLE) : BOOL;

external (stdcall) ControlService(arg0:SC_HANDLE, arg1:DWORD, arg2:LPSERVICE_STATUS) : BOOL;

external (stdcall) CreateServiceA(arg0:SC_HANDLE, arg1:LPCSTR, arg2:LPCSTR, arg3:DWORD, arg4:DWORD, arg5:DWORD, arg6:DWORD, arg7:LPCSTR, arg8:LPCSTR, arg9:LPDWORD, arg10:LPCSTR, arg11:LPCSTR, arg12:LPCSTR) : SC_HANDLE;

external (stdcall) CreateServiceW(arg0:SC_HANDLE, arg1:LPCWSTR, arg2:LPCWSTR, arg3:DWORD, arg4:DWORD, arg5:DWORD, arg6:DWORD, arg7:LPCWSTR, arg8:LPCWSTR, arg9:LPDWORD, arg10:LPCWSTR, arg11:LPCWSTR, arg12:LPCWSTR) : SC_HANDLE;

external (stdcall) DeleteService(arg0:SC_HANDLE) : BOOL;

external (stdcall) EnumDependentServicesA(arg0:SC_HANDLE, arg1:DWORD, arg2:LPENUM_SERVICE_STATUSA, arg3:DWORD, arg4:LPDWORD, arg5:LPDWORD) : BOOL;

external (stdcall) EnumDependentServicesW(arg0:SC_HANDLE, arg1:DWORD, arg2:LPENUM_SERVICE_STATUSW, arg3:DWORD, arg4:LPDWORD, arg5:LPDWORD) : BOOL;

external (stdcall) EnumServicesStatusA(arg0:SC_HANDLE, arg1:DWORD, arg2:DWORD, arg3:LPENUM_SERVICE_STATUSA, arg4:DWORD, arg5:LPDWORD, arg6:LPDWORD, arg7:LPDWORD) : BOOL;

external (stdcall) EnumServicesStatusW(arg0:SC_HANDLE, arg1:DWORD, arg2:DWORD, arg3:LPENUM_SERVICE_STATUSW, arg4:DWORD, arg5:LPDWORD, arg6:LPDWORD, arg7:LPDWORD) : BOOL;

external (stdcall) EnumServicesStatusExA(arg0:SC_HANDLE, arg1:SC_ENUM_TYPE, arg2:DWORD, arg3:DWORD, arg4:LPBYTE, arg5:DWORD, arg6:LPDWORD, arg7:LPDWORD, arg8:LPDWORD, arg9:LPCSTR) : BOOL;

external (stdcall) EnumServicesStatusExW(arg0:SC_HANDLE, arg1:SC_ENUM_TYPE, arg2:DWORD, arg3:DWORD, arg4:LPBYTE, arg5:DWORD, arg6:LPDWORD, arg7:LPDWORD, arg8:LPDWORD, arg9:LPCWSTR) : BOOL;

external (stdcall) GetServiceKeyNameA(arg0:SC_HANDLE, arg1:LPCSTR, arg2:LPSTR, arg3:LPDWORD) : BOOL;

external (stdcall) GetServiceKeyNameW(arg0:SC_HANDLE, arg1:LPCWSTR, arg2:LPWSTR, arg3:LPDWORD) : BOOL;

external (stdcall) GetServiceDisplayNameA(arg0:SC_HANDLE, arg1:LPCSTR, arg2:LPSTR, arg3:LPDWORD) : BOOL;

external (stdcall) GetServiceDisplayNameW(arg0:SC_HANDLE, arg1:LPCWSTR, arg2:LPWSTR, arg3:LPDWORD) : BOOL;

external (stdcall) LockServiceDatabase(arg0:SC_HANDLE) : SC_LOCK;

external (stdcall) NotifyBootConfigStatus(arg0:BOOL) : BOOL;

external (stdcall) OpenSCManagerA(arg0:LPCSTR, arg1:LPCSTR, arg2:DWORD) : SC_HANDLE;

external (stdcall) OpenSCManagerW(arg0:LPCWSTR, arg1:LPCWSTR, arg2:DWORD) : SC_HANDLE;

external (stdcall) OpenServiceA(arg0:SC_HANDLE, arg1:LPCSTR, arg2:DWORD) : SC_HANDLE;

external (stdcall) OpenServiceW(arg0:SC_HANDLE, arg1:LPCWSTR, arg2:DWORD) : SC_HANDLE;

external (stdcall) QueryServiceConfigA(arg0:SC_HANDLE, arg1:LPQUERY_SERVICE_CONFIGA, arg2:DWORD, arg3:LPDWORD) : BOOL;

external (stdcall) QueryServiceConfigW(arg0:SC_HANDLE, arg1:LPQUERY_SERVICE_CONFIGW, arg2:DWORD, arg3:LPDWORD) : BOOL;

external (stdcall) QueryServiceConfig2A(arg0:SC_HANDLE, arg1:DWORD, arg2:LPBYTE, arg3:DWORD, arg4:LPDWORD) : BOOL;

external (stdcall) QueryServiceConfig2W(arg0:SC_HANDLE, arg1:DWORD, arg2:LPBYTE, arg3:DWORD, arg4:LPDWORD) : BOOL;

external (stdcall) QueryServiceLockStatusA(arg0:SC_HANDLE, arg1:LPQUERY_SERVICE_LOCK_STATUSA, arg2:DWORD, arg3:LPDWORD) : BOOL;

external (stdcall) QueryServiceLockStatusW(arg0:SC_HANDLE, arg1:LPQUERY_SERVICE_LOCK_STATUSW, arg2:DWORD, arg3:LPDWORD) : BOOL;

external (stdcall) QueryServiceObjectSecurity(arg0:SC_HANDLE, arg1:SECURITY_INFORMATION, arg2:PSECURITY_DESCRIPTOR, arg3:DWORD, arg4:LPDWORD) : BOOL;

external (stdcall) QueryServiceStatus(arg0:SC_HANDLE, arg1:LPSERVICE_STATUS) : BOOL;

external (stdcall) QueryServiceStatusEx(arg0:SC_HANDLE, arg1:SC_STATUS_TYPE, arg2:LPBYTE, arg3:DWORD, arg4:LPDWORD) : BOOL;

external (stdcall) RegisterServiceCtrlHandlerA(arg0:LPCSTR, arg1:LPHANDLER_FUNCTION) : SERVICE_STATUS_HANDLE;

external (stdcall) RegisterServiceCtrlHandlerW(arg0:LPCWSTR, arg1:LPHANDLER_FUNCTION) : SERVICE_STATUS_HANDLE;

external (stdcall) RegisterServiceCtrlHandlerExA(arg0:LPCSTR, arg1:LPHANDLER_FUNCTION_EX, arg2:LPVOID) : SERVICE_STATUS_HANDLE;

external (stdcall) RegisterServiceCtrlHandlerExW(arg0:LPCWSTR, arg1:LPHANDLER_FUNCTION_EX, arg2:LPVOID) : SERVICE_STATUS_HANDLE;

external (stdcall) SetServiceObjectSecurity(arg0:SC_HANDLE, arg1:SECURITY_INFORMATION, arg2:PSECURITY_DESCRIPTOR) : BOOL;

external (stdcall) SetServiceStatus(arg0:SERVICE_STATUS_HANDLE, arg1:LPSERVICE_STATUS) : BOOL;

external (stdcall) StartServiceCtrlDispatcherA(arg0:Pointer[SERVICE_TABLE_ENTRYA]) : BOOL;

external (stdcall) StartServiceCtrlDispatcherW(arg0:Pointer[SERVICE_TABLE_ENTRYW]) : BOOL;

external (stdcall) StartServiceA(arg0:SC_HANDLE, arg1:DWORD, arg2:Pointer[LPCSTR]) : BOOL;

external (stdcall) StartServiceW(arg0:SC_HANDLE, arg1:DWORD, arg2:Pointer[LPCWSTR]) : BOOL;

external (stdcall) UnlockServiceDatabase(arg0:SC_LOCK) : BOOL;

external (stdcall) NotifyServiceStatusChangeA(arg0:SC_HANDLE, arg1:DWORD, arg2:PSERVICE_NOTIFYA) : DWORD;

external (stdcall) NotifyServiceStatusChangeW(arg0:SC_HANDLE, arg1:DWORD, arg2:PSERVICE_NOTIFYW) : DWORD;

external (stdcall) ControlServiceExA(arg0:SC_HANDLE, arg1:DWORD, arg2:DWORD, arg3:PVOID) : BOOL;

external (stdcall) ControlServiceExW(arg0:SC_HANDLE, arg1:DWORD, arg2:DWORD, arg3:PVOID) : BOOL;

record Struct__MODEMDEVCAPS (
    dwActualSize : DWORD,
    dwRequiredSize : DWORD,
    dwDevSpecificOffset : DWORD,
    dwDevSpecificSize : DWORD,
    dwModemProviderVersion : DWORD,
    dwModemManufacturerOffset : DWORD,
    dwModemManufacturerSize : DWORD,
    dwModemModelOffset : DWORD,
    dwModemModelSize : DWORD,
    dwModemVersionOffset : DWORD,
    dwModemVersionSize : DWORD,
    dwDialOptions : DWORD,
    dwCallSetupFailTimer : DWORD,
    dwInactivityTimeout : DWORD,
    dwSpeakerVolume : DWORD,
    dwSpeakerMode : DWORD,
    dwModemOptions : DWORD,
    dwMaxDTERate : DWORD,
    dwMaxDCERate : DWORD,
    abVariablePortion : Array[BYTE, 1],
);

alias MODEMDEVCAPS = Struct__MODEMDEVCAPS;

alias PMODEMDEVCAPS = Pointer[Struct__MODEMDEVCAPS];

alias LPMODEMDEVCAPS = Pointer[Struct__MODEMDEVCAPS];

record Struct__MODEMSETTINGS (
    dwActualSize : DWORD,
    dwRequiredSize : DWORD,
    dwDevSpecificOffset : DWORD,
    dwDevSpecificSize : DWORD,
    dwCallSetupFailTimer : DWORD,
    dwInactivityTimeout : DWORD,
    dwSpeakerVolume : DWORD,
    dwSpeakerMode : DWORD,
    dwPreferredModemOptions : DWORD,
    dwNegotiatedModemOptions : DWORD,
    dwNegotiatedDCERate : DWORD,
    abVariablePortion : Array[BYTE, 1],
);

alias MODEMSETTINGS = Struct__MODEMSETTINGS;

alias PMODEMSETTINGS = Pointer[Struct__MODEMSETTINGS];

alias LPMODEMSETTINGS = Pointer[Struct__MODEMSETTINGS];

record Struct_HIMC__ (
    unused : Int,
);

alias HIMC = Pointer[Struct_HIMC__];

record Struct_HIMCC__ (
    unused : Int,
);

alias HIMCC = Pointer[Struct_HIMCC__];

alias LPHKL = Pointer[HKL];

alias LPUINT = Pointer[UINT];

record Struct_tagCOMPOSITIONFORM (
    dwStyle : DWORD,
    ptCurrentPos : POINT,
    rcArea : RECT,
);

alias COMPOSITIONFORM = Struct_tagCOMPOSITIONFORM;

alias PCOMPOSITIONFORM = Pointer[Struct_tagCOMPOSITIONFORM];

alias NPCOMPOSITIONFORM = Pointer[Struct_tagCOMPOSITIONFORM];

alias LPCOMPOSITIONFORM = Pointer[Struct_tagCOMPOSITIONFORM];

record Struct_tagCANDIDATEFORM (
    dwIndex : DWORD,
    dwStyle : DWORD,
    ptCurrentPos : POINT,
    rcArea : RECT,
);

alias CANDIDATEFORM = Struct_tagCANDIDATEFORM;

alias PCANDIDATEFORM = Pointer[Struct_tagCANDIDATEFORM];

alias NPCANDIDATEFORM = Pointer[Struct_tagCANDIDATEFORM];

alias LPCANDIDATEFORM = Pointer[Struct_tagCANDIDATEFORM];

record Struct_tagCANDIDATELIST (
    dwSize : DWORD,
    dwStyle : DWORD,
    dwCount : DWORD,
    dwSelection : DWORD,
    dwPageStart : DWORD,
    dwPageSize : DWORD,
    dwOffset : Array[DWORD, 1],
);

alias CANDIDATELIST = Struct_tagCANDIDATELIST;

alias PCANDIDATELIST = Pointer[Struct_tagCANDIDATELIST];

alias NPCANDIDATELIST = Pointer[Struct_tagCANDIDATELIST];

alias LPCANDIDATELIST = Pointer[Struct_tagCANDIDATELIST];

record Struct_tagREGISTERWORDA (
    lpReading : LPSTR,
    lpWord : LPSTR,
);

alias REGISTERWORDA = Struct_tagREGISTERWORDA;

alias PREGISTERWORDA = Pointer[Struct_tagREGISTERWORDA];

alias NPREGISTERWORDA = Pointer[Struct_tagREGISTERWORDA];

alias LPREGISTERWORDA = Pointer[Struct_tagREGISTERWORDA];

record Struct_tagREGISTERWORDW (
    lpReading : LPWSTR,
    lpWord : LPWSTR,
);

alias REGISTERWORDW = Struct_tagREGISTERWORDW;

alias PREGISTERWORDW = Pointer[Struct_tagREGISTERWORDW];

alias NPREGISTERWORDW = Pointer[Struct_tagREGISTERWORDW];

alias LPREGISTERWORDW = Pointer[Struct_tagREGISTERWORDW];

alias REGISTERWORD = REGISTERWORDA;

alias PREGISTERWORD = PREGISTERWORDA;

alias NPREGISTERWORD = NPREGISTERWORDA;

alias LPREGISTERWORD = LPREGISTERWORDA;

record Struct_tagRECONVERTSTRING (
    dwSize : DWORD,
    dwVersion : DWORD,
    dwStrLen : DWORD,
    dwStrOffset : DWORD,
    dwCompStrLen : DWORD,
    dwCompStrOffset : DWORD,
    dwTargetStrLen : DWORD,
    dwTargetStrOffset : DWORD,
);

alias RECONVERTSTRING = Struct_tagRECONVERTSTRING;

alias PRECONVERTSTRING = Pointer[Struct_tagRECONVERTSTRING];

alias NPRECONVERTSTRING = Pointer[Struct_tagRECONVERTSTRING];

alias LPRECONVERTSTRING = Pointer[Struct_tagRECONVERTSTRING];

record Struct_tagSTYLEBUFA (
    dwStyle : DWORD,
    szDescription : Array[CHAR, 32],
);

alias STYLEBUFA = Struct_tagSTYLEBUFA;

alias PSTYLEBUFA = Pointer[Struct_tagSTYLEBUFA];

alias NPSTYLEBUFA = Pointer[Struct_tagSTYLEBUFA];

alias LPSTYLEBUFA = Pointer[Struct_tagSTYLEBUFA];

record Struct_tagSTYLEBUFW (
    dwStyle : DWORD,
    szDescription : Array[WCHAR, 32],
);

alias STYLEBUFW = Struct_tagSTYLEBUFW;

alias PSTYLEBUFW = Pointer[Struct_tagSTYLEBUFW];

alias NPSTYLEBUFW = Pointer[Struct_tagSTYLEBUFW];

alias LPSTYLEBUFW = Pointer[Struct_tagSTYLEBUFW];

alias STYLEBUF = STYLEBUFA;

alias PSTYLEBUF = PSTYLEBUFA;

alias NPSTYLEBUF = NPSTYLEBUFA;

alias LPSTYLEBUF = LPSTYLEBUFA;

record Struct_tagIMEMENUITEMINFOA (
    cbSize : UINT,
    fType : UINT,
    fState : UINT,
    wID : UINT,
    hbmpChecked : HBITMAP,
    hbmpUnchecked : HBITMAP,
    dwItemData : DWORD,
    szString : Array[CHAR, 80],
    hbmpItem : HBITMAP,
);

alias IMEMENUITEMINFOA = Struct_tagIMEMENUITEMINFOA;

alias PIMEMENUITEMINFOA = Pointer[Struct_tagIMEMENUITEMINFOA];

alias NPIMEMENUITEMINFOA = Pointer[Struct_tagIMEMENUITEMINFOA];

alias LPIMEMENUITEMINFOA = Pointer[Struct_tagIMEMENUITEMINFOA];

record Struct_tagIMEMENUITEMINFOW (
    cbSize : UINT,
    fType : UINT,
    fState : UINT,
    wID : UINT,
    hbmpChecked : HBITMAP,
    hbmpUnchecked : HBITMAP,
    dwItemData : DWORD,
    szString : Array[WCHAR, 80],
    hbmpItem : HBITMAP,
);

alias IMEMENUITEMINFOW = Struct_tagIMEMENUITEMINFOW;

alias PIMEMENUITEMINFOW = Pointer[Struct_tagIMEMENUITEMINFOW];

alias NPIMEMENUITEMINFOW = Pointer[Struct_tagIMEMENUITEMINFOW];

alias LPIMEMENUITEMINFOW = Pointer[Struct_tagIMEMENUITEMINFOW];

alias IMEMENUITEMINFO = IMEMENUITEMINFOA;

alias PIMEMENUITEMINFO = PIMEMENUITEMINFOA;

alias NPIMEMENUITEMINFO = NPIMEMENUITEMINFOA;

alias LPIMEMENUITEMINFO = LPIMEMENUITEMINFOA;

record Struct_tagIMECHARPOSITION (
    dwSize : DWORD,
    dwCharPos : DWORD,
    pt : POINT,
    cLineHeight : UINT,
    rcDocument : RECT,
);

alias IMECHARPOSITION = Struct_tagIMECHARPOSITION;

alias PIMECHARPOSITION = Pointer[Struct_tagIMECHARPOSITION];

alias NPIMECHARPOSITION = Pointer[Struct_tagIMECHARPOSITION];

alias LPIMECHARPOSITION = Pointer[Struct_tagIMECHARPOSITION];

alias IMCENUMPROC = StdCallCodePointer[[HIMC, LPARAM],[BOOL]];

external (stdcall) ImmInstallIMEA(arg0:LPCSTR, arg1:LPCSTR) : HKL;

external (stdcall) ImmInstallIMEW(arg0:LPCWSTR, arg1:LPCWSTR) : HKL;

external (stdcall) ImmGetDefaultIMEWnd(arg0:HWND) : HWND;

external (stdcall) ImmGetDescriptionA(arg0:HKL, arg1:LPSTR, arg2:UINT) : UINT;

external (stdcall) ImmGetDescriptionW(arg0:HKL, arg1:LPWSTR, arg2:UINT) : UINT;

external (stdcall) ImmGetIMEFileNameA(arg0:HKL, arg1:LPSTR, arg2:UINT) : UINT;

external (stdcall) ImmGetIMEFileNameW(arg0:HKL, arg1:LPWSTR, arg2:UINT) : UINT;

external (stdcall) ImmGetProperty(arg0:HKL, arg1:DWORD) : DWORD;

external (stdcall) ImmIsIME(arg0:HKL) : BOOL;

external (stdcall) ImmSimulateHotKey(arg0:HWND, arg1:DWORD) : BOOL;

external (stdcall) ImmCreateContext() : HIMC;

external (stdcall) ImmDestroyContext(arg0:HIMC) : BOOL;

external (stdcall) ImmGetContext(arg0:HWND) : HIMC;

external (stdcall) ImmReleaseContext(arg0:HWND, arg1:HIMC) : BOOL;

external (stdcall) ImmAssociateContext(arg0:HWND, arg1:HIMC) : HIMC;

external (stdcall) ImmAssociateContextEx(arg0:HWND, arg1:HIMC, arg2:DWORD) : BOOL;

external (stdcall) ImmGetCompositionStringA(arg0:HIMC, arg1:DWORD, arg2:LPVOID, arg3:DWORD) : LONG;

external (stdcall) ImmGetCompositionStringW(arg0:HIMC, arg1:DWORD, arg2:LPVOID, arg3:DWORD) : LONG;

external (stdcall) ImmSetCompositionStringA(arg0:HIMC, arg1:DWORD, arg2:LPVOID, arg3:DWORD, arg4:LPVOID, arg5:DWORD) : BOOL;

external (stdcall) ImmSetCompositionStringW(arg0:HIMC, arg1:DWORD, arg2:LPVOID, arg3:DWORD, arg4:LPVOID, arg5:DWORD) : BOOL;

external (stdcall) ImmGetCandidateListCountA(arg0:HIMC, arg1:LPDWORD) : DWORD;

external (stdcall) ImmGetCandidateListCountW(arg0:HIMC, arg1:LPDWORD) : DWORD;

external (stdcall) ImmGetCandidateListA(arg0:HIMC, arg1:DWORD, arg2:LPCANDIDATELIST, arg3:DWORD) : DWORD;

external (stdcall) ImmGetCandidateListW(arg0:HIMC, arg1:DWORD, arg2:LPCANDIDATELIST, arg3:DWORD) : DWORD;

external (stdcall) ImmGetGuideLineA(arg0:HIMC, arg1:DWORD, arg2:LPSTR, arg3:DWORD) : DWORD;

external (stdcall) ImmGetGuideLineW(arg0:HIMC, arg1:DWORD, arg2:LPWSTR, arg3:DWORD) : DWORD;

external (stdcall) ImmGetConversionStatus(arg0:HIMC, arg1:LPDWORD, arg2:LPDWORD) : BOOL;

external (stdcall) ImmSetConversionStatus(arg0:HIMC, arg1:DWORD, arg2:DWORD) : BOOL;

external (stdcall) ImmGetOpenStatus(arg0:HIMC) : BOOL;

external (stdcall) ImmSetOpenStatus(arg0:HIMC, arg1:BOOL) : BOOL;

external (stdcall) ImmGetCompositionFontA(arg0:HIMC, arg1:LPLOGFONTA) : BOOL;

external (stdcall) ImmGetCompositionFontW(arg0:HIMC, arg1:LPLOGFONTW) : BOOL;

external (stdcall) ImmSetCompositionFontA(arg0:HIMC, arg1:LPLOGFONTA) : BOOL;

external (stdcall) ImmSetCompositionFontW(arg0:HIMC, arg1:LPLOGFONTW) : BOOL;

external (stdcall) ImmConfigureIMEA(arg0:HKL, arg1:HWND, arg2:DWORD, arg3:LPVOID) : BOOL;

external (stdcall) ImmConfigureIMEW(arg0:HKL, arg1:HWND, arg2:DWORD, arg3:LPVOID) : BOOL;

external (stdcall) ImmEscapeA(arg0:HKL, arg1:HIMC, arg2:UINT, arg3:LPVOID) : LRESULT;

external (stdcall) ImmEscapeW(arg0:HKL, arg1:HIMC, arg2:UINT, arg3:LPVOID) : LRESULT;

external (stdcall) ImmGetConversionListA(arg0:HKL, arg1:HIMC, arg2:LPCSTR, arg3:LPCANDIDATELIST, arg4:DWORD, arg5:UINT) : DWORD;

external (stdcall) ImmGetConversionListW(arg0:HKL, arg1:HIMC, arg2:LPCWSTR, arg3:LPCANDIDATELIST, arg4:DWORD, arg5:UINT) : DWORD;

external (stdcall) ImmNotifyIME(arg0:HIMC, arg1:DWORD, arg2:DWORD, arg3:DWORD) : BOOL;

external (stdcall) ImmGetStatusWindowPos(arg0:HIMC, arg1:LPPOINT) : BOOL;

external (stdcall) ImmSetStatusWindowPos(arg0:HIMC, arg1:LPPOINT) : BOOL;

external (stdcall) ImmGetCompositionWindow(arg0:HIMC, arg1:LPCOMPOSITIONFORM) : BOOL;

external (stdcall) ImmSetCompositionWindow(arg0:HIMC, arg1:LPCOMPOSITIONFORM) : BOOL;

external (stdcall) ImmGetCandidateWindow(arg0:HIMC, arg1:DWORD, arg2:LPCANDIDATEFORM) : BOOL;

external (stdcall) ImmSetCandidateWindow(arg0:HIMC, arg1:LPCANDIDATEFORM) : BOOL;

external (stdcall) ImmIsUIMessageA(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : BOOL;

external (stdcall) ImmIsUIMessageW(arg0:HWND, arg1:UINT, arg2:WPARAM, arg3:LPARAM) : BOOL;

external (stdcall) ImmGetVirtualKey(arg0:HWND) : UINT;

alias REGISTERWORDENUMPROCA = StdCallCodePointer[[LPCSTR, DWORD, LPCSTR, LPVOID],[Int]];

alias REGISTERWORDENUMPROCW = StdCallCodePointer[[LPCWSTR, DWORD, LPCWSTR, LPVOID],[Int]];

external (stdcall) ImmRegisterWordA(arg0:HKL, arg1:LPCSTR, arg2:DWORD, arg3:LPCSTR) : BOOL;

external (stdcall) ImmRegisterWordW(arg0:HKL, arg1:LPCWSTR, arg2:DWORD, arg3:LPCWSTR) : BOOL;

external (stdcall) ImmUnregisterWordA(arg0:HKL, arg1:LPCSTR, arg2:DWORD, arg3:LPCSTR) : BOOL;

external (stdcall) ImmUnregisterWordW(arg0:HKL, arg1:LPCWSTR, arg2:DWORD, arg3:LPCWSTR) : BOOL;

external (stdcall) ImmGetRegisterWordStyleA(arg0:HKL, arg1:UINT, arg2:LPSTYLEBUFA) : UINT;

external (stdcall) ImmGetRegisterWordStyleW(arg0:HKL, arg1:UINT, arg2:LPSTYLEBUFW) : UINT;

external (stdcall) ImmEnumRegisterWordA(arg0:HKL, arg1:REGISTERWORDENUMPROCA, arg2:LPCSTR, arg3:DWORD, arg4:LPCSTR, arg5:LPVOID) : UINT;

external (stdcall) ImmEnumRegisterWordW(arg0:HKL, arg1:REGISTERWORDENUMPROCW, arg2:LPCWSTR, arg3:DWORD, arg4:LPCWSTR, arg5:LPVOID) : UINT;

external (stdcall) ImmDisableIME(arg0:DWORD) : BOOL;

external (stdcall) ImmEnumInputContext(arg0:DWORD, arg1:IMCENUMPROC, arg2:LPARAM) : BOOL;

external (stdcall) ImmGetImeMenuItemsA(arg0:HIMC, arg1:DWORD, arg2:DWORD, arg3:LPIMEMENUITEMINFOA, arg4:LPIMEMENUITEMINFOA, arg5:DWORD) : DWORD;

external (stdcall) ImmGetImeMenuItemsW(arg0:HIMC, arg1:DWORD, arg2:DWORD, arg3:LPIMEMENUITEMINFOW, arg4:LPIMEMENUITEMINFOW, arg5:DWORD) : DWORD;

external (stdcall) ImmDisableTextFrameService(arg0:DWORD) : BOOL;

alias u_char = CUChar;

alias u_short = UShort;

alias u_int = UInt;

alias u_long = CULong;

alias u_int64 = UInt64;

record Struct_in_addr (
    S_un : Union_Unnamed150,
);

alias Union_Unnamed150 = Union[
    /* S_un_b */ Struct_Unnamed151,
    /* S_un_w */ Struct_Unnamed152,
    /* S_addr */ ULONG,
];

record Struct_Unnamed151 (
    s_b1 : UCHAR,
    s_b2 : UCHAR,
    s_b3 : UCHAR,
    s_b4 : UCHAR,
);

record Struct_Unnamed152 (
    s_w1 : USHORT,
    s_w2 : USHORT,
);

alias IN_ADDR = Struct_in_addr;

alias PIN_ADDR = Pointer[Struct_in_addr];

alias LPIN_ADDR = Pointer[Struct_in_addr];

alias ADDRESS_FAMILY = USHORT;

record Struct_sockaddr (
    sa_family : ADDRESS_FAMILY,
    sa_data : Array[CHAR, 14],
);

alias SOCKADDR = Struct_sockaddr;

alias PSOCKADDR = Pointer[Struct_sockaddr];

alias LPSOCKADDR = Pointer[Struct_sockaddr];

record Struct__SOCKET_ADDRESS (
    lpSockaddr : LPSOCKADDR,
    iSockaddrLength : INT,
);

alias SOCKET_ADDRESS = Struct__SOCKET_ADDRESS;

alias PSOCKET_ADDRESS = Pointer[Struct__SOCKET_ADDRESS];

alias LPSOCKET_ADDRESS = Pointer[Struct__SOCKET_ADDRESS];

record Struct__SOCKET_ADDRESS_LIST (
    iAddressCount : INT,
    Address : Array[SOCKET_ADDRESS, 1],
);

alias SOCKET_ADDRESS_LIST = Struct__SOCKET_ADDRESS_LIST;

alias PSOCKET_ADDRESS_LIST = Pointer[Struct__SOCKET_ADDRESS_LIST];

alias LPSOCKET_ADDRESS_LIST = Pointer[Struct__SOCKET_ADDRESS_LIST];

record Struct__CSADDR_INFO (
    LocalAddr : SOCKET_ADDRESS,
    RemoteAddr : SOCKET_ADDRESS,
    iSocketType : INT,
    iProtocol : INT,
);

alias CSADDR_INFO = Struct__CSADDR_INFO;

alias PCSADDR_INFO = Pointer[Struct__CSADDR_INFO];

alias LPCSADDR_INFO = Pointer[Struct__CSADDR_INFO];

record Struct_sockaddr_storage (
    ss_family : ADDRESS_FAMILY,
    __ss_pad1 : Array[CHAR, 6],
    __ss_align : Int64,
    __ss_pad2 : Array[CHAR, 112],
);

alias SOCKADDR_STORAGE_LH = Struct_sockaddr_storage;

alias PSOCKADDR_STORAGE_LH = Pointer[Struct_sockaddr_storage];

alias LPSOCKADDR_STORAGE_LH = Pointer[Struct_sockaddr_storage];

record Struct_sockaddr_storage_xp (
    ss_family : Short,
    __ss_pad1 : Array[CHAR, 6],
    __ss_align : Int64,
    __ss_pad2 : Array[CHAR, 112],
);

alias SOCKADDR_STORAGE_XP = Struct_sockaddr_storage_xp;

alias PSOCKADDR_STORAGE_XP = Pointer[Struct_sockaddr_storage_xp];

alias LPSOCKADDR_STORAGE_XP = Pointer[Struct_sockaddr_storage_xp];

alias SOCKADDR_STORAGE = SOCKADDR_STORAGE_LH;

alias PSOCKADDR_STORAGE = Pointer[SOCKADDR_STORAGE];

alias LPSOCKADDR_STORAGE = Pointer[SOCKADDR_STORAGE];

alias Enum_Unnamed153 = Int;
alias IPPROTO_HOPOPTS = 0;
alias IPPROTO_ICMP = 1;
alias IPPROTO_IGMP = 2;
alias IPPROTO_GGP = 3;
alias IPPROTO_IPV4 = 4;
alias IPPROTO_ST = 5;
alias IPPROTO_TCP = 6;
alias IPPROTO_CBT = 7;
alias IPPROTO_EGP = 8;
alias IPPROTO_IGP = 9;
alias IPPROTO_PUP = 12;
alias IPPROTO_UDP = 17;
alias IPPROTO_IDP = 22;
alias IPPROTO_RDP = 27;
alias IPPROTO_IPV6 = 41;
alias IPPROTO_ROUTING = 43;
alias IPPROTO_FRAGMENT = 44;
alias IPPROTO_ESP = 50;
alias IPPROTO_AH = 51;
alias IPPROTO_ICMPV6 = 58;
alias IPPROTO_NONE = 59;
alias IPPROTO_DSTOPTS = 60;
alias IPPROTO_ND = 77;
alias IPPROTO_ICLFXBM = 78;
alias IPPROTO_PIM = 103;
alias IPPROTO_PGM = 113;
alias IPPROTO_L2TP = 115;
alias IPPROTO_SCTP = 132;
alias IPPROTO_RAW = 255;
alias IPPROTO_MAX = 256;
alias IPPROTO_RESERVED_RAW = 257;
alias IPPROTO_RESERVED_IPSEC = 258;
alias IPPROTO_RESERVED_IPSECOFFLOAD = 259;
alias IPPROTO_RESERVED_MAX = 260;

alias IPPROTO = Enum_Unnamed153;

alias PIPROTO = Pointer[Enum_Unnamed153];

alias Enum_Unnamed154 = Int;
alias ScopeLevelInterface = 1;
alias ScopeLevelLink = 2;
alias ScopeLevelSubnet = 3;
alias ScopeLevelAdmin = 4;
alias ScopeLevelSite = 5;
alias ScopeLevelOrganization = 8;
alias ScopeLevelGlobal = 14;
alias ScopeLevelCount = 16;

alias SCOPE_LEVEL = Enum_Unnamed154;

record Struct_Unnamed155 (
);

alias Union_Unnamed156 = Union[
    /* Value */ ULONG,
];

record Struct_Unnamed157 (
    Zone : ULONG,
    Level : ULONG,
);

alias SCOPE_ID = Struct_Unnamed155;

alias PSCOPE_ID = Pointer[Struct_Unnamed155];

record Struct_sockaddr_in (
    sin_family : ADDRESS_FAMILY,
    sin_port : USHORT,
    sin_addr : IN_ADDR,
    sin_zero : Array[CHAR, 8],
);

alias SOCKADDR_IN = Struct_sockaddr_in;

alias PSOCKADDR_IN = Pointer[Struct_sockaddr_in];

record Struct_sockaddr_dl (
    sdl_family : ADDRESS_FAMILY,
    sdl_data : Array[UCHAR, 8],
    sdl_zero : Array[UCHAR, 4],
);

alias SOCKADDR_DL = Struct_sockaddr_dl;

alias PSOCKADDR_DL = Pointer[Struct_sockaddr_dl];

record Struct__WSABUF (
    len : ULONG,
    buf : Pointer[CHAR],
);

alias WSABUF = Struct__WSABUF;

alias LPWSABUF = Pointer[Struct__WSABUF];

record Struct__WSAMSG (
    name : LPSOCKADDR,
    namelen : INT,
    lpBuffers : LPWSABUF,
    dwBufferCount : ULONG,
    Control : WSABUF,
    dwFlags : ULONG,
);

alias WSAMSG = Struct__WSAMSG;

alias PWSAMSG = Pointer[Struct__WSAMSG];

alias LPWSAMSG = Pointer[Struct__WSAMSG];

record Struct_cmsghdr (
    cmsg_len : SIZE_T,
    cmsg_level : INT,
    cmsg_type : INT,
);

alias WSACMSGHDR = Struct_cmsghdr;

alias PWSACMSGHDR = Pointer[Struct_cmsghdr];

alias LPWSACMSGHDR = Pointer[Struct_cmsghdr];

alias CMSGHDR = WSACMSGHDR;

alias PCMSGHDR = Pointer[WSACMSGHDR];

record Struct_addrinfo (
    ai_flags : Int,
    ai_family : Int,
    ai_socktype : Int,
    ai_protocol : Int,
    ai_addrlen : size_t,
    ai_canonname : Pointer[CChar],
    ai_addr : Pointer[Struct_sockaddr],
    ai_next : Pointer[Struct_addrinfo],
);

alias ADDRINFOA = Struct_addrinfo;

alias PADDRINFOA = Pointer[Struct_addrinfo];

record Struct_addrinfoW (
    ai_flags : Int,
    ai_family : Int,
    ai_socktype : Int,
    ai_protocol : Int,
    ai_addrlen : size_t,
    ai_canonname : PWSTR,
    ai_addr : Pointer[Struct_sockaddr],
    ai_next : Pointer[Struct_addrinfoW],
);

alias ADDRINFOW = Struct_addrinfoW;

alias PADDRINFOW = Pointer[Struct_addrinfoW];

record Struct_addrinfoexA (
    ai_flags : Int,
    ai_family : Int,
    ai_socktype : Int,
    ai_protocol : Int,
    ai_addrlen : size_t,
    ai_canonname : Pointer[CChar],
    ai_addr : Pointer[Struct_sockaddr],
    ai_blob : OpaquePointer,
    ai_bloblen : size_t,
    ai_provider : LPGUID,
    ai_next : Pointer[Struct_addrinfoexA],
);

alias ADDRINFOEXA = Struct_addrinfoexA;

alias PADDRINFOEXA = Pointer[Struct_addrinfoexA];

alias LPADDRINFOEXA = Pointer[Struct_addrinfoexA];

record Struct_addrinfoexW (
    ai_flags : Int,
    ai_family : Int,
    ai_socktype : Int,
    ai_protocol : Int,
    ai_addrlen : size_t,
    ai_canonname : PWSTR,
    ai_addr : Pointer[Struct_sockaddr],
    ai_blob : OpaquePointer,
    ai_bloblen : size_t,
    ai_provider : LPGUID,
    ai_next : Pointer[Struct_addrinfoexW],
);

alias ADDRINFOEXW = Struct_addrinfoexW;

alias PADDRINFOEXW = Pointer[Struct_addrinfoexW];

alias LPADDRINFOEXW = Pointer[Struct_addrinfoexW];

alias SOCKET = UINT_PTR;

record Struct_fd_set (
    fd_count : u_int,
    fd_array : Array[SOCKET, 64],
);

alias fd_set = Struct_fd_set;

external (stdcall) __WSAFDIsSet(arg0:SOCKET, arg1:Pointer[fd_set]) : Int;

record Struct_timeval (
    tv_sec : CLong,
    tv_usec : CLong,
);

record Struct_hostent (
    h_name : Pointer[CChar],
    h_aliases : Pointer[Pointer[CChar]],
    h_addrtype : Short,
    h_length : Short,
    h_addr_list : Pointer[Pointer[CChar]],
);

record Struct_netent (
    n_name : Pointer[CChar],
    n_aliases : Pointer[Pointer[CChar]],
    n_addrtype : Short,
    n_net : u_long,
);

record Struct_servent (
    s_name : Pointer[CChar],
    s_aliases : Pointer[Pointer[CChar]],
    s_port : Short,
    s_proto : Pointer[CChar],
);

record Struct_protoent (
    p_name : Pointer[CChar],
    p_aliases : Pointer[Pointer[CChar]],
    p_proto : Short,
);

record Struct_WSAData (
    wVersion : WORD,
    wHighVersion : WORD,
    szDescription : Array[CChar, 257],
    szSystemStatus : Array[CChar, 129],
    iMaxSockets : UShort,
    iMaxUdpDg : UShort,
    lpVendorInfo : Pointer[CChar],
);

alias WSADATA = Struct_WSAData;

alias LPWSADATA = Pointer[Struct_WSAData];

record Struct_sockproto (
    sp_family : u_short,
    sp_protocol : u_short,
);

record Struct_linger (
    l_onoff : u_short,
    l_linger : u_short,
);

alias LPWSAOVERLAPPED = Pointer[Struct__OVERLAPPED];

alias SERVICETYPE = ULONG;

record Struct__flowspec (
    TokenRate : ULONG,
    TokenBucketSize : ULONG,
    PeakBandwidth : ULONG,
    Latency : ULONG,
    DelayVariation : ULONG,
    ServiceType : SERVICETYPE,
    MaxSduSize : ULONG,
    MinimumPolicedSize : ULONG,
);

alias FLOWSPEC = Struct__flowspec;

alias PFLOWSPEC = Pointer[Struct__flowspec];

alias LPFLOWSPEC = Pointer[Struct__flowspec];

record Struct_Unnamed158 (
    ObjectType : ULONG,
    ObjectLength : ULONG,
);

alias QOS_OBJECT_HDR = Struct_Unnamed158;

alias LPQOS_OBJECT_HDR = Pointer[Struct_Unnamed158];

record Struct__QOS_SD_MODE (
    ObjectHdr : QOS_OBJECT_HDR,
    ShapeDiscardMode : ULONG,
);

alias QOS_SD_MODE = Struct__QOS_SD_MODE;

alias LPQOS_SD_MODE = Pointer[Struct__QOS_SD_MODE];

record Struct__QOS_SHAPING_RATE (
    ObjectHdr : QOS_OBJECT_HDR,
    ShapingRate : ULONG,
);

alias QOS_SHAPING_RATE = Struct__QOS_SHAPING_RATE;

alias LPQOS_SHAPING_RATE = Pointer[Struct__QOS_SHAPING_RATE];

record Struct__QualityOfService (
    SendingFlowspec : FLOWSPEC,
    ReceivingFlowspec : FLOWSPEC,
    ProviderSpecific : WSABUF,
);

alias QOS = Struct__QualityOfService;

alias LPQOS = Pointer[Struct__QualityOfService];

alias GROUP = UInt;

record Struct__WSANETWORKEVENTS (
    lNetworkEvents : CLong,
    iErrorCode : Array[Int, 10],
);

alias WSANETWORKEVENTS = Struct__WSANETWORKEVENTS;

alias LPWSANETWORKEVENTS = Pointer[Struct__WSANETWORKEVENTS];

record Struct__WSAPROTOCOLCHAIN (
    ChainLen : Int,
    ChainEntries : Array[DWORD, 7],
);

alias WSAPROTOCOLCHAIN = Struct__WSAPROTOCOLCHAIN;

alias LPWSAPROTOCOLCHAIN = Pointer[Struct__WSAPROTOCOLCHAIN];

record Struct__WSAPROTOCOL_INFOA (
    dwServiceFlags1 : DWORD,
    dwServiceFlags2 : DWORD,
    dwServiceFlags3 : DWORD,
    dwServiceFlags4 : DWORD,
    dwProviderFlags : DWORD,
    ProviderId : GUID,
    dwCatalogEntryId : DWORD,
    ProtocolChain : WSAPROTOCOLCHAIN,
    iVersion : Int,
    iAddressFamily : Int,
    iMaxSockAddr : Int,
    iMinSockAddr : Int,
    iSocketType : Int,
    iProtocol : Int,
    iProtocolMaxOffset : Int,
    iNetworkByteOrder : Int,
    iSecurityScheme : Int,
    dwMessageSize : DWORD,
    dwProviderReserved : DWORD,
    szProtocol : Array[CHAR, 256],
);

alias WSAPROTOCOL_INFOA = Struct__WSAPROTOCOL_INFOA;

alias LPWSAPROTOCOL_INFOA = Pointer[Struct__WSAPROTOCOL_INFOA];

record Struct__WSAPROTOCOL_INFOW (
    dwServiceFlags1 : DWORD,
    dwServiceFlags2 : DWORD,
    dwServiceFlags3 : DWORD,
    dwServiceFlags4 : DWORD,
    dwProviderFlags : DWORD,
    ProviderId : GUID,
    dwCatalogEntryId : DWORD,
    ProtocolChain : WSAPROTOCOLCHAIN,
    iVersion : Int,
    iAddressFamily : Int,
    iMaxSockAddr : Int,
    iMinSockAddr : Int,
    iSocketType : Int,
    iProtocol : Int,
    iProtocolMaxOffset : Int,
    iNetworkByteOrder : Int,
    iSecurityScheme : Int,
    dwMessageSize : DWORD,
    dwProviderReserved : DWORD,
    szProtocol : Array[WCHAR, 256],
);

alias WSAPROTOCOL_INFOW = Struct__WSAPROTOCOL_INFOW;

alias LPWSAPROTOCOL_INFOW = Pointer[Struct__WSAPROTOCOL_INFOW];

alias WSAPROTOCOL_INFO = WSAPROTOCOL_INFOA;

alias LPWSAPROTOCOL_INFO = LPWSAPROTOCOL_INFOA;

alias LPCONDITIONPROC = StdCallCodePointer[[LPWSABUF, LPWSABUF, LPQOS, LPQOS, LPWSABUF, LPWSABUF, Pointer[GROUP], DWORD_PTR],[Int]];

alias LPWSAOVERLAPPED_COMPLETION_ROUTINE = StdCallCodePointer[[DWORD, DWORD, LPWSAOVERLAPPED, DWORD],[]];

alias Enum__WSACOMPLETIONTYPE = Int;
alias NSP_NOTIFY_IMMEDIATELY = 0;
alias NSP_NOTIFY_HWND = 1;
alias NSP_NOTIFY_EVENT = 2;
alias NSP_NOTIFY_PORT = 3;
alias NSP_NOTIFY_APC = 4;

alias WSACOMPLETIONTYPE = Enum__WSACOMPLETIONTYPE;

alias PWSACOMPLETIONTYPE = Pointer[Enum__WSACOMPLETIONTYPE];

alias LPWSACOMPLETIONTYPE = Pointer[Enum__WSACOMPLETIONTYPE];

record Struct__WSACOMPLETION (
    Type : WSACOMPLETIONTYPE,
    Parameters : Union_Unnamed159,
);

alias Union_Unnamed159 = Union[
    /* WindowMessage */ Struct_Unnamed160,
    /* Event */ Struct_Unnamed161,
    /* Apc */ Struct_Unnamed162,
    /* Port */ Struct_Unnamed163,
];

record Struct_Unnamed160 (
    hWnd : HWND,
    uMsg : UINT,
    context : WPARAM,
);

record Struct_Unnamed161 (
    lpOverlapped : LPWSAOVERLAPPED,
);

record Struct_Unnamed162 (
    lpOverlapped : LPWSAOVERLAPPED,
    lpfnCompletionProc : LPWSAOVERLAPPED_COMPLETION_ROUTINE,
);

record Struct_Unnamed163 (
    lpOverlapped : LPWSAOVERLAPPED,
    hPort : HANDLE,
    Key : ULONG_PTR,
);

alias WSACOMPLETION = Struct__WSACOMPLETION;

alias PWSACOMPLETION = Pointer[Struct__WSACOMPLETION];

alias LPWSACOMPLETION = Pointer[Struct__WSACOMPLETION];

record Struct__BLOB (
    cbSize : ULONG,
    pBlobData : Pointer[BYTE],
);

alias BLOB = Struct__BLOB;

alias LPBLOB = Pointer[Struct__BLOB];

record Struct__AFPROTOCOLS (
    iAddressFamily : INT,
    iProtocol : INT,
);

alias AFPROTOCOLS = Struct__AFPROTOCOLS;

alias PAFPROTOCOLS = Pointer[Struct__AFPROTOCOLS];

alias LPAFPROTOCOLS = Pointer[Struct__AFPROTOCOLS];

alias Enum__WSAEcomparator = Int;
alias COMP_EQUAL = 0;
alias COMP_NOTLESS = 1;

alias WSAECOMPARATOR = Enum__WSAEcomparator;

alias PWSAECOMPARATOR = Pointer[Enum__WSAEcomparator];

alias LPWSAECOMPARATOR = Pointer[Enum__WSAEcomparator];

record Struct__WSAVersion (
    dwVersion : DWORD,
    ecHow : WSAECOMPARATOR,
);

alias WSAVERSION = Struct__WSAVersion;

alias PWSAVERSION = Pointer[Struct__WSAVersion];

alias LPWSAVERSION = Pointer[Struct__WSAVersion];

record Struct__WSAQuerySetA (
    dwSize : DWORD,
    lpszServiceInstanceName : LPSTR,
    lpServiceClassId : LPGUID,
    lpVersion : LPWSAVERSION,
    lpszComment : LPSTR,
    dwNameSpace : DWORD,
    lpNSProviderId : LPGUID,
    lpszContext : LPSTR,
    dwNumberOfProtocols : DWORD,
    lpafpProtocols : LPAFPROTOCOLS,
    lpszQueryString : LPSTR,
    dwNumberOfCsAddrs : DWORD,
    lpcsaBuffer : LPCSADDR_INFO,
    dwOutputFlags : DWORD,
    lpBlob : LPBLOB,
);

alias WSAQUERYSETA = Struct__WSAQuerySetA;

alias PWSAQUERYSETA = Pointer[Struct__WSAQuerySetA];

alias LPWSAQUERYSETA = Pointer[Struct__WSAQuerySetA];

record Struct__WSAQuerySetW (
    dwSize : DWORD,
    lpszServiceInstanceName : LPWSTR,
    lpServiceClassId : LPGUID,
    lpVersion : LPWSAVERSION,
    lpszComment : LPWSTR,
    dwNameSpace : DWORD,
    lpNSProviderId : LPGUID,
    lpszContext : LPWSTR,
    dwNumberOfProtocols : DWORD,
    lpafpProtocols : LPAFPROTOCOLS,
    lpszQueryString : LPWSTR,
    dwNumberOfCsAddrs : DWORD,
    lpcsaBuffer : LPCSADDR_INFO,
    dwOutputFlags : DWORD,
    lpBlob : LPBLOB,
);

alias WSAQUERYSETW = Struct__WSAQuerySetW;

alias PWSAQUERYSETW = Pointer[Struct__WSAQuerySetW];

alias LPWSAQUERYSETW = Pointer[Struct__WSAQuerySetW];

record Struct__WSAQuerySet2A (
    dwSize : DWORD,
    lpszServiceInstanceName : LPSTR,
    lpVersion : LPWSAVERSION,
    lpszComment : LPSTR,
    dwNameSpace : DWORD,
    lpNSProviderId : LPGUID,
    lpszContext : LPSTR,
    dwNumberOfProtocols : DWORD,
    lpafpProtocols : LPAFPROTOCOLS,
    lpszQueryString : LPSTR,
    dwNumberOfCsAddrs : DWORD,
    lpcsaBuffer : LPCSADDR_INFO,
    dwOutputFlags : DWORD,
    lpBlob : LPBLOB,
);

alias WSAQUERYSET2A = Struct__WSAQuerySet2A;

alias PWSAQUERYSET2A = Pointer[Struct__WSAQuerySet2A];

alias LPWSAQUERYSET2A = Pointer[Struct__WSAQuerySet2A];

record Struct__WSAQuerySet2W (
    dwSize : DWORD,
    lpszServiceInstanceName : LPWSTR,
    lpVersion : LPWSAVERSION,
    lpszComment : LPWSTR,
    dwNameSpace : DWORD,
    lpNSProviderId : LPGUID,
    lpszContext : LPWSTR,
    dwNumberOfProtocols : DWORD,
    lpafpProtocols : LPAFPROTOCOLS,
    lpszQueryString : LPWSTR,
    dwNumberOfCsAddrs : DWORD,
    lpcsaBuffer : LPCSADDR_INFO,
    dwOutputFlags : DWORD,
    lpBlob : LPBLOB,
);

alias WSAQUERYSET2W = Struct__WSAQuerySet2W;

alias PWSAQUERYSET2W = Pointer[Struct__WSAQuerySet2W];

alias LPWSAQUERYSET2W = Pointer[Struct__WSAQuerySet2W];

alias WSAQUERYSET = WSAQUERYSETA;

alias PWSAQUERYSET = PWSAQUERYSETA;

alias LPWSAQUERYSET = LPWSAQUERYSETA;

alias WSAQUERYSET2 = WSAQUERYSET2A;

alias PWSAQUERYSET2 = PWSAQUERYSET2A;

alias LPWSAQUERYSET2 = LPWSAQUERYSET2A;

alias Enum__WSAESETSERVICEOP = Int;
alias RNRSERVICE_REGISTER = 0;
alias RNRSERVICE_DEREGISTER = 1;
alias RNRSERVICE_DELETE = 2;

alias WSAESETSERVICEOP = Enum__WSAESETSERVICEOP;

alias PWSAESETSERVICEOP = Pointer[Enum__WSAESETSERVICEOP];

alias LPWSAESETSERVICEOP = Pointer[Enum__WSAESETSERVICEOP];

record Struct__WSANSClassInfoA (
    lpszName : LPSTR,
    dwNameSpace : DWORD,
    dwValueType : DWORD,
    dwValueSize : DWORD,
    lpValue : LPVOID,
);

alias WSANSCLASSINFOA = Struct__WSANSClassInfoA;

alias PWSANSCLASSINFOA = Pointer[Struct__WSANSClassInfoA];

alias LPWSANSCLASSINFOA = Pointer[Struct__WSANSClassInfoA];

record Struct__WSANSClassInfoW (
    lpszName : LPWSTR,
    dwNameSpace : DWORD,
    dwValueType : DWORD,
    dwValueSize : DWORD,
    lpValue : LPVOID,
);

alias WSANSCLASSINFOW = Struct__WSANSClassInfoW;

alias PWSANSCLASSINFOW = Pointer[Struct__WSANSClassInfoW];

alias LPWSANSCLASSINFOW = Pointer[Struct__WSANSClassInfoW];

alias WSANSCLASSINFO = WSANSCLASSINFOA;

alias PWSANSCLASSINFO = PWSANSCLASSINFOA;

alias LPWSANSCLASSINFO = LPWSANSCLASSINFOA;

record Struct__WSAServiceClassInfoA (
    lpServiceClassId : LPGUID,
    lpszServiceClassName : LPSTR,
    dwCount : DWORD,
    lpClassInfos : LPWSANSCLASSINFOA,
);

alias WSASERVICECLASSINFOA = Struct__WSAServiceClassInfoA;

alias PWSASERVICECLASSINFOA = Pointer[Struct__WSAServiceClassInfoA];

alias LPWSASERVICECLASSINFOA = Pointer[Struct__WSAServiceClassInfoA];

record Struct__WSAServiceClassInfoW (
    lpServiceClassId : LPGUID,
    lpszServiceClassName : LPWSTR,
    dwCount : DWORD,
    lpClassInfos : LPWSANSCLASSINFOW,
);

alias WSASERVICECLASSINFOW = Struct__WSAServiceClassInfoW;

alias PWSASERVICECLASSINFOW = Pointer[Struct__WSAServiceClassInfoW];

alias LPWSASERVICECLASSINFOW = Pointer[Struct__WSAServiceClassInfoW];

alias WSASERVICECLASSINFO = WSASERVICECLASSINFOA;

alias PWSASERVICECLASSINFO = PWSASERVICECLASSINFOA;

alias LPWSASERVICECLASSINFO = LPWSASERVICECLASSINFOA;

record Struct__WSANAMESPACE_INFOA (
    NSProviderId : GUID,
    dwNameSpace : DWORD,
    fActive : BOOL,
    dwVersion : DWORD,
    lpszIdentifier : LPSTR,
);

alias WSANAMESPACE_INFOA = Struct__WSANAMESPACE_INFOA;

alias PWSANAMESPACE_INFOA = Pointer[Struct__WSANAMESPACE_INFOA];

alias LPWSANAMESPACE_INFOA = Pointer[Struct__WSANAMESPACE_INFOA];

record Struct__WSANAMESPACE_INFOW (
    NSProviderId : GUID,
    dwNameSpace : DWORD,
    fActive : BOOL,
    dwVersion : DWORD,
    lpszIdentifier : LPWSTR,
);

alias WSANAMESPACE_INFOW = Struct__WSANAMESPACE_INFOW;

alias PWSANAMESPACE_INFOW = Pointer[Struct__WSANAMESPACE_INFOW];

alias LPWSANAMESPACE_INFOW = Pointer[Struct__WSANAMESPACE_INFOW];

record Struct__WSANAMESPACE_INFOEXA (
    NSProviderId : GUID,
    dwNameSpace : DWORD,
    fActive : BOOL,
    dwVersion : DWORD,
    lpszIdentifier : LPSTR,
    ProviderSpecific : BLOB,
);

alias WSANAMESPACE_INFOEXA = Struct__WSANAMESPACE_INFOEXA;

alias PWSANAMESPACE_INFOEXA = Pointer[Struct__WSANAMESPACE_INFOEXA];

alias LPWSANAMESPACE_INFOEXA = Pointer[Struct__WSANAMESPACE_INFOEXA];

record Struct__WSANAMESPACE_INFOEXW (
    NSProviderId : GUID,
    dwNameSpace : DWORD,
    fActive : BOOL,
    dwVersion : DWORD,
    lpszIdentifier : LPWSTR,
    ProviderSpecific : BLOB,
);

alias WSANAMESPACE_INFOEXW = Struct__WSANAMESPACE_INFOEXW;

alias PWSANAMESPACE_INFOEXW = Pointer[Struct__WSANAMESPACE_INFOEXW];

alias LPWSANAMESPACE_INFOEXW = Pointer[Struct__WSANAMESPACE_INFOEXW];

alias WSANAMESPACE_INFO = WSANAMESPACE_INFOA;

alias PWSANAMESPACE_INFO = PWSANAMESPACE_INFOA;

alias LPWSANAMESPACE_INFO = LPWSANAMESPACE_INFOA;

alias WSANAMESPACE_INFOEX = WSANAMESPACE_INFOEXA;

alias PWSANAMESPACE_INFOEX = PWSANAMESPACE_INFOEXA;

alias LPWSANAMESPACE_INFOEX = LPWSANAMESPACE_INFOEXA;

record Struct_pollfd (
    fd : SOCKET,
    events : SHORT,
    revents : SHORT,
);

alias WSAPOLLFD = Struct_pollfd;

alias PWSAPOLLFD = Pointer[Struct_pollfd];

alias LPWSAPOLLFD = Pointer[Struct_pollfd];

external (stdcall) accept(arg0:SOCKET, arg1:Pointer[Struct_sockaddr], arg2:Pointer[Int]) : SOCKET;

external (stdcall) bind(arg0:SOCKET, arg1:Pointer[Struct_sockaddr], arg2:Int) : Int;

external (stdcall) closesocket(arg0:SOCKET) : Int;

external (stdcall) connect(arg0:SOCKET, arg1:Pointer[Struct_sockaddr], arg2:Int) : Int;

external (stdcall) ioctlsocket(arg0:SOCKET, arg1:CLong, arg2:Pointer[u_long]) : Int;

external (stdcall) getpeername(arg0:SOCKET, arg1:Pointer[Struct_sockaddr], arg2:Pointer[Int]) : Int;

external (stdcall) getsockname(arg0:SOCKET, arg1:Pointer[Struct_sockaddr], arg2:Pointer[Int]) : Int;

external (stdcall) getsockopt(arg0:SOCKET, arg1:Int, arg2:Int, arg3:Pointer[CChar], arg4:Pointer[Int]) : Int;

external (stdcall) htonl(arg0:u_long) : u_long;

external (stdcall) htons(arg0:u_short) : u_short;

external (stdcall) inet_addr(arg0:Pointer[CChar]) : CULong;

external (stdcall) inet_ntoa(arg0:Struct_in_addr) : Pointer[CChar];

external (stdcall) listen(arg0:SOCKET, arg1:Int) : Int;

external (stdcall) ntohl(arg0:u_long) : u_long;

external (stdcall) ntohs(arg0:u_short) : u_short;

external (stdcall) recv(arg0:SOCKET, arg1:Pointer[CChar], arg2:Int, arg3:Int) : Int;

external (stdcall) recvfrom(arg0:SOCKET, arg1:Pointer[CChar], arg2:Int, arg3:Int, arg4:Pointer[Struct_sockaddr], arg5:Pointer[Int]) : Int;

external (stdcall) select(arg0:Int, arg1:Pointer[fd_set], arg2:Pointer[fd_set], arg3:Pointer[fd_set], arg4:Pointer[Struct_timeval]) : Int;

external (stdcall) send(arg0:SOCKET, arg1:Pointer[CChar], arg2:Int, arg3:Int) : Int;

external (stdcall) sendto(arg0:SOCKET, arg1:Pointer[CChar], arg2:Int, arg3:Int, arg4:Pointer[Struct_sockaddr], arg5:Int) : Int;

external (stdcall) setsockopt(arg0:SOCKET, arg1:Int, arg2:Int, arg3:Pointer[CChar], arg4:Int) : Int;

external (stdcall) shutdown(arg0:SOCKET, arg1:Int) : Int;

external (stdcall) socket(arg0:Int, arg1:Int, arg2:Int) : SOCKET;

external (stdcall) gethostbyaddr(arg0:Pointer[CChar], arg1:Int, arg2:Int) : Pointer[Struct_hostent];

external (stdcall) gethostbyname(arg0:Pointer[CChar]) : Pointer[Struct_hostent];

external (stdcall) gethostname(arg0:Pointer[CChar], arg1:Int) : Int;

external (stdcall) getservbyport(arg0:Int, arg1:Pointer[CChar]) : Pointer[Struct_servent];

external (stdcall) getservbyname(arg0:Pointer[CChar], arg1:Pointer[CChar]) : Pointer[Struct_servent];

external (stdcall) getprotobynumber(arg0:Int) : Pointer[Struct_protoent];

external (stdcall) getprotobyname(arg0:Pointer[CChar]) : Pointer[Struct_protoent];

external (stdcall) WSAStartup(arg0:WORD, arg1:LPWSADATA) : Int;

external (stdcall) WSACleanup() : Int;

external (stdcall) WSASetLastError(arg0:Int) : ;

external (stdcall) WSAGetLastError() : Int;

external (stdcall) WSAIsBlocking() : BOOL;

external (stdcall) WSAUnhookBlockingHook() : Int;

external (stdcall) WSASetBlockingHook(arg0:FARPROC) : FARPROC;

external (stdcall) WSACancelBlockingCall() : Int;

external (stdcall) WSAAsyncGetServByName(arg0:HWND, arg1:u_int, arg2:Pointer[CChar], arg3:Pointer[CChar], arg4:Pointer[CChar], arg5:Int) : HANDLE;

external (stdcall) WSAAsyncGetServByPort(arg0:HWND, arg1:u_int, arg2:Int, arg3:Pointer[CChar], arg4:Pointer[CChar], arg5:Int) : HANDLE;

external (stdcall) WSAAsyncGetProtoByName(arg0:HWND, arg1:u_int, arg2:Pointer[CChar], arg3:Pointer[CChar], arg4:Int) : HANDLE;

external (stdcall) WSAAsyncGetProtoByNumber(arg0:HWND, arg1:u_int, arg2:Int, arg3:Pointer[CChar], arg4:Int) : HANDLE;

external (stdcall) WSAAsyncGetHostByName(arg0:HWND, arg1:u_int, arg2:Pointer[CChar], arg3:Pointer[CChar], arg4:Int) : HANDLE;

external (stdcall) WSAAsyncGetHostByAddr(arg0:HWND, arg1:u_int, arg2:Pointer[CChar], arg3:Int, arg4:Int, arg5:Pointer[CChar], arg6:Int) : HANDLE;

external (stdcall) WSACancelAsyncRequest(arg0:HANDLE) : Int;

external (stdcall) WSAAsyncSelect(arg0:SOCKET, arg1:HWND, arg2:u_int, arg3:CLong) : Int;

external (stdcall) WSAAccept(arg0:SOCKET, arg1:Pointer[Struct_sockaddr], arg2:LPINT, arg3:LPCONDITIONPROC, arg4:DWORD_PTR) : SOCKET;

external (stdcall) WSACloseEvent(arg0:HANDLE) : BOOL;

external (stdcall) WSAConnect(arg0:SOCKET, arg1:Pointer[Struct_sockaddr], arg2:Int, arg3:LPWSABUF, arg4:LPWSABUF, arg5:LPQOS, arg6:LPQOS) : Int;

external (stdcall) WSAConnectByNameW(arg0:SOCKET, arg1:LPWSTR, arg2:LPWSTR, arg3:LPDWORD, arg4:LPSOCKADDR, arg5:LPDWORD, arg6:LPSOCKADDR, arg7:Pointer[Struct_timeval], arg8:LPWSAOVERLAPPED) : BOOL;

external (stdcall) WSAConnectByNameA(arg0:SOCKET, arg1:LPCSTR, arg2:LPCSTR, arg3:LPDWORD, arg4:LPSOCKADDR, arg5:LPDWORD, arg6:LPSOCKADDR, arg7:Pointer[Struct_timeval], arg8:LPWSAOVERLAPPED) : BOOL;

external (stdcall) WSAConnectByList(arg0:SOCKET, arg1:PSOCKET_ADDRESS_LIST, arg2:LPDWORD, arg3:LPSOCKADDR, arg4:LPDWORD, arg5:LPSOCKADDR, arg6:Pointer[Struct_timeval], arg7:LPWSAOVERLAPPED) : BOOL;

external (stdcall) WSACreateEvent() : HANDLE;

external (stdcall) WSADuplicateSocketA(arg0:SOCKET, arg1:DWORD, arg2:LPWSAPROTOCOL_INFOA) : Int;

external (stdcall) WSADuplicateSocketW(arg0:SOCKET, arg1:DWORD, arg2:LPWSAPROTOCOL_INFOW) : Int;

external (stdcall) WSAEnumNetworkEvents(arg0:SOCKET, arg1:HANDLE, arg2:LPWSANETWORKEVENTS) : Int;

external (stdcall) WSAEnumProtocolsA(arg0:LPINT, arg1:LPWSAPROTOCOL_INFOA, arg2:LPDWORD) : Int;

external (stdcall) WSAEnumProtocolsW(arg0:LPINT, arg1:LPWSAPROTOCOL_INFOW, arg2:LPDWORD) : Int;

external (stdcall) WSAEventSelect(arg0:SOCKET, arg1:HANDLE, arg2:CLong) : Int;

external (stdcall) WSAGetOverlappedResult(arg0:SOCKET, arg1:LPWSAOVERLAPPED, arg2:LPDWORD, arg3:BOOL, arg4:LPDWORD) : BOOL;

external (stdcall) WSAGetQOSByName(arg0:SOCKET, arg1:LPWSABUF, arg2:LPQOS) : BOOL;

external (stdcall) WSAHtonl(arg0:SOCKET, arg1:u_long, arg2:Pointer[u_long]) : Int;

external (stdcall) WSAHtons(arg0:SOCKET, arg1:u_short, arg2:Pointer[u_short]) : Int;

external (stdcall) WSAIoctl(arg0:SOCKET, arg1:DWORD, arg2:LPVOID, arg3:DWORD, arg4:LPVOID, arg5:DWORD, arg6:LPDWORD, arg7:LPWSAOVERLAPPED, arg8:LPWSAOVERLAPPED_COMPLETION_ROUTINE) : Int;

external (stdcall) WSAJoinLeaf(arg0:SOCKET, arg1:Pointer[Struct_sockaddr], arg2:Int, arg3:LPWSABUF, arg4:LPWSABUF, arg5:LPQOS, arg6:LPQOS, arg7:DWORD) : SOCKET;

external (stdcall) WSANtohl(arg0:SOCKET, arg1:u_long, arg2:Pointer[u_long]) : Int;

external (stdcall) WSANtohs(arg0:SOCKET, arg1:u_short, arg2:Pointer[u_short]) : Int;

external (stdcall) WSARecv(arg0:SOCKET, arg1:LPWSABUF, arg2:DWORD, arg3:LPDWORD, arg4:LPDWORD, arg5:LPWSAOVERLAPPED, arg6:LPWSAOVERLAPPED_COMPLETION_ROUTINE) : Int;

external (stdcall) WSARecvDisconnect(arg0:SOCKET, arg1:LPWSABUF) : Int;

external (stdcall) WSARecvFrom(arg0:SOCKET, arg1:LPWSABUF, arg2:DWORD, arg3:LPDWORD, arg4:LPDWORD, arg5:Pointer[Struct_sockaddr], arg6:LPINT, arg7:LPWSAOVERLAPPED, arg8:LPWSAOVERLAPPED_COMPLETION_ROUTINE) : Int;

external (stdcall) WSAResetEvent(arg0:HANDLE) : BOOL;

external (stdcall) WSASend(arg0:SOCKET, arg1:LPWSABUF, arg2:DWORD, arg3:LPDWORD, arg4:DWORD, arg5:LPWSAOVERLAPPED, arg6:LPWSAOVERLAPPED_COMPLETION_ROUTINE) : Int;

external (stdcall) WSASendMsg(arg0:SOCKET, arg1:LPWSAMSG, arg2:DWORD, arg3:LPDWORD, arg4:LPWSAOVERLAPPED, arg5:LPWSAOVERLAPPED_COMPLETION_ROUTINE) : Int;

external (stdcall) WSASendDisconnect(arg0:SOCKET, arg1:LPWSABUF) : Int;

external (stdcall) WSASendTo(arg0:SOCKET, arg1:LPWSABUF, arg2:DWORD, arg3:LPDWORD, arg4:DWORD, arg5:Pointer[Struct_sockaddr], arg6:Int, arg7:LPWSAOVERLAPPED, arg8:LPWSAOVERLAPPED_COMPLETION_ROUTINE) : Int;

external (stdcall) WSASetEvent(arg0:HANDLE) : BOOL;

external (stdcall) WSASocketA(arg0:Int, arg1:Int, arg2:Int, arg3:LPWSAPROTOCOL_INFOA, arg4:GROUP, arg5:DWORD) : SOCKET;

external (stdcall) WSASocketW(arg0:Int, arg1:Int, arg2:Int, arg3:LPWSAPROTOCOL_INFOW, arg4:GROUP, arg5:DWORD) : SOCKET;

external (stdcall) WSAWaitForMultipleEvents(arg0:DWORD, arg1:Pointer[HANDLE], arg2:BOOL, arg3:DWORD, arg4:BOOL) : DWORD;

external (stdcall) WSAAddressToStringA(arg0:LPSOCKADDR, arg1:DWORD, arg2:LPWSAPROTOCOL_INFOA, arg3:LPSTR, arg4:LPDWORD) : INT;

external (stdcall) WSAAddressToStringW(arg0:LPSOCKADDR, arg1:DWORD, arg2:LPWSAPROTOCOL_INFOW, arg3:LPWSTR, arg4:LPDWORD) : INT;

external (stdcall) WSAStringToAddressA(arg0:LPSTR, arg1:INT, arg2:LPWSAPROTOCOL_INFOA, arg3:LPSOCKADDR, arg4:LPINT) : INT;

external (stdcall) WSAStringToAddressW(arg0:LPWSTR, arg1:INT, arg2:LPWSAPROTOCOL_INFOW, arg3:LPSOCKADDR, arg4:LPINT) : INT;

external (stdcall) WSALookupServiceBeginA(arg0:LPWSAQUERYSETA, arg1:DWORD, arg2:LPHANDLE) : INT;

external (stdcall) WSALookupServiceBeginW(arg0:LPWSAQUERYSETW, arg1:DWORD, arg2:LPHANDLE) : INT;

external (stdcall) WSALookupServiceNextA(arg0:HANDLE, arg1:DWORD, arg2:LPDWORD, arg3:LPWSAQUERYSETA) : INT;

external (stdcall) WSALookupServiceNextW(arg0:HANDLE, arg1:DWORD, arg2:LPDWORD, arg3:LPWSAQUERYSETW) : INT;

external (stdcall) WSANSPIoctl(arg0:HANDLE, arg1:DWORD, arg2:LPVOID, arg3:DWORD, arg4:LPVOID, arg5:DWORD, arg6:LPDWORD, arg7:LPWSACOMPLETION) : INT;

external (stdcall) WSALookupServiceEnd(arg0:HANDLE) : INT;

external (stdcall) WSAInstallServiceClassA(arg0:LPWSASERVICECLASSINFOA) : INT;

external (stdcall) WSAInstallServiceClassW(arg0:LPWSASERVICECLASSINFOW) : INT;

external (stdcall) WSARemoveServiceClass(arg0:LPGUID) : INT;

external (stdcall) WSAGetServiceClassInfoA(arg0:LPGUID, arg1:LPGUID, arg2:LPDWORD, arg3:LPWSASERVICECLASSINFOA) : INT;

external (stdcall) WSAGetServiceClassInfoW(arg0:LPGUID, arg1:LPGUID, arg2:LPDWORD, arg3:LPWSASERVICECLASSINFOW) : INT;

external (stdcall) WSAEnumNameSpaceProvidersA(arg0:LPDWORD, arg1:LPWSANAMESPACE_INFOA) : INT;

external (stdcall) WSAEnumNameSpaceProvidersW(arg0:LPDWORD, arg1:LPWSANAMESPACE_INFOW) : INT;

external (stdcall) WSAEnumNameSpaceProvidersExA(arg0:LPDWORD, arg1:LPWSANAMESPACE_INFOEXA) : INT;

external (stdcall) WSAEnumNameSpaceProvidersExW(arg0:LPDWORD, arg1:LPWSANAMESPACE_INFOEXW) : INT;

external (stdcall) WSAGetServiceClassNameByClassIdA(arg0:LPGUID, arg1:LPSTR, arg2:LPDWORD) : INT;

external (stdcall) WSAGetServiceClassNameByClassIdW(arg0:LPGUID, arg1:LPWSTR, arg2:LPDWORD) : INT;

external (stdcall) WSASetServiceA(arg0:LPWSAQUERYSETA, arg1:WSAESETSERVICEOP, arg2:DWORD) : INT;

external (stdcall) WSASetServiceW(arg0:LPWSAQUERYSETW, arg1:WSAESETSERVICEOP, arg2:DWORD) : INT;

external (stdcall) WSAProviderConfigChange(arg0:LPHANDLE, arg1:LPWSAOVERLAPPED, arg2:LPWSAOVERLAPPED_COMPLETION_ROUTINE) : INT;

external (stdcall) WSAPoll(arg0:LPWSAPOLLFD, arg1:ULONG, arg2:INT) : Int;

alias LPSOCKADDR_IN = Pointer[Struct_sockaddr_in];

alias LINGER = Struct_linger;

alias PLINGER = Pointer[Struct_linger];

alias LPLINGER = Pointer[Struct_linger];

alias FD_SET = Struct_fd_set;

alias PFD_SET = Pointer[Struct_fd_set];

alias LPFD_SET = Pointer[Struct_fd_set];

alias HOSTENT = Struct_hostent;

alias PHOSTENT = Pointer[Struct_hostent];

alias LPHOSTENT = Pointer[Struct_hostent];

alias SERVENT = Struct_servent;

alias PSERVENT = Pointer[Struct_servent];

alias LPSERVENT = Pointer[Struct_servent];

alias PROTOENT = Struct_protoent;

alias PPROTOENT = Pointer[Struct_protoent];

alias LPPROTOENT = Pointer[Struct_protoent];

alias TIMEVAL = Struct_timeval;

alias PTIMEVAL = Pointer[Struct_timeval];

alias LPTIMEVAL = Pointer[Struct_timeval];

