Skip to content

Instantly share code, notes, and snippets.

@caiodanielnunessantos
Created April 28, 2020 13:01
Show Gist options
  • Save caiodanielnunessantos/6d52fbbda51be2a16e4f9a7188c9244e to your computer and use it in GitHub Desktop.
Save caiodanielnunessantos/6d52fbbda51be2a16e4f9a7188c9244e to your computer and use it in GitHub Desktop.
Preprocessed "windows.h" header
typedef __builtin_va_list __gnuc_va_list;
typedef __gnuc_va_list va_list;
void __attribute__((__cdecl__)) __debugbreak(void);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __attribute__((__cdecl__)) __debugbreak(void)
{
__asm__ __volatile__("int {$}3"
:);
}
const char *__mingw_get_crt_info(void);
__extension__ typedef unsigned long long size_t;
__extension__ typedef long long ssize_t;
typedef size_t rsize_t;
__extension__ typedef long long intptr_t;
__extension__ typedef unsigned long long uintptr_t;
__extension__ typedef long long ptrdiff_t;
typedef unsigned short wchar_t;
typedef unsigned short wint_t;
typedef unsigned short wctype_t;
typedef int errno_t;
typedef long __time32_t;
__extension__ typedef long long __time64_t;
typedef __time64_t time_t;
struct threadlocaleinfostruct;
struct threadmbcinfostruct;
typedef struct threadlocaleinfostruct *pthreadlocinfo;
typedef struct threadmbcinfostruct *pthreadmbcinfo;
struct __lc_time_data;
typedef struct localeinfo_struct
{
pthreadlocinfo locinfo;
pthreadmbcinfo mbcinfo;
} _locale_tstruct, *_locale_t;
typedef struct tagLC_ID
{
unsigned short wLanguage;
unsigned short wCountry;
unsigned short wCodePage;
} LC_ID, *LPLC_ID;
typedef struct threadlocaleinfostruct
{
int refcount;
unsigned int lc_codepage;
unsigned int lc_collate_cp;
unsigned long lc_handle[6];
LC_ID lc_id[6];
struct
{
char *locale;
wchar_t *wlocale;
int *refcount;
int *wrefcount;
} lc_category[6];
int lc_clike;
int mb_cur_max;
int *lconv_intl_refcount;
int *lconv_num_refcount;
int *lconv_mon_refcount;
struct lconv *lconv;
int *ctype1_refcount;
unsigned short *ctype1;
const unsigned short *pctype;
const unsigned char *pclmap;
const unsigned char *pcumap;
struct __lc_time_data *lc_time_curr;
} threadlocinfo;
struct _EXCEPTION_POINTERS;
struct _EXCEPTION_RECORD;
struct _CONTEXT;
struct _DISPATCHER_CONTEXT;
__extension__ __attribute__((__dllimport__)) int __attribute__((__cdecl__)) __C_specific_handler(struct _EXCEPTION_RECORD *_ExceptionRecord, void *_EstablisherFrame, struct _CONTEXT *_ContextRecord, struct _DISPATCHER_CONTEXT *_DispatcherContext);
unsigned long __attribute__((__cdecl__)) _exception_code(void);
void *__attribute__((__cdecl__)) _exception_info(void);
int __attribute__((__cdecl__)) _abnormal_termination(void);
typedef void(__attribute__((__cdecl__)) * _PHNDLR)(int);
struct _XCPT_ACTION
{
unsigned long XcptNum;
int SigNum;
_PHNDLR XcptAction;
};
extern struct _XCPT_ACTION _XcptActTab[];
extern int _XcptActTabCount;
extern int _XcptActTabSize;
extern int _First_FPE_Indx;
extern int _Num_FPE;
int __attribute__((__cdecl__)) __CppXcptFilter(unsigned long _ExceptionNum, struct _EXCEPTION_POINTERS *_ExceptionPtr);
int __attribute__((__cdecl__)) _XcptFilter(unsigned long _ExceptionNum, struct _EXCEPTION_POINTERS *_ExceptionPtr);
typedef int (*PEXCEPTION_HANDLER)(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *);
typedef unsigned long ULONG;
typedef ULONG *PULONG;
typedef unsigned short USHORT;
typedef USHORT *PUSHORT;
typedef unsigned char UCHAR;
typedef UCHAR *PUCHAR;
typedef char *PSZ;
typedef int WINBOOL;
typedef int BOOL;
typedef WINBOOL *PBOOL;
typedef WINBOOL *LPBOOL;
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned long DWORD;
typedef float FLOAT;
typedef FLOAT *PFLOAT;
typedef BYTE *PBYTE;
typedef BYTE *LPBYTE;
typedef int *PINT;
typedef int *LPINT;
typedef WORD *PWORD;
typedef WORD *LPWORD;
typedef long *LPLONG;
typedef DWORD *PDWORD;
typedef DWORD *LPDWORD;
typedef void *LPVOID;
typedef const void *LPCVOID;
typedef int INT;
typedef unsigned int UINT;
typedef unsigned int *PUINT;
extern unsigned short **__imp__pctype;
extern unsigned short **__imp__wctype;
extern unsigned short **__imp__pwctype;
extern const unsigned char __newclmap[];
extern const unsigned char __newcumap[];
extern pthreadlocinfo __ptlocinfo;
extern pthreadmbcinfo __ptmbcinfo;
extern int __globallocalestatus;
extern int __locale_changed;
extern struct threadlocaleinfostruct __initiallocinfo;
extern _locale_tstruct __initiallocalestructinfo;
pthreadlocinfo __attribute__((__cdecl__)) __updatetlocinfo(void);
pthreadmbcinfo __attribute__((__cdecl__)) __updatetmbcinfo(void);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _isctype(int _C, int _Type);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _isctype_l(int _C, int _Type, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) isalpha(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _isalpha_l(int _C, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) isupper(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _isupper_l(int _C, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) islower(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _islower_l(int _C, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) isdigit(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _isdigit_l(int _C, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) isxdigit(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _isxdigit_l(int _C, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) isspace(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _isspace_l(int _C, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) ispunct(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _ispunct_l(int _C, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) isalnum(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _isalnum_l(int _C, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) isprint(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _isprint_l(int _C, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) isgraph(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _isgraph_l(int _C, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) iscntrl(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iscntrl_l(int _C, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) toupper(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) tolower(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _tolower(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _tolower_l(int _C, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _toupper(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _toupper_l(int _C, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) __isascii(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) __toascii(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) __iscsymf(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) __iscsym(int _C);
int __attribute__((__cdecl__)) isblank(int _C);
int __attribute__((__cdecl__)) iswalpha(wint_t _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iswalpha_l(wint_t _C, _locale_t _Locale);
int __attribute__((__cdecl__)) iswupper(wint_t _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iswupper_l(wint_t _C, _locale_t _Locale);
int __attribute__((__cdecl__)) iswlower(wint_t _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iswlower_l(wint_t _C, _locale_t _Locale);
int __attribute__((__cdecl__)) iswdigit(wint_t _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iswdigit_l(wint_t _C, _locale_t _Locale);
int __attribute__((__cdecl__)) iswxdigit(wint_t _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iswxdigit_l(wint_t _C, _locale_t _Locale);
int __attribute__((__cdecl__)) iswspace(wint_t _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iswspace_l(wint_t _C, _locale_t _Locale);
int __attribute__((__cdecl__)) iswpunct(wint_t _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iswpunct_l(wint_t _C, _locale_t _Locale);
int __attribute__((__cdecl__)) iswalnum(wint_t _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iswalnum_l(wint_t _C, _locale_t _Locale);
int __attribute__((__cdecl__)) iswprint(wint_t _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iswprint_l(wint_t _C, _locale_t _Locale);
int __attribute__((__cdecl__)) iswgraph(wint_t _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iswgraph_l(wint_t _C, _locale_t _Locale);
int __attribute__((__cdecl__)) iswcntrl(wint_t _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iswcntrl_l(wint_t _C, _locale_t _Locale);
int __attribute__((__cdecl__)) iswascii(wint_t _C);
int __attribute__((__cdecl__)) isleadbyte(int _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _isleadbyte_l(int _C, _locale_t _Locale);
wint_t __attribute__((__cdecl__)) towupper(wint_t _C);
__attribute__((__dllimport__)) wint_t __attribute__((__cdecl__)) _towupper_l(wint_t _C, _locale_t _Locale);
wint_t __attribute__((__cdecl__)) towlower(wint_t _C);
__attribute__((__dllimport__)) wint_t __attribute__((__cdecl__)) _towlower_l(wint_t _C, _locale_t _Locale);
int __attribute__((__cdecl__)) iswctype(wint_t _C, wctype_t _Type);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iswctype_l(wint_t _C, wctype_t _Type, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) __iswcsymf(wint_t _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iswcsymf_l(wint_t _C, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) __iswcsym(wint_t _C);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _iswcsym_l(wint_t _C, _locale_t _Locale);
int __attribute__((__cdecl__)) is_wctype(wint_t _C, wctype_t _Type);
int __attribute__((__cdecl__)) iswblank(wint_t _C);
extern int *__imp___mb_cur_max;
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) ___mb_cur_max_func(void);
void __faststorefence(void);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __faststorefence(void)
{
__builtin_ia32_sfence();
}
__extension__ void __stosq(unsigned long long *, unsigned long long, size_t);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __stosq(unsigned long long *Dest, unsigned long long Data, size_t Count) { __asm__ __volatile__("rep stos{"
"q|q"
"}"
: "+D"(Dest), "+c"(Count)
: [ Data ] "a"(Data)
: "memory"); }
__extension__ unsigned char _interlockedbittestandset64(long long volatile *a, long long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _interlockedbittestandset64(long long volatile *Base, long long Offset)
{
unsigned char old;
__asm__ __volatile__("lock bts{q %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+m"(*Base)
: [ Offset ] "J"
"r"(Offset)
: "memory");
return old;
}
__extension__ unsigned char _interlockedbittestandreset64(long long volatile *a, long long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _interlockedbittestandreset64(long long volatile *Base, long long Offset)
{
unsigned char old;
__asm__ __volatile__("lock btr{q %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+m"(*Base)
: [ Offset ] "J"
"r"(Offset)
: "memory");
return old;
}
__extension__ unsigned char _interlockedbittestandcomplement64(long long volatile *a, long long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _interlockedbittestandcomplement64(long long volatile *Base, long long Offset)
{
unsigned char old;
__asm__ __volatile__("lock btc{q %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+m"(*Base)
: [ Offset ] "J"
"r"(Offset)
: "memory");
return old;
}
__extension__ unsigned char InterlockedBitTestAndSet64(volatile long long *a, long long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char InterlockedBitTestAndSet64(long long volatile *Base, long long Offset)
{
unsigned char old;
__asm__ __volatile__("lock bts{q %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+m"(*Base)
: [ Offset ] "J"
"r"(Offset)
: "memory");
return old;
}
__extension__ unsigned char InterlockedBitTestAndReset64(volatile long long *a, long long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char InterlockedBitTestAndReset64(long long volatile *Base, long long Offset)
{
unsigned char old;
__asm__ __volatile__("lock btr{q %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+m"(*Base)
: [ Offset ] "J"
"r"(Offset)
: "memory");
return old;
}
__extension__ unsigned char InterlockedBitTestAndComplement64(volatile long long *a, long long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char InterlockedBitTestAndComplement64(long long volatile *Base, long long Offset)
{
unsigned char old;
__asm__ __volatile__("lock btc{q %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+m"(*Base)
: [ Offset ] "J"
"r"(Offset)
: "memory");
return old;
}
__extension__ long long _InterlockedAnd64(long long volatile *, long long);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long long _InterlockedAnd64(volatile long long *Destination, long long Value) { return __sync_fetch_and_and(Destination, Value); }
__extension__ long long _InterlockedOr64(long long volatile *, long long);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long long _InterlockedOr64(volatile long long *Destination, long long Value) { return __sync_fetch_and_or(Destination, Value); }
__extension__ long long _InterlockedXor64(long long volatile *, long long);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long long _InterlockedXor64(volatile long long *Destination, long long Value) { return __sync_fetch_and_xor(Destination, Value); }
__extension__ long long _InterlockedIncrement64(long long volatile *Addend);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long long _InterlockedIncrement64(long long volatile *Addend)
{
return __sync_add_and_fetch(Addend, 1);
}
__extension__ long long _InterlockedDecrement64(long long volatile *Addend);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long long _InterlockedDecrement64(long long volatile *Addend)
{
return __sync_sub_and_fetch(Addend, 1);
}
__extension__ long long _InterlockedExchange64(long long volatile *Target, long long Value);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long long _InterlockedExchange64(long long volatile *Target, long long Value)
{
return __sync_lock_test_and_set(Target, Value);
}
__extension__ long long _InterlockedExchangeAdd64(long long volatile *Addend, long long Value);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long long _InterlockedExchangeAdd64(long long volatile *Addend, long long Value)
{
return __sync_fetch_and_add(Addend, Value);
}
unsigned char __readgsbyte(unsigned long Offset);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char __readgsbyte(unsigned long Offset)
{
unsigned char ret;
__asm__("mov{"
"b"
" %%"
"gs"
":%[offset], %[ret] | %[ret], %%"
"gs"
":%[offset]}"
: [ ret ] "=r"(ret)
: [ offset ] "m"((*(unsigned char *)(size_t)Offset)));
return ret;
}
unsigned short __readgsword(unsigned long Offset);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned short __readgsword(unsigned long Offset)
{
unsigned short ret;
__asm__("mov{"
"w"
" %%"
"gs"
":%[offset], %[ret] | %[ret], %%"
"gs"
":%[offset]}"
: [ ret ] "=r"(ret)
: [ offset ] "m"((*(unsigned short *)(size_t)Offset)));
return ret;
}
unsigned long __readgsdword(unsigned long Offset);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned long __readgsdword(unsigned long Offset)
{
unsigned long ret;
__asm__("mov{"
"l"
" %%"
"gs"
":%[offset], %[ret] | %[ret], %%"
"gs"
":%[offset]}"
: [ ret ] "=r"(ret)
: [ offset ] "m"((*(unsigned long *)(size_t)Offset)));
return ret;
}
__extension__ unsigned long long __readgsqword(unsigned long Offset);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned long long __readgsqword(unsigned long Offset)
{
unsigned long long ret;
__asm__("mov{"
"q"
" %%"
"gs"
":%[offset], %[ret] | %[ret], %%"
"gs"
":%[offset]}"
: [ ret ] "=r"(ret)
: [ offset ] "m"((*(unsigned long long *)(size_t)Offset)));
return ret;
}
void __writegsbyte(unsigned long Offset, unsigned char Data);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __writegsbyte(unsigned long Offset, unsigned char Data) { __asm__("mov{"
"b"
" %[Data], %%"
"gs"
":%[offset] | %%"
"gs"
":%[offset], %[Data]}"
: [ offset ] "=m"((*(unsigned char *)(size_t)Offset))
: [ Data ] "ri"(Data)); }
void __writegsword(unsigned long Offset, unsigned short Data);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __writegsword(unsigned long Offset, unsigned short Data) { __asm__("mov{"
"w"
" %[Data], %%"
"gs"
":%[offset] | %%"
"gs"
":%[offset], %[Data]}"
: [ offset ] "=m"((*(unsigned short *)(size_t)Offset))
: [ Data ] "ri"(Data)); }
void __writegsdword(unsigned long Offset, unsigned long Data);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __writegsdword(unsigned long Offset, unsigned long Data) { __asm__("mov{"
"l"
" %[Data], %%"
"gs"
":%[offset] | %%"
"gs"
":%[offset], %[Data]}"
: [ offset ] "=m"((*(unsigned long *)(size_t)Offset))
: [ Data ] "ri"(Data)); }
__extension__ void __writegsqword(unsigned long Offset, unsigned long long Data);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __writegsqword(unsigned long Offset, unsigned long long Data) { __asm__("mov{"
"q"
" %[Data], %%"
"gs"
":%[offset] | %%"
"gs"
":%[offset], %[Data]}"
: [ offset ] "=m"((*(unsigned long long *)(size_t)Offset))
: [ Data ] "ri"(Data)); }
__extension__ unsigned char _BitScanForward64(unsigned long *Index, unsigned long long Mask);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _BitScanForward64(unsigned long *Index, unsigned long long Mask)
{
unsigned long long n;
unsigned char old;
__asm__("bsf{q %[Mask],%[Index] | %[Index],%[Mask]}"
: "=@ccnz"(old), [ Index ] "=r"(n)
: [ Mask ] "r"(Mask));
*Index = n;
return old;
}
__extension__ unsigned char _BitScanReverse64(unsigned long *Index, unsigned long long Mask);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _BitScanReverse64(unsigned long *Index, unsigned long long Mask)
{
unsigned long long n;
unsigned char old;
__asm__("bsr{q %[Mask],%[Index] | %[Index],%[Mask]}"
: "=@ccnz"(old), [ Index ] "=r"(n)
: [ Mask ] "r"(Mask));
*Index = n;
return old;
}
__extension__ unsigned char _bittest64(long long const *a, long long b);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _bittest64(const long long *Base, long long Offset)
{
unsigned char old;
__asm__("bt{"
"q"
" %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old)
: [ Offset ] "J"
"r"(Offset),
[ Base ] "rm"(*Base)
:);
return old;
}
__extension__ unsigned char _bittestandset64(long long *a, long long b);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _bittestandset64(long long *Base, long long Offset)
{
unsigned char old;
__asm__("bts"
"{"
"q"
" %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+rm"(*Base)
: [ Offset ] "J"
"r"(Offset)
:);
return old;
}
__extension__ unsigned char _bittestandreset64(long long *a, long long b);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _bittestandreset64(long long *Base, long long Offset)
{
unsigned char old;
__asm__("btr"
"{"
"q"
" %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+rm"(*Base)
: [ Offset ] "J"
"r"(Offset)
:);
return old;
}
__extension__ unsigned char _bittestandcomplement64(long long *a, long long b);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _bittestandcomplement64(long long *Base, long long Offset)
{
unsigned char old;
__asm__("btc"
"{"
"q"
" %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+rm"(*Base)
: [ Offset ] "J"
"r"(Offset)
:);
return old;
}
__extension__ void __movsq(unsigned long long *Dest, unsigned long long const *Source, size_t Count);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __movsq(unsigned long long *Destination, unsigned long long const *Source, size_t Count) { __asm__ __volatile__("rep movs"
"q"
: "=D"(Destination), "=S"(Source), "=c"(Count)
: "0"(Destination), "1"(Source), "2"(Count)
: "memory"); }
long _InterlockedAnd(long volatile *, long);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long _InterlockedAnd(volatile long *Destination, long Value) { return __sync_fetch_and_and(Destination, Value); }
long _InterlockedOr(long volatile *, long);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long _InterlockedOr(volatile long *Destination, long Value) { return __sync_fetch_and_or(Destination, Value); }
long _InterlockedXor(long volatile *, long);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long _InterlockedXor(volatile long *Destination, long Value) { return __sync_fetch_and_xor(Destination, Value); }
short _InterlockedIncrement16(short volatile *Addend);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) short _InterlockedIncrement16(short volatile *Addend)
{
return __sync_add_and_fetch(Addend, 1);
}
short _InterlockedDecrement16(short volatile *Addend);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) short _InterlockedDecrement16(short volatile *Addend)
{
return __sync_sub_and_fetch(Addend, 1);
}
short _InterlockedCompareExchange16(short volatile *Destination, short ExChange, short Comperand);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) short _InterlockedCompareExchange16(short volatile *Destination, short ExChange, short Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, ExChange);
}
long _InterlockedExchangeAdd(long volatile *Addend, long Value);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long _InterlockedExchangeAdd(long volatile *Addend, long Value)
{
return __sync_fetch_and_add(Addend, Value);
}
long _InterlockedCompareExchange(long volatile *Destination, long ExChange, long Comperand);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long _InterlockedCompareExchange(long volatile *Destination, long ExChange, long Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, ExChange);
}
long _InterlockedIncrement(long volatile *Addend);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long _InterlockedIncrement(long volatile *Addend)
{
return __sync_add_and_fetch(Addend, 1);
}
long _InterlockedDecrement(long volatile *Addend);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long _InterlockedDecrement(long volatile *Addend)
{
return __sync_sub_and_fetch(Addend, 1);
}
long _InterlockedAdd(long volatile *Addend, long Value);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long _InterlockedAdd(long volatile *Addend, long Value)
{
return __sync_add_and_fetch(Addend, Value);
}
__extension__ long long _InterlockedAdd64(long long volatile *Addend, long long Value);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long long _InterlockedAdd64(long long volatile *Addend, long long Value)
{
return __sync_add_and_fetch(Addend, Value);
}
long _InterlockedExchange(long volatile *Target, long Value);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long _InterlockedExchange(long volatile *Target, long Value)
{
return __sync_lock_test_and_set(Target, Value);
}
__extension__ long long _InterlockedCompareExchange64(long long volatile *Destination, long long ExChange, long long Comperand);
__extension__ extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long long _InterlockedCompareExchange64(long long volatile *Destination, long long ExChange, long long Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, ExChange);
}
void *_InterlockedCompareExchangePointer(void *volatile *Destination, void *ExChange, void *Comperand);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void *_InterlockedCompareExchangePointer(void *volatile *Destination, void *ExChange, void *Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, ExChange);
}
void *_InterlockedExchangePointer(void *volatile *Target, void *Value);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void *_InterlockedExchangePointer(void *volatile *Target, void *Value)
{
return __sync_lock_test_and_set(Target, Value);
}
void __int2c(void);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __int2c(void)
{
__asm__ __volatile__("int {$}"
"0x2c"
:);
}
void __stosb(unsigned char *, unsigned char, size_t);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __stosb(unsigned char *Dest, unsigned char Data, size_t Count) { __asm__ __volatile__("rep stos{"
"b|b"
"}"
: "+D"(Dest), "+c"(Count)
: [ Data ] "a"(Data)
: "memory"); }
void __stosw(unsigned short *, unsigned short, size_t);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __stosw(unsigned short *Dest, unsigned short Data, size_t Count) { __asm__ __volatile__("rep stos{"
"w|w"
"}"
: "+D"(Dest), "+c"(Count)
: [ Data ] "a"(Data)
: "memory"); }
void __stosd(unsigned long *, unsigned long, size_t);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __stosd(unsigned long *Dest, unsigned long Data, size_t Count) { __asm__ __volatile__("rep stos{"
"l|d"
"}"
: "+D"(Dest), "+c"(Count)
: [ Data ] "a"(Data)
: "memory"); }
unsigned char _interlockedbittestandset(long volatile *a, long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _interlockedbittestandset(long volatile *Base, long Offset)
{
unsigned char old;
__asm__ __volatile__("lock bts{l %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+m"(*Base)
: [ Offset ] "I"
"r"(Offset)
: "memory");
return old;
}
unsigned char _interlockedbittestandreset(long volatile *a, long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _interlockedbittestandreset(long volatile *Base, long Offset)
{
unsigned char old;
__asm__ __volatile__("lock btr{l %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+m"(*Base)
: [ Offset ] "I"
"r"(Offset)
: "memory");
return old;
}
unsigned char _interlockedbittestandcomplement(long volatile *a, long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _interlockedbittestandcomplement(long volatile *Base, long Offset)
{
unsigned char old;
__asm__ __volatile__("lock btc{l %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+m"(*Base)
: [ Offset ] "I"
"r"(Offset)
: "memory");
return old;
}
unsigned char InterlockedBitTestAndSet(volatile long *a, long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char InterlockedBitTestAndSet(long volatile *Base, long Offset)
{
unsigned char old;
__asm__ __volatile__("lock bts{l %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+m"(*Base)
: [ Offset ] "I"
"r"(Offset)
: "memory");
return old;
}
unsigned char InterlockedBitTestAndReset(volatile long *a, long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char InterlockedBitTestAndReset(long volatile *Base, long Offset)
{
unsigned char old;
__asm__ __volatile__("lock btr{l %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+m"(*Base)
: [ Offset ] "I"
"r"(Offset)
: "memory");
return old;
}
unsigned char InterlockedBitTestAndComplement(volatile long *a, long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char InterlockedBitTestAndComplement(long volatile *Base, long Offset)
{
unsigned char old;
__asm__ __volatile__("lock btc{l %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+m"(*Base)
: [ Offset ] "I"
"r"(Offset)
: "memory");
return old;
}
unsigned char _BitScanForward(unsigned long *Index, unsigned long Mask);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _BitScanForward(unsigned long *Index, unsigned long Mask)
{
unsigned long n;
unsigned char old;
__asm__("bsf{l %[Mask],%[Index] | %[Index],%[Mask]}"
: "=@ccnz"(old), [ Index ] "=r"(n)
: [ Mask ] "r"(Mask));
*Index = n;
return old;
}
unsigned char _BitScanReverse(unsigned long *Index, unsigned long Mask);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _BitScanReverse(unsigned long *Index, unsigned long Mask)
{
unsigned long n;
unsigned char old;
__asm__("bsr{l %[Mask],%[Index] | %[Index],%[Mask]}"
: "=@ccnz"(old), [ Index ] "=r"(n)
: [ Mask ] "r"(Mask));
*Index = n;
return old;
}
unsigned char _bittest(long const *a, long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _bittest(const long *Base, long Offset)
{
unsigned char old;
__asm__("bt{"
"l"
" %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old)
: [ Offset ] "I"
"r"(Offset),
[ Base ] "rm"(*Base)
:);
return old;
}
unsigned char _bittestandset(long *a, long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _bittestandset(long *Base, long Offset)
{
unsigned char old;
__asm__("bts"
"{"
"l"
" %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+rm"(*Base)
: [ Offset ] "I"
"r"(Offset)
:);
return old;
}
unsigned char _bittestandreset(long *a, long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _bittestandreset(long *Base, long Offset)
{
unsigned char old;
__asm__("btr"
"{"
"l"
" %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+rm"(*Base)
: [ Offset ] "I"
"r"(Offset)
:);
return old;
}
unsigned char _bittestandcomplement(long *a, long b);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) unsigned char _bittestandcomplement(long *Base, long Offset)
{
unsigned char old;
__asm__("btc"
"{"
"l"
" %[Offset],%[Base] | %[Base],%[Offset]}"
: [ old ] "=@ccc"(old), [ Base ] "+rm"(*Base)
: [ Offset ] "I"
"r"(Offset)
:);
return old;
}
void __movsb(unsigned char *Destination, unsigned char const *Source, size_t Count);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __movsb(unsigned char *Destination, unsigned char const *Source, size_t Count) { __asm__ __volatile__("rep movs"
"b"
: "=D"(Destination), "=S"(Source), "=c"(Count)
: "0"(Destination), "1"(Source), "2"(Count)
: "memory"); }
void __movsw(unsigned short *Dest, unsigned short const *Source, size_t Count);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __movsw(unsigned short *Destination, unsigned short const *Source, size_t Count) { __asm__ __volatile__("rep movs"
"w"
: "=D"(Destination), "=S"(Source), "=c"(Count)
: "0"(Destination), "1"(Source), "2"(Count)
: "memory"); }
void __movsd(unsigned long *Dest, unsigned long const *Source, size_t Count);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void __movsd(unsigned long *Destination, unsigned long const *Source, size_t Count) { __asm__ __volatile__("rep movs"
"d"
: "=D"(Destination), "=S"(Source), "=c"(Count)
: "0"(Destination), "1"(Source), "2"(Count)
: "memory"); }
__extension__ typedef unsigned long long POINTER_64_INT;
typedef signed char INT8, *PINT8;
typedef signed short INT16, *PINT16;
typedef signed int INT32, *PINT32;
__extension__ typedef signed long long INT64, *PINT64;
typedef unsigned char UINT8, *PUINT8;
typedef unsigned short UINT16, *PUINT16;
typedef unsigned int UINT32, *PUINT32;
__extension__ typedef unsigned long long UINT64, *PUINT64;
typedef signed int LONG32, *PLONG32;
typedef unsigned int ULONG32, *PULONG32;
typedef unsigned int DWORD32, *PDWORD32;
__extension__ typedef long long INT_PTR, *PINT_PTR;
__extension__ typedef unsigned long long UINT_PTR, *PUINT_PTR;
__extension__ typedef long long LONG_PTR, *PLONG_PTR;
__extension__ typedef unsigned long long ULONG_PTR, *PULONG_PTR;
__extension__ typedef long long SHANDLE_PTR;
__extension__ typedef unsigned long long HANDLE_PTR;
typedef unsigned int UHALF_PTR, *PUHALF_PTR;
typedef int HALF_PTR, *PHALF_PTR;
static __inline unsigned long HandleToULong(const void *h) { return ((unsigned long)(ULONG_PTR)h); }
static __inline long HandleToLong(const void *h) { return ((long)(LONG_PTR)h); }
static __inline void *ULongToHandle(const unsigned long h) { return ((void *)(UINT_PTR)h); }
static __inline void *LongToHandle(const long h) { return ((void *)(INT_PTR)h); }
static __inline unsigned long PtrToUlong(const void *p) { return ((unsigned long)(ULONG_PTR)p); }
static __inline unsigned int PtrToUint(const void *p) { return ((unsigned int)(UINT_PTR)p); }
static __inline unsigned short PtrToUshort(const void *p) { return ((unsigned short)(unsigned long)(ULONG_PTR)p); }
static __inline long PtrToLong(const void *p) { return ((long)(LONG_PTR)p); }
static __inline int PtrToInt(const void *p) { return ((int)(INT_PTR)p); }
static __inline short PtrToShort(const void *p) { return ((short)(long)(LONG_PTR)p); }
static __inline void *IntToPtr(const int i) { return ((void *)(INT_PTR)i); }
static __inline void *UIntToPtr(const unsigned int ui) { return ((void *)(UINT_PTR)ui); }
static __inline void *LongToPtr(const long l) { return ((void *)(LONG_PTR)l); }
static __inline void *ULongToPtr(const unsigned long ul) { return ((void *)(ULONG_PTR)ul); }
static __inline void *Ptr32ToPtr(const void *p) { return ((void *)(ULONG_PTR)(unsigned long)(ULONG_PTR)p); }
static __inline void *Handle32ToHandle(const void *h) { return ((void *)(LONG_PTR)(long)(ULONG_PTR)h); }
static __inline void *PtrToPtr32(const void *p) { return ((void *)(ULONG_PTR)(unsigned long)(ULONG_PTR)p); }
__extension__ typedef ULONG_PTR SIZE_T, *PSIZE_T;
__extension__ typedef LONG_PTR SSIZE_T, *PSSIZE_T;
__extension__ typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
__extension__ typedef long long LONG64, *PLONG64;
__extension__ typedef unsigned long long ULONG64, *PULONG64;
__extension__ typedef unsigned long long DWORD64, *PDWORD64;
__extension__ typedef ULONG_PTR KAFFINITY;
__extension__ typedef KAFFINITY *PKAFFINITY;
typedef void *PVOID;
typedef void *PVOID64;
typedef char CHAR;
typedef short SHORT;
typedef long LONG;
typedef int INT;
typedef wchar_t WCHAR;
typedef WCHAR *PWCHAR, *LPWCH, *PWCH;
typedef const WCHAR *LPCWCH, *PCWCH;
typedef WCHAR *NWPSTR, *LPWSTR, *PWSTR;
typedef PWSTR *PZPWSTR;
typedef const PWSTR *PCZPWSTR;
typedef WCHAR *LPUWSTR, *PUWSTR;
typedef const WCHAR *LPCWSTR, *PCWSTR;
typedef PCWSTR *PZPCWSTR;
typedef const WCHAR *LPCUWSTR, *PCUWSTR;
typedef WCHAR *PZZWSTR;
typedef const WCHAR *PCZZWSTR;
typedef WCHAR *PUZZWSTR;
typedef const WCHAR *PCUZZWSTR;
typedef WCHAR *PNZWCH;
typedef const WCHAR *PCNZWCH;
typedef WCHAR *PUNZWCH;
typedef const WCHAR *PCUNZWCH;
typedef const WCHAR *LPCWCHAR, *PCWCHAR;
typedef const WCHAR *LPCUWCHAR, *PCUWCHAR;
typedef unsigned long UCSCHAR;
typedef UCSCHAR *PUCSCHAR;
typedef const UCSCHAR *PCUCSCHAR;
typedef UCSCHAR *PUCSSTR;
typedef UCSCHAR *PUUCSSTR;
typedef const UCSCHAR *PCUCSSTR;
typedef const UCSCHAR *PCUUCSSTR;
typedef UCSCHAR *PUUCSCHAR;
typedef const UCSCHAR *PCUUCSCHAR;
typedef CHAR *PCHAR, *LPCH, *PCH;
typedef const CHAR *LPCCH, *PCCH;
typedef CHAR *NPSTR, *LPSTR, *PSTR;
typedef PSTR *PZPSTR;
typedef const PSTR *PCZPSTR;
typedef const CHAR *LPCSTR, *PCSTR;
typedef PCSTR *PZPCSTR;
typedef CHAR *PZZSTR;
typedef const CHAR *PCZZSTR;
typedef CHAR *PNZCH;
typedef const CHAR *PCNZCH;
typedef WCHAR TCHAR, *PTCHAR;
typedef WCHAR TBYTE, *PTBYTE;
typedef LPWSTR LPTCH, PTCH;
typedef LPWSTR PTSTR, LPTSTR;
typedef LPCWSTR PCTSTR, LPCTSTR;
typedef LPUWSTR PUTSTR, LPUTSTR;
typedef LPCUWSTR PCUTSTR, LPCUTSTR;
typedef LPWSTR LP;
typedef PZZWSTR PZZTSTR;
typedef PCZZWSTR PCZZTSTR;
typedef PUZZWSTR PUZZTSTR;
typedef PCUZZWSTR PCUZZTSTR;
typedef PZPWSTR PZPTSTR;
typedef PNZWCH PNZTCH;
typedef PCNZWCH PCNZTCH;
typedef PUNZWCH PUNZTCH;
typedef PCUNZWCH PCUNZTCH;
typedef SHORT *PSHORT;
typedef LONG *PLONG;
typedef struct _GROUP_AFFINITY
{
KAFFINITY Mask;
WORD Group;
WORD Reserved[3];
} GROUP_AFFINITY, *PGROUP_AFFINITY;
typedef void *HANDLE;
typedef HANDLE *PHANDLE;
typedef BYTE FCHAR;
typedef WORD FSHORT;
typedef DWORD FLONG;
typedef LONG HRESULT;
typedef char CCHAR;
typedef DWORD LCID;
typedef PDWORD PLCID;
typedef WORD LANGID;
typedef enum
{
UNSPECIFIED_COMPARTMENT_ID = 0,
DEFAULT_COMPARTMENT_ID
} COMPARTMENT_ID,
*PCOMPARTMENT_ID;
typedef struct _FLOAT128
{
__extension__ long long LowPart;
__extension__ long long HighPart;
} FLOAT128;
typedef FLOAT128 *PFLOAT128;
__extension__ typedef long long LONGLONG;
__extension__ typedef unsigned long long ULONGLONG;
typedef LONGLONG *PLONGLONG;
typedef ULONGLONG *PULONGLONG;
typedef LONGLONG USN;
typedef union _LARGE_INTEGER {
__extension__ struct
{
DWORD LowPart;
LONG HighPart;
};
struct
{
DWORD LowPart;
LONG HighPart;
} u;
LONGLONG QuadPart;
} LARGE_INTEGER;
typedef LARGE_INTEGER *PLARGE_INTEGER;
typedef union _ULARGE_INTEGER {
__extension__ struct
{
DWORD LowPart;
DWORD HighPart;
};
struct
{
DWORD LowPart;
DWORD HighPart;
} u;
ULONGLONG QuadPart;
} ULARGE_INTEGER;
typedef ULARGE_INTEGER *PULARGE_INTEGER;
typedef struct _LUID
{
DWORD LowPart;
LONG HighPart;
} LUID, *PLUID;
typedef ULONGLONG DWORDLONG;
typedef DWORDLONG *PDWORDLONG;
unsigned char __attribute__((__cdecl__)) _rotl8(unsigned char Value, unsigned char Shift);
unsigned short __attribute__((__cdecl__)) _rotl16(unsigned short Value, unsigned char Shift);
unsigned char __attribute__((__cdecl__)) _rotr8(unsigned char Value, unsigned char Shift);
unsigned short __attribute__((__cdecl__)) _rotr16(unsigned short Value, unsigned char Shift);
unsigned int __attribute__((__cdecl__)) _rotl(unsigned int Value, int Shift);
unsigned int __attribute__((__cdecl__)) _rotr(unsigned int Value, int Shift);
__extension__ unsigned long long __attribute__((__cdecl__)) _rotl64(unsigned long long Value, int Shift);
__extension__ unsigned long long __attribute__((__cdecl__)) _rotr64(unsigned long long Value, int Shift);
typedef BYTE BOOLEAN;
typedef BOOLEAN *PBOOLEAN;
typedef struct _LIST_ENTRY
{
struct _LIST_ENTRY *Flink;
struct _LIST_ENTRY *Blink;
} LIST_ENTRY, *PLIST_ENTRY, *PRLIST_ENTRY;
typedef struct _SINGLE_LIST_ENTRY
{
struct _SINGLE_LIST_ENTRY *Next;
} SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;
typedef struct LIST_ENTRY32
{
DWORD Flink;
DWORD Blink;
} LIST_ENTRY32;
typedef LIST_ENTRY32 *PLIST_ENTRY32;
typedef struct LIST_ENTRY64
{
ULONGLONG Flink;
ULONGLONG Blink;
} LIST_ENTRY64;
typedef LIST_ENTRY64 *PLIST_ENTRY64;
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
typedef GUID *LPGUID;
typedef const GUID *LPCGUID;
typedef GUID IID;
typedef IID *LPIID;
typedef GUID CLSID;
typedef CLSID *LPCLSID;
typedef GUID FMTID;
typedef FMTID *LPFMTID;
__attribute__((__dllimport__)) void *__attribute__((__cdecl__)) _memccpy(void *_Dst, const void *_Src, int _Val, size_t _MaxCount);
void *__attribute__((__cdecl__)) memchr(const void *_Buf, int _Val, size_t _MaxCount);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _memicmp(const void *_Buf1, const void *_Buf2, size_t _Size);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _memicmp_l(const void *_Buf1, const void *_Buf2, size_t _Size, _locale_t _Locale);
int __attribute__((__cdecl__)) memcmp(const void *_Buf1, const void *_Buf2, size_t _Size);
void *__attribute__((__cdecl__)) memcpy(void *__restrict__ _Dst, const void *__restrict__ _Src, size_t _Size);
__attribute__((dllimport)) errno_t __attribute__((__cdecl__)) memcpy_s(void *_dest, size_t _numberOfElements, const void *_src, size_t _count);
void *__attribute__((__cdecl__)) mempcpy(void *_Dst, const void *_Src, size_t _Size);
void *__attribute__((__cdecl__)) memset(void *_Dst, int _Val, size_t _Size);
void *__attribute__((__cdecl__)) memccpy(void *_Dst, const void *_Src, int _Val, size_t _Size);
int __attribute__((__cdecl__)) memicmp(const void *_Buf1, const void *_Buf2, size_t _Size);
char *__attribute__((__cdecl__)) _strset(char *_Str, int _Val);
char *__attribute__((__cdecl__)) _strset_l(char *_Str, int _Val, _locale_t _Locale);
char *__attribute__((__cdecl__)) strcpy(char *__restrict__ _Dest, const char *__restrict__ _Source);
char *__attribute__((__cdecl__)) strcat(char *__restrict__ _Dest, const char *__restrict__ _Source);
int __attribute__((__cdecl__)) strcmp(const char *_Str1, const char *_Str2);
size_t __attribute__((__cdecl__)) strlen(const char *_Str);
size_t __attribute__((__cdecl__)) strnlen(const char *_Str, size_t _MaxCount);
void *__attribute__((__cdecl__)) memmove(void *_Dst, const void *_Src, size_t _Size);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _strdup(const char *_Src);
char *__attribute__((__cdecl__)) strchr(const char *_Str, int _Val);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _stricmp(const char *_Str1, const char *_Str2);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _strcmpi(const char *_Str1, const char *_Str2);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _stricmp_l(const char *_Str1, const char *_Str2, _locale_t _Locale);
int __attribute__((__cdecl__)) strcoll(const char *_Str1, const char *_Str2);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _strcoll_l(const char *_Str1, const char *_Str2, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _stricoll(const char *_Str1, const char *_Str2);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _stricoll_l(const char *_Str1, const char *_Str2, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _strncoll(const char *_Str1, const char *_Str2, size_t _MaxCount);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _strncoll_l(const char *_Str1, const char *_Str2, size_t _MaxCount, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _strnicoll(const char *_Str1, const char *_Str2, size_t _MaxCount);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _strnicoll_l(const char *_Str1, const char *_Str2, size_t _MaxCount, _locale_t _Locale);
size_t __attribute__((__cdecl__)) strcspn(const char *_Str, const char *_Control);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _strerror(const char *_ErrMsg);
char *__attribute__((__cdecl__)) strerror(int);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _strlwr(char *_String);
char *strlwr_l(char *_String, _locale_t _Locale);
char *__attribute__((__cdecl__)) strncat(char *__restrict__ _Dest, const char *__restrict__ _Source, size_t _Count);
int __attribute__((__cdecl__)) strncmp(const char *_Str1, const char *_Str2, size_t _MaxCount);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _strnicmp(const char *_Str1, const char *_Str2, size_t _MaxCount);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _strnicmp_l(const char *_Str1, const char *_Str2, size_t _MaxCount, _locale_t _Locale);
char *strncpy(char *__restrict__ _Dest, const char *__restrict__ _Source, size_t _Count);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _strnset(char *_Str, int _Val, size_t _MaxCount);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _strnset_l(char *str, int c, size_t count, _locale_t _Locale);
char *__attribute__((__cdecl__)) strpbrk(const char *_Str, const char *_Control);
char *__attribute__((__cdecl__)) strrchr(const char *_Str, int _Ch);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _strrev(char *_Str);
size_t __attribute__((__cdecl__)) strspn(const char *_Str, const char *_Control);
char *__attribute__((__cdecl__)) strstr(const char *_Str, const char *_SubStr);
char *__attribute__((__cdecl__)) strtok(char *__restrict__ _Str, const char *__restrict__ _Delim);
char *strtok_r(char *__restrict__ _Str, const char *__restrict__ _Delim, char **__restrict__ __last);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _strupr(char *_String);
__attribute__((__dllimport__)) char *_strupr_l(char *_String, _locale_t _Locale);
size_t __attribute__((__cdecl__)) strxfrm(char *__restrict__ _Dst, const char *__restrict__ _Src, size_t _MaxCount);
__attribute__((__dllimport__)) size_t __attribute__((__cdecl__)) _strxfrm_l(char *__restrict__ _Dst, const char *__restrict__ _Src, size_t _MaxCount, _locale_t _Locale);
char *__attribute__((__cdecl__)) strdup(const char *_Src);
int __attribute__((__cdecl__)) strcmpi(const char *_Str1, const char *_Str2);
int __attribute__((__cdecl__)) stricmp(const char *_Str1, const char *_Str2);
char *__attribute__((__cdecl__)) strlwr(char *_Str);
int __attribute__((__cdecl__)) strnicmp(const char *_Str1, const char *_Str, size_t _MaxCount);
int __attribute__((__cdecl__)) strncasecmp(const char *, const char *, size_t);
int __attribute__((__cdecl__)) strcasecmp(const char *, const char *);
char *__attribute__((__cdecl__)) strnset(char *_Str, int _Val, size_t _MaxCount);
char *__attribute__((__cdecl__)) strrev(char *_Str);
char *__attribute__((__cdecl__)) strset(char *_Str, int _Val);
char *__attribute__((__cdecl__)) strupr(char *_Str);
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsdup(const wchar_t *_Str);
wchar_t *__attribute__((__cdecl__)) wcscat(wchar_t *__restrict__ _Dest, const wchar_t *__restrict__ _Source);
wchar_t *__attribute__((__cdecl__)) wcschr(const wchar_t *_Str, wchar_t _Ch);
int __attribute__((__cdecl__)) wcscmp(const wchar_t *_Str1, const wchar_t *_Str2);
wchar_t *__attribute__((__cdecl__)) wcscpy(wchar_t *__restrict__ _Dest, const wchar_t *__restrict__ _Source);
size_t __attribute__((__cdecl__)) wcscspn(const wchar_t *_Str, const wchar_t *_Control);
size_t __attribute__((__cdecl__)) wcslen(const wchar_t *_Str);
size_t __attribute__((__cdecl__)) wcsnlen(const wchar_t *_Src, size_t _MaxCount);
wchar_t *wcsncat(wchar_t *__restrict__ _Dest, const wchar_t *__restrict__ _Source, size_t _Count);
int __attribute__((__cdecl__)) wcsncmp(const wchar_t *_Str1, const wchar_t *_Str2, size_t _MaxCount);
wchar_t *wcsncpy(wchar_t *__restrict__ _Dest, const wchar_t *__restrict__ _Source, size_t _Count);
wchar_t *__attribute__((__cdecl__)) _wcsncpy_l(wchar_t *__restrict__ _Dest, const wchar_t *__restrict__ _Source, size_t _Count, _locale_t _Locale);
wchar_t *__attribute__((__cdecl__)) wcspbrk(const wchar_t *_Str, const wchar_t *_Control);
wchar_t *__attribute__((__cdecl__)) wcsrchr(const wchar_t *_Str, wchar_t _Ch);
size_t __attribute__((__cdecl__)) wcsspn(const wchar_t *_Str, const wchar_t *_Control);
wchar_t *__attribute__((__cdecl__)) wcsstr(const wchar_t *_Str, const wchar_t *_SubStr);
wchar_t *__attribute__((__cdecl__)) wcstok(wchar_t *__restrict__ _Str, const wchar_t *__restrict__ _Delim);
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcserror(int _ErrNum);
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) __wcserror(const wchar_t *_Str);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wcsicmp(const wchar_t *_Str1, const wchar_t *_Str2);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wcsicmp_l(const wchar_t *_Str1, const wchar_t *_Str2, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicmp(const wchar_t *_Str1, const wchar_t *_Str2, size_t _MaxCount);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicmp_l(const wchar_t *_Str1, const wchar_t *_Str2, size_t _MaxCount, _locale_t _Locale);
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsnset(wchar_t *_Str, wchar_t _Val, size_t _MaxCount);
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsrev(wchar_t *_Str);
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsset(wchar_t *_Str, wchar_t _Val);
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcslwr(wchar_t *_String);
__attribute__((__dllimport__)) wchar_t *_wcslwr_l(wchar_t *_String, _locale_t _Locale);
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsupr(wchar_t *_String);
__attribute__((__dllimport__)) wchar_t *_wcsupr_l(wchar_t *_String, _locale_t _Locale);
size_t __attribute__((__cdecl__)) wcsxfrm(wchar_t *__restrict__ _Dst, const wchar_t *__restrict__ _Src, size_t _MaxCount);
__attribute__((__dllimport__)) size_t __attribute__((__cdecl__)) _wcsxfrm_l(wchar_t *__restrict__ _Dst, const wchar_t *__restrict__ _Src, size_t _MaxCount, _locale_t _Locale);
int __attribute__((__cdecl__)) wcscoll(const wchar_t *_Str1, const wchar_t *_Str2);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wcscoll_l(const wchar_t *_Str1, const wchar_t *_Str2, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wcsicoll(const wchar_t *_Str1, const wchar_t *_Str2);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wcsicoll_l(const wchar_t *_Str1, const wchar_t *_Str2, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wcsncoll(const wchar_t *_Str1, const wchar_t *_Str2, size_t _MaxCount);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wcsncoll_l(const wchar_t *_Str1, const wchar_t *_Str2, size_t _MaxCount, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicoll(const wchar_t *_Str1, const wchar_t *_Str2, size_t _MaxCount);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicoll_l(const wchar_t *_Str1, const wchar_t *_Str2, size_t _MaxCount, _locale_t _Locale);
wchar_t *__attribute__((__cdecl__)) wcsdup(const wchar_t *_Str);
int __attribute__((__cdecl__)) wcsicmp(const wchar_t *_Str1, const wchar_t *_Str2);
int __attribute__((__cdecl__)) wcsnicmp(const wchar_t *_Str1, const wchar_t *_Str2, size_t _MaxCount);
wchar_t *__attribute__((__cdecl__)) wcsnset(wchar_t *_Str, wchar_t _Val, size_t _MaxCount);
wchar_t *__attribute__((__cdecl__)) wcsrev(wchar_t *_Str);
wchar_t *__attribute__((__cdecl__)) wcsset(wchar_t *_Str, wchar_t _Val);
wchar_t *__attribute__((__cdecl__)) wcslwr(wchar_t *_Str);
wchar_t *__attribute__((__cdecl__)) wcsupr(wchar_t *_Str);
int __attribute__((__cdecl__)) wcsicoll(const wchar_t *_Str1, const wchar_t *_Str2);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _strset_s(char *_Dst, size_t _DstSize, int _Value);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _strerror_s(char *_Buf, size_t _SizeInBytes, const char *_ErrMsg);
__attribute__((dllimport)) errno_t __attribute__((__cdecl__)) strerror_s(char *_Buf, size_t _SizeInBytes, int _ErrNum);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _strlwr_s(char *_Str, size_t _Size);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _strlwr_s_l(char *_Str, size_t _Size, _locale_t _Locale);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _strnset_s(char *_Str, size_t _Size, int _Val, size_t _MaxCount);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _strupr_s(char *_Str, size_t _Size);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _strupr_s_l(char *_Str, size_t _Size, _locale_t _Locale);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) strncat_s(char *_Dst, size_t _DstSizeInChars, const char *_Src, size_t _MaxCount);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _strncat_s_l(char *_Dst, size_t _DstSizeInChars, const char *_Src, size_t _MaxCount, _locale_t _Locale);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) strcpy_s(char *_Dst, rsize_t _SizeInBytes, const char *_Src);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) strncpy_s(char *_Dst, size_t _DstSizeInChars, const char *_Src, size_t _MaxCount);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _strncpy_s_l(char *_Dst, size_t _DstSizeInChars, const char *_Src, size_t _MaxCount, _locale_t _Locale);
;
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) strtok_s(char *_Str, const char *_Delim, char **_Context);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _strtok_s_l(char *_Str, const char *_Delim, char **_Context, _locale_t _Locale);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) strcat_s(char *_Dst, rsize_t _SizeInBytes, const char *_Src);
__attribute__((dllimport)) errno_t __attribute__((__cdecl__)) memmove_s(void *_dest, size_t _numberOfElements, const void *_src, size_t _count);
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) wcstok_s(wchar_t *_Str, const wchar_t *_Delim, wchar_t **_Context);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcserror_s(wchar_t *_Buf, size_t _SizeInWords, int _ErrNum);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, const wchar_t *_ErrMsg);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsnset_s(wchar_t *_Dst, size_t _DstSizeInWords, wchar_t _Val, size_t _MaxCount);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsset_s(wchar_t *_Str, size_t _SizeInWords, wchar_t _Val);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcslwr_s(wchar_t *_Str, size_t _SizeInWords);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcslwr_s_l(wchar_t *_Str, size_t _SizeInWords, _locale_t _Locale);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsupr_s(wchar_t *_Str, size_t _Size);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsupr_s_l(wchar_t *_Str, size_t _Size, _locale_t _Locale);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) wcscpy_s(wchar_t *_Dst, rsize_t _SizeInWords, const wchar_t *_Src);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) wcscat_s(wchar_t *_Dst, rsize_t _SizeInWords, const wchar_t *_Src);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) wcsncat_s(wchar_t *_Dst, size_t _DstSizeInChars, const wchar_t *_Src, size_t _MaxCount);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsncat_s_l(wchar_t *_Dst, size_t _DstSizeInChars, const wchar_t *_Src, size_t _MaxCount, _locale_t _Locale);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) wcsncpy_s(wchar_t *_Dst, size_t _DstSizeInChars, const wchar_t *_Src, size_t _MaxCount);
;
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsncpy_s_l(wchar_t *_Dst, size_t _DstSizeInChars, const wchar_t *_Src, size_t _MaxCount, _locale_t _Locale);
;
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcstok_s_l(wchar_t *_Str, const wchar_t *_Delim, wchar_t **_Context, _locale_t _Locale);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsset_s_l(wchar_t *_Str, size_t _SizeInChars, unsigned int _Val, _locale_t _Locale);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsnset_s_l(wchar_t *_Str, size_t _SizeInChars, unsigned int _Val, size_t _Count, _locale_t _Locale);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) size_t __attribute__((__cdecl__)) wcsnlen_s(const wchar_t *_src, size_t _count)
{
return _src ? wcsnlen(_src, _count) : 0;
}
typedef struct _OBJECTID
{
GUID Lineage;
DWORD Uniquifier;
} OBJECTID;
typedef int EXCEPTION_ROUTINE(struct _EXCEPTION_RECORD *ExceptionRecord, PVOID EstablisherFrame, struct _CONTEXT *ContextRecord, PVOID DispatcherContext);
typedef EXCEPTION_ROUTINE *PEXCEPTION_ROUTINE;
typedef ULONG_PTR KSPIN_LOCK;
typedef KSPIN_LOCK *PKSPIN_LOCK;
typedef struct __attribute__((__aligned__(16))) _M128A
{
ULONGLONG Low;
LONGLONG High;
} M128A, *PM128A;
typedef struct __attribute__((__aligned__(16))) _XSAVE_FORMAT
{
WORD ControlWord;
WORD StatusWord;
BYTE TagWord;
BYTE Reserved1;
WORD ErrorOpcode;
DWORD ErrorOffset;
WORD ErrorSelector;
WORD Reserved2;
DWORD DataOffset;
WORD DataSelector;
WORD Reserved3;
DWORD MxCsr;
DWORD MxCsr_Mask;
M128A FloatRegisters[8];
M128A XmmRegisters[16];
BYTE Reserved4[96];
} XSAVE_FORMAT, *PXSAVE_FORMAT;
typedef struct __attribute__((__aligned__(8))) _XSAVE_AREA_HEADER
{
DWORD64 Mask;
DWORD64 Reserved[7];
} XSAVE_AREA_HEADER, *PXSAVE_AREA_HEADER;
typedef struct __attribute__((__aligned__(16))) _XSAVE_AREA
{
XSAVE_FORMAT LegacyState;
XSAVE_AREA_HEADER Header;
} XSAVE_AREA, *PXSAVE_AREA;
typedef struct _XSTATE_CONTEXT
{
DWORD64 Mask;
DWORD Length;
DWORD Reserved1;
PXSAVE_AREA Area;
PVOID Buffer;
} XSTATE_CONTEXT, *PXSTATE_CONTEXT;
typedef struct _SCOPE_TABLE_AMD64
{
DWORD Count;
struct
{
DWORD BeginAddress;
DWORD EndAddress;
DWORD HandlerAddress;
DWORD JumpTarget;
} ScopeRecord[1];
} SCOPE_TABLE_AMD64, *PSCOPE_TABLE_AMD64;
typedef int __m64 __attribute__((__vector_size__(8), __may_alias__));
typedef int __m64_u __attribute__((__vector_size__(8), __may_alias__, __aligned__(1)));
typedef int __v2si __attribute__((__vector_size__(8)));
typedef short __v4hi __attribute__((__vector_size__(8)));
typedef char __v8qi __attribute__((__vector_size__(8)));
typedef long long __v1di __attribute__((__vector_size__(8)));
typedef float __v2sf __attribute__((__vector_size__(8)));
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_empty(void)
{
__builtin_ia32_emms();
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_empty(void)
{
_mm_empty();
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi32_si64(int __i)
{
return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_from_int(int __i)
{
return _mm_cvtsi32_si64(__i);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_from_int64(long long __i)
{
return (__m64)__i;
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi64_m64(long long __i)
{
return (__m64)__i;
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi64x_si64(long long __i)
{
return (__m64)__i;
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_pi64x(long long __i)
{
return (__m64)__i;
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi64_si32(__m64 __i)
{
return __builtin_ia32_vec_ext_v2si((__v2si)__i, 0);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_to_int(__m64 __i)
{
return _mm_cvtsi64_si32(__i);
}
extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_to_int64(__m64 __i)
{
return (long long)__i;
}
extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtm64_si64(__m64 __i)
{
return (long long)__i;
}
extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi64_si64x(__m64 __i)
{
return (long long)__i;
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_packs_pi16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_packsswb(__m64 __m1, __m64 __m2)
{
return _mm_packs_pi16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_packs_pi32(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_packssdw(__m64 __m1, __m64 __m2)
{
return _mm_packs_pi32(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_packs_pu16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_packuswb(__m64 __m1, __m64 __m2)
{
return _mm_packs_pu16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpackhi_pi8(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_punpckhbw(__m64 __m1, __m64 __m2)
{
return _mm_unpackhi_pi8(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpackhi_pi16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_punpckhwd(__m64 __m1, __m64 __m2)
{
return _mm_unpackhi_pi16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpackhi_pi32(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_punpckhdq(__m64 __m1, __m64 __m2)
{
return _mm_unpackhi_pi32(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpacklo_pi8(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_punpcklbw(__m64 __m1, __m64 __m2)
{
return _mm_unpacklo_pi8(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpacklo_pi16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_punpcklwd(__m64 __m1, __m64 __m2)
{
return _mm_unpacklo_pi16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpacklo_pi32(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_punpckldq(__m64 __m1, __m64 __m2)
{
return _mm_unpacklo_pi32(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_add_pi8(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_paddb(__m64 __m1, __m64 __m2)
{
return _mm_add_pi8(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_add_pi16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_paddw(__m64 __m1, __m64 __m2)
{
return _mm_add_pi16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_add_pi32(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_paddd((__v2si)__m1, (__v2si)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_paddd(__m64 __m1, __m64 __m2)
{
return _mm_add_pi32(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_add_si64(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_paddq((__v1di)__m1, (__v1di)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_adds_pi8(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_paddsb((__v8qi)__m1, (__v8qi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_paddsb(__m64 __m1, __m64 __m2)
{
return _mm_adds_pi8(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_adds_pi16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_paddsw((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_paddsw(__m64 __m1, __m64 __m2)
{
return _mm_adds_pi16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_adds_pu8(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_paddusb((__v8qi)__m1, (__v8qi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_paddusb(__m64 __m1, __m64 __m2)
{
return _mm_adds_pu8(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_adds_pu16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_paddusw((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_paddusw(__m64 __m1, __m64 __m2)
{
return _mm_adds_pu16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sub_pi8(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_psubb((__v8qi)__m1, (__v8qi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psubb(__m64 __m1, __m64 __m2)
{
return _mm_sub_pi8(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sub_pi16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_psubw((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psubw(__m64 __m1, __m64 __m2)
{
return _mm_sub_pi16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sub_pi32(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_psubd((__v2si)__m1, (__v2si)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psubd(__m64 __m1, __m64 __m2)
{
return _mm_sub_pi32(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sub_si64(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_psubq((__v1di)__m1, (__v1di)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_subs_pi8(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_psubsb((__v8qi)__m1, (__v8qi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psubsb(__m64 __m1, __m64 __m2)
{
return _mm_subs_pi8(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_subs_pi16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_psubsw((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psubsw(__m64 __m1, __m64 __m2)
{
return _mm_subs_pi16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_subs_pu8(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_psubusb((__v8qi)__m1, (__v8qi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psubusb(__m64 __m1, __m64 __m2)
{
return _mm_subs_pu8(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_subs_pu16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_psubusw((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psubusw(__m64 __m1, __m64 __m2)
{
return _mm_subs_pu16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_madd_pi16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_pmaddwd((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pmaddwd(__m64 __m1, __m64 __m2)
{
return _mm_madd_pi16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_mulhi_pi16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_pmulhw((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pmulhw(__m64 __m1, __m64 __m2)
{
return _mm_mulhi_pi16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_mullo_pi16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_pmullw((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pmullw(__m64 __m1, __m64 __m2)
{
return _mm_mullo_pi16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sll_pi16(__m64 __m, __m64 __count)
{
return (__m64)__builtin_ia32_psllw((__v4hi)__m, (__v4hi)__count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psllw(__m64 __m, __m64 __count)
{
return _mm_sll_pi16(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_slli_pi16(__m64 __m, int __count)
{
return (__m64)__builtin_ia32_psllwi((__v4hi)__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psllwi(__m64 __m, int __count)
{
return _mm_slli_pi16(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sll_pi32(__m64 __m, __m64 __count)
{
return (__m64)__builtin_ia32_pslld((__v2si)__m, (__v2si)__count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pslld(__m64 __m, __m64 __count)
{
return _mm_sll_pi32(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_slli_pi32(__m64 __m, int __count)
{
return (__m64)__builtin_ia32_pslldi((__v2si)__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pslldi(__m64 __m, int __count)
{
return _mm_slli_pi32(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sll_si64(__m64 __m, __m64 __count)
{
return (__m64)__builtin_ia32_psllq((__v1di)__m, (__v1di)__count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psllq(__m64 __m, __m64 __count)
{
return _mm_sll_si64(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_slli_si64(__m64 __m, int __count)
{
return (__m64)__builtin_ia32_psllqi((__v1di)__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psllqi(__m64 __m, int __count)
{
return _mm_slli_si64(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sra_pi16(__m64 __m, __m64 __count)
{
return (__m64)__builtin_ia32_psraw((__v4hi)__m, (__v4hi)__count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psraw(__m64 __m, __m64 __count)
{
return _mm_sra_pi16(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srai_pi16(__m64 __m, int __count)
{
return (__m64)__builtin_ia32_psrawi((__v4hi)__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psrawi(__m64 __m, int __count)
{
return _mm_srai_pi16(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sra_pi32(__m64 __m, __m64 __count)
{
return (__m64)__builtin_ia32_psrad((__v2si)__m, (__v2si)__count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psrad(__m64 __m, __m64 __count)
{
return _mm_sra_pi32(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srai_pi32(__m64 __m, int __count)
{
return (__m64)__builtin_ia32_psradi((__v2si)__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psradi(__m64 __m, int __count)
{
return _mm_srai_pi32(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srl_pi16(__m64 __m, __m64 __count)
{
return (__m64)__builtin_ia32_psrlw((__v4hi)__m, (__v4hi)__count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psrlw(__m64 __m, __m64 __count)
{
return _mm_srl_pi16(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srli_pi16(__m64 __m, int __count)
{
return (__m64)__builtin_ia32_psrlwi((__v4hi)__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psrlwi(__m64 __m, int __count)
{
return _mm_srli_pi16(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srl_pi32(__m64 __m, __m64 __count)
{
return (__m64)__builtin_ia32_psrld((__v2si)__m, (__v2si)__count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psrld(__m64 __m, __m64 __count)
{
return _mm_srl_pi32(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srli_pi32(__m64 __m, int __count)
{
return (__m64)__builtin_ia32_psrldi((__v2si)__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psrldi(__m64 __m, int __count)
{
return _mm_srli_pi32(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srl_si64(__m64 __m, __m64 __count)
{
return (__m64)__builtin_ia32_psrlq((__v1di)__m, (__v1di)__count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psrlq(__m64 __m, __m64 __count)
{
return _mm_srl_si64(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srli_si64(__m64 __m, int __count)
{
return (__m64)__builtin_ia32_psrlqi((__v1di)__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psrlqi(__m64 __m, int __count)
{
return _mm_srli_si64(__m, __count);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_and_si64(__m64 __m1, __m64 __m2)
{
return __builtin_ia32_pand(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pand(__m64 __m1, __m64 __m2)
{
return _mm_and_si64(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_andnot_si64(__m64 __m1, __m64 __m2)
{
return __builtin_ia32_pandn(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pandn(__m64 __m1, __m64 __m2)
{
return _mm_andnot_si64(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_or_si64(__m64 __m1, __m64 __m2)
{
return __builtin_ia32_por(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_por(__m64 __m1, __m64 __m2)
{
return _mm_or_si64(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_xor_si64(__m64 __m1, __m64 __m2)
{
return __builtin_ia32_pxor(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pxor(__m64 __m1, __m64 __m2)
{
return _mm_xor_si64(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpeq_pi8(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_pcmpeqb((__v8qi)__m1, (__v8qi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pcmpeqb(__m64 __m1, __m64 __m2)
{
return _mm_cmpeq_pi8(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpgt_pi8(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_pcmpgtb((__v8qi)__m1, (__v8qi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pcmpgtb(__m64 __m1, __m64 __m2)
{
return _mm_cmpgt_pi8(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpeq_pi16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_pcmpeqw((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pcmpeqw(__m64 __m1, __m64 __m2)
{
return _mm_cmpeq_pi16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpgt_pi16(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_pcmpgtw((__v4hi)__m1, (__v4hi)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pcmpgtw(__m64 __m1, __m64 __m2)
{
return _mm_cmpgt_pi16(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpeq_pi32(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_pcmpeqd((__v2si)__m1, (__v2si)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pcmpeqd(__m64 __m1, __m64 __m2)
{
return _mm_cmpeq_pi32(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpgt_pi32(__m64 __m1, __m64 __m2)
{
return (__m64)__builtin_ia32_pcmpgtd((__v2si)__m1, (__v2si)__m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pcmpgtd(__m64 __m1, __m64 __m2)
{
return _mm_cmpgt_pi32(__m1, __m2);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setzero_si64(void)
{
return (__m64)0LL;
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_pi32(int __i1, int __i0)
{
return (__m64)__builtin_ia32_vec_init_v2si(__i0, __i1);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_pi16(short __w3, short __w2, short __w1, short __w0)
{
return (__m64)__builtin_ia32_vec_init_v4hi(__w0, __w1, __w2, __w3);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_pi8(char __b7, char __b6, char __b5, char __b4,
char __b3, char __b2, char __b1, char __b0)
{
return (__m64)__builtin_ia32_vec_init_v8qi(__b0, __b1, __b2, __b3,
__b4, __b5, __b6, __b7);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setr_pi32(int __i0, int __i1)
{
return _mm_set_pi32(__i1, __i0);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setr_pi16(short __w0, short __w1, short __w2, short __w3)
{
return _mm_set_pi16(__w3, __w2, __w1, __w0);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setr_pi8(char __b0, char __b1, char __b2, char __b3,
char __b4, char __b5, char __b6, char __b7)
{
return _mm_set_pi8(__b7, __b6, __b5, __b4, __b3, __b2, __b1, __b0);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set1_pi32(int __i)
{
return _mm_set_pi32(__i, __i);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set1_pi16(short __w)
{
return _mm_set_pi16(__w, __w, __w, __w);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set1_pi8(char __b)
{
return _mm_set_pi8(__b, __b, __b, __b, __b, __b, __b, __b);
}
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _itow_s(int _Val, wchar_t *_DstBuf, size_t _SizeInWords, int _Radix);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _ltow_s(long _Val, wchar_t *_DstBuf, size_t _SizeInWords, int _Radix);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _ultow_s(unsigned long _Val, wchar_t *_DstBuf, size_t _SizeInWords, int _Radix);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wgetenv_s(size_t *_ReturnSize, wchar_t *_DstBuf, size_t _DstSizeInWords, const wchar_t *_VarName);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wdupenv_s(wchar_t **_Buffer, size_t *_BufferSizeInWords, const wchar_t *_VarName);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _i64tow_s(long long _Val, wchar_t *_DstBuf, size_t _SizeInWords, int _Radix);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _ui64tow_s(unsigned long long _Val, wchar_t *_DstBuf, size_t _SizeInWords, int _Radix);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wmakepath_s(wchar_t *_PathResult, size_t _SizeInWords, const wchar_t *_Drive, const wchar_t *_Dir, const wchar_t *_Filename, const wchar_t *_Ext);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wputenv_s(const wchar_t *_Name, const wchar_t *_Value);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wsearchenv_s(const wchar_t *_Filename, const wchar_t *_EnvVar, wchar_t *_ResultPath, size_t _SizeInWords);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wsplitpath_s(const wchar_t *_FullPath, wchar_t *_Drive, size_t _DriveSizeInWords, wchar_t *_Dir, size_t _DirSizeInWords, wchar_t *_Filename, size_t _FilenameSizeInWords, wchar_t *_Ext, size_t _ExtSizeInWords);
typedef int(__attribute__((__cdecl__)) * _onexit_t)(void);
typedef struct _div_t
{
int quot;
int rem;
} div_t;
typedef struct _ldiv_t
{
long quot;
long rem;
} ldiv_t;
typedef struct
{
unsigned char ld[10];
} _LDOUBLE;
typedef struct
{
double x;
} _CRT_DOUBLE;
typedef struct
{
float f;
} _CRT_FLOAT;
typedef struct
{
long double x;
} _LONGDOUBLE;
typedef struct
{
unsigned char ld12[12];
} _LDBL12;
typedef void(__attribute__((__cdecl__)) * _purecall_handler)(void);
__attribute__((__dllimport__)) _purecall_handler __attribute__((__cdecl__)) _set_purecall_handler(_purecall_handler _Handler);
__attribute__((__dllimport__)) _purecall_handler __attribute__((__cdecl__)) _get_purecall_handler(void);
typedef void(__attribute__((__cdecl__)) * _invalid_parameter_handler)(const wchar_t *, const wchar_t *, const wchar_t *, unsigned int, uintptr_t);
__attribute__((__dllimport__)) _invalid_parameter_handler __attribute__((__cdecl__)) _set_invalid_parameter_handler(_invalid_parameter_handler _Handler);
__attribute__((__dllimport__)) _invalid_parameter_handler __attribute__((__cdecl__)) _get_invalid_parameter_handler(void);
__attribute__((__dllimport__)) extern int *__attribute__((__cdecl__)) _errno(void);
errno_t __attribute__((__cdecl__)) _set_errno(int _Value);
errno_t __attribute__((__cdecl__)) _get_errno(int *_Value);
__attribute__((__dllimport__)) unsigned long *__attribute__((__cdecl__)) __doserrno(void);
errno_t __attribute__((__cdecl__)) _set_doserrno(unsigned long _Value);
errno_t __attribute__((__cdecl__)) _get_doserrno(unsigned long *_Value);
extern __attribute__((dllimport)) char *_sys_errlist[1];
extern __attribute__((dllimport)) int _sys_nerr;
__attribute__((__dllimport__)) char ***__attribute__((__cdecl__)) __p___argv(void);
__attribute__((__dllimport__)) int *__attribute__((__cdecl__)) __p__fmode(void);
errno_t __attribute__((__cdecl__)) _get_pgmptr(char **_Value);
errno_t __attribute__((__cdecl__)) _get_wpgmptr(wchar_t **_Value);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _set_fmode(int _Mode);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_fmode(int *_PMode);
extern int *__imp___argc;
extern char ***__imp___argv;
extern wchar_t ***__imp___wargv;
extern char ***__imp__environ;
extern wchar_t ***__imp__wenviron;
extern char **__imp__pgmptr;
extern wchar_t **__imp__wpgmptr;
extern unsigned int *__imp__osplatform;
extern unsigned int *__imp__osver;
extern unsigned int *__imp__winver;
extern unsigned int *__imp__winmajor;
extern unsigned int *__imp__winminor;
errno_t __attribute__((__cdecl__)) _get_osplatform(unsigned int *_Value);
errno_t __attribute__((__cdecl__)) _get_osver(unsigned int *_Value);
errno_t __attribute__((__cdecl__)) _get_winver(unsigned int *_Value);
errno_t __attribute__((__cdecl__)) _get_winmajor(unsigned int *_Value);
errno_t __attribute__((__cdecl__)) _get_winminor(unsigned int *_Value);
void __attribute__((__cdecl__)) __attribute__((__nothrow__)) exit(int _Code) __attribute__((__noreturn__));
void __attribute__((__cdecl__)) __attribute__((__nothrow__)) _exit(int _Code) __attribute__((__noreturn__));
void __attribute__((__cdecl__)) _Exit(int) __attribute__((__noreturn__));
void __attribute__((__cdecl__)) __attribute__((__noreturn__)) abort(void);
__attribute__((__dllimport__)) unsigned int __attribute__((__cdecl__)) _set_abort_behavior(unsigned int _Flags, unsigned int _Mask);
int __attribute__((__cdecl__)) abs(int _X);
long __attribute__((__cdecl__)) labs(long _X);
__extension__ long long __attribute__((__cdecl__)) _abs64(long long);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) long long __attribute__((__cdecl__)) _abs64(long long x)
{
return __builtin_llabs(x);
}
int __attribute__((__cdecl__)) atexit(void(__attribute__((__cdecl__)) *)(void));
double __attribute__((__cdecl__)) atof(const char *_String);
double __attribute__((__cdecl__)) _atof_l(const char *_String, _locale_t _Locale);
int __attribute__((__cdecl__)) atoi(const char *_Str);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _atoi_l(const char *_Str, _locale_t _Locale);
long __attribute__((__cdecl__)) atol(const char *_Str);
__attribute__((__dllimport__)) long __attribute__((__cdecl__)) _atol_l(const char *_Str, _locale_t _Locale);
void *__attribute__((__cdecl__)) bsearch(const void *_Key, const void *_Base, size_t _NumOfElements, size_t _SizeOfElements, int(__attribute__((__cdecl__)) * _PtFuncCompare)(const void *, const void *));
void __attribute__((__cdecl__)) qsort(void *_Base, size_t _NumOfElements, size_t _SizeOfElements, int(__attribute__((__cdecl__)) * _PtFuncCompare)(const void *, const void *));
unsigned short __attribute__((__cdecl__)) _byteswap_ushort(unsigned short _Short);
unsigned long __attribute__((__cdecl__)) _byteswap_ulong(unsigned long _Long);
__extension__ unsigned long long __attribute__((__cdecl__)) _byteswap_uint64(unsigned long long _Int64);
div_t __attribute__((__cdecl__)) div(int _Numerator, int _Denominator);
char *__attribute__((__cdecl__)) getenv(const char *_VarName);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _itoa(int _Value, char *_Dest, int _Radix);
__extension__ __attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _i64toa(long long _Val, char *_DstBuf, int _Radix);
__extension__ __attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _ui64toa(unsigned long long _Val, char *_DstBuf, int _Radix);
__extension__ __attribute__((__dllimport__)) long long __attribute__((__cdecl__)) _atoi64(const char *_String);
__extension__ __attribute__((__dllimport__)) long long __attribute__((__cdecl__)) _atoi64_l(const char *_String, _locale_t _Locale);
__extension__ __attribute__((__dllimport__)) long long __attribute__((__cdecl__)) _strtoi64(const char *_String, char **_EndPtr, int _Radix);
__extension__ __attribute__((__dllimport__)) long long __attribute__((__cdecl__)) _strtoi64_l(const char *_String, char **_EndPtr, int _Radix, _locale_t _Locale);
__extension__ __attribute__((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _strtoui64(const char *_String, char **_EndPtr, int _Radix);
__extension__ __attribute__((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _strtoui64_l(const char *_String, char **_EndPtr, int _Radix, _locale_t _Locale);
ldiv_t __attribute__((__cdecl__)) ldiv(long _Numerator, long _Denominator);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _ltoa(long _Value, char *_Dest, int _Radix);
int __attribute__((__cdecl__)) mblen(const char *_Ch, size_t _MaxCount);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _mblen_l(const char *_Ch, size_t _MaxCount, _locale_t _Locale);
__attribute__((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrlen(const char *_Str);
__attribute__((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrlen_l(const char *_Str, _locale_t _Locale);
__attribute__((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrnlen(const char *_Str, size_t _MaxCount);
__attribute__((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrnlen_l(const char *_Str, size_t _MaxCount, _locale_t _Locale);
int __attribute__((__cdecl__)) mbtowc(wchar_t *__restrict__ _DstCh, const char *__restrict__ _SrcCh, size_t _SrcSizeInBytes);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _mbtowc_l(wchar_t *__restrict__ _DstCh, const char *__restrict__ _SrcCh, size_t _SrcSizeInBytes, _locale_t _Locale);
size_t __attribute__((__cdecl__)) mbstowcs(wchar_t *__restrict__ _Dest, const char *__restrict__ _Source, size_t _MaxCount);
__attribute__((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstowcs_l(wchar_t *__restrict__ _Dest, const char *__restrict__ _Source, size_t _MaxCount, _locale_t _Locale);
int __attribute__((__cdecl__)) mkstemp(char *template_name);
int __attribute__((__cdecl__)) rand(void);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _set_error_mode(int _Mode);
void __attribute__((__cdecl__)) srand(unsigned int _Seed);
double __attribute__((__cdecl__)) __attribute__((__nothrow__)) strtod(const char *__restrict__ _Str, char **__restrict__ _EndPtr);
float __attribute__((__cdecl__)) __attribute__((__nothrow__)) strtof(const char *__restrict__ nptr, char **__restrict__ endptr);
long double __attribute__((__cdecl__)) __attribute__((__nothrow__)) strtold(const char *__restrict__, char **__restrict__);
extern double __attribute__((__cdecl__)) __attribute__((__nothrow__))
__strtod(const char *__restrict__, char **__restrict__);
float __attribute__((__cdecl__)) __mingw_strtof(const char *__restrict__, char **__restrict__);
double __attribute__((__cdecl__)) __mingw_strtod(const char *__restrict__, char **__restrict__);
long double __attribute__((__cdecl__)) __mingw_strtold(const char *__restrict__, char **__restrict__);
__attribute__((__dllimport__)) double __attribute__((__cdecl__)) _strtod_l(const char *__restrict__ _Str, char **__restrict__ _EndPtr, _locale_t _Locale);
long __attribute__((__cdecl__)) strtol(const char *__restrict__ _Str, char **__restrict__ _EndPtr, int _Radix);
__attribute__((__dllimport__)) long __attribute__((__cdecl__)) _strtol_l(const char *__restrict__ _Str, char **__restrict__ _EndPtr, int _Radix, _locale_t _Locale);
unsigned long __attribute__((__cdecl__)) strtoul(const char *__restrict__ _Str, char **__restrict__ _EndPtr, int _Radix);
__attribute__((__dllimport__)) unsigned long __attribute__((__cdecl__)) _strtoul_l(const char *__restrict__ _Str, char **__restrict__ _EndPtr, int _Radix, _locale_t _Locale);
int __attribute__((__cdecl__)) system(const char *_Command);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _ultoa(unsigned long _Value, char *_Dest, int _Radix);
int __attribute__((__cdecl__)) wctomb(char *_MbCh, wchar_t _WCh);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wctomb_l(char *_MbCh, wchar_t _WCh, _locale_t _Locale);
size_t __attribute__((__cdecl__)) wcstombs(char *__restrict__ _Dest, const wchar_t *__restrict__ _Source, size_t _MaxCount);
__attribute__((__dllimport__)) size_t __attribute__((__cdecl__)) _wcstombs_l(char *__restrict__ _Dest, const wchar_t *__restrict__ _Source, size_t _MaxCount, _locale_t _Locale);
void *__attribute__((__cdecl__)) calloc(size_t _NumOfElements, size_t _SizeOfElements);
void __attribute__((__cdecl__)) free(void *_Memory);
void *__attribute__((__cdecl__)) malloc(size_t _Size);
void *__attribute__((__cdecl__)) realloc(void *_Memory, size_t _NewSize);
__attribute__((__dllimport__)) void *__attribute__((__cdecl__)) _recalloc(void *_Memory, size_t _Count, size_t _Size);
__attribute__((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_offset_malloc(size_t _Size, size_t _Alignment, size_t _Offset);
__attribute__((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_realloc(void *_Memory, size_t _Size, size_t _Alignment);
__attribute__((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_recalloc(void *_Memory, size_t _Count, size_t _Size, size_t _Alignment);
__attribute__((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_offset_realloc(void *_Memory, size_t _Size, size_t _Alignment, size_t _Offset);
__attribute__((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_offset_recalloc(void *_Memory, size_t _Count, size_t _Size, size_t _Alignment, size_t _Offset);
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _itow(int _Value, wchar_t *_Dest, int _Radix);
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _ltow(long _Value, wchar_t *_Dest, int _Radix);
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _ultow(unsigned long _Value, wchar_t *_Dest, int _Radix);
double __attribute__((__cdecl__)) __mingw_wcstod(const wchar_t *__restrict__ _Str, wchar_t **__restrict__ _EndPtr);
float __attribute__((__cdecl__)) __mingw_wcstof(const wchar_t *__restrict__ nptr, wchar_t **__restrict__ endptr);
long double __attribute__((__cdecl__)) __mingw_wcstold(const wchar_t *__restrict__, wchar_t **__restrict__);
double __attribute__((__cdecl__)) wcstod(const wchar_t *__restrict__ _Str, wchar_t **__restrict__ _EndPtr);
float __attribute__((__cdecl__)) wcstof(const wchar_t *__restrict__ nptr, wchar_t **__restrict__ endptr);
long double __attribute__((__cdecl__)) wcstold(const wchar_t *__restrict__, wchar_t **__restrict__);
__attribute__((__dllimport__)) double __attribute__((__cdecl__)) _wcstod_l(const wchar_t *__restrict__ _Str, wchar_t **__restrict__ _EndPtr, _locale_t _Locale);
long __attribute__((__cdecl__)) wcstol(const wchar_t *__restrict__ _Str, wchar_t **__restrict__ _EndPtr, int _Radix);
__attribute__((__dllimport__)) long __attribute__((__cdecl__)) _wcstol_l(const wchar_t *__restrict__ _Str, wchar_t **__restrict__ _EndPtr, int _Radix, _locale_t _Locale);
unsigned long __attribute__((__cdecl__)) wcstoul(const wchar_t *__restrict__ _Str, wchar_t **__restrict__ _EndPtr, int _Radix);
__attribute__((__dllimport__)) unsigned long __attribute__((__cdecl__)) _wcstoul_l(const wchar_t *__restrict__ _Str, wchar_t **__restrict__ _EndPtr, int _Radix, _locale_t _Locale);
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wgetenv(const wchar_t *_VarName);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wsystem(const wchar_t *_Command);
__attribute__((__dllimport__)) double __attribute__((__cdecl__)) _wtof(const wchar_t *_Str);
__attribute__((__dllimport__)) double __attribute__((__cdecl__)) _wtof_l(const wchar_t *_Str, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wtoi(const wchar_t *_Str);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wtoi_l(const wchar_t *_Str, _locale_t _Locale);
__attribute__((__dllimport__)) long __attribute__((__cdecl__)) _wtol(const wchar_t *_Str);
__attribute__((__dllimport__)) long __attribute__((__cdecl__)) _wtol_l(const wchar_t *_Str, _locale_t _Locale);
__extension__ __attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _i64tow(long long _Val, wchar_t *_DstBuf, int _Radix);
__extension__ __attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _ui64tow(unsigned long long _Val, wchar_t *_DstBuf, int _Radix);
__extension__ __attribute__((__dllimport__)) long long __attribute__((__cdecl__)) _wtoi64(const wchar_t *_Str);
__extension__ __attribute__((__dllimport__)) long long __attribute__((__cdecl__)) _wtoi64_l(const wchar_t *_Str, _locale_t _Locale);
__extension__ __attribute__((__dllimport__)) long long __attribute__((__cdecl__)) _wcstoi64(const wchar_t *_Str, wchar_t **_EndPtr, int _Radix);
__extension__ __attribute__((__dllimport__)) long long __attribute__((__cdecl__)) _wcstoi64_l(const wchar_t *_Str, wchar_t **_EndPtr, int _Radix, _locale_t _Locale);
__extension__ __attribute__((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _wcstoui64(const wchar_t *_Str, wchar_t **_EndPtr, int _Radix);
__extension__ __attribute__((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _wcstoui64_l(const wchar_t *_Str, wchar_t **_EndPtr, int _Radix, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _putenv(const char *_EnvString);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _wputenv(const wchar_t *_EnvString);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _fullpath(char *_FullPath, const char *_Path, size_t _SizeInBytes);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _ecvt(double _Val, int _NumOfDigits, int *_PtDec, int *_PtSign);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _fcvt(double _Val, int _NumOfDec, int *_PtDec, int *_PtSign);
__attribute__((__dllimport__)) char *__attribute__((__cdecl__)) _gcvt(double _Val, int _NumOfDigits, char *_DstBuf);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _atodbl(_CRT_DOUBLE *_Result, char *_Str);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _atoldbl(_LDOUBLE *_Result, char *_Str);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _atoflt(_CRT_FLOAT *_Result, char *_Str);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _atodbl_l(_CRT_DOUBLE *_Result, char *_Str, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _atoldbl_l(_LDOUBLE *_Result, char *_Str, _locale_t _Locale);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _atoflt_l(_CRT_FLOAT *_Result, char *_Str, _locale_t _Locale);
unsigned long __attribute__((__cdecl__)) _lrotl(unsigned long, int);
unsigned long __attribute__((__cdecl__)) _lrotr(unsigned long, int);
__attribute__((__dllimport__)) void __attribute__((__cdecl__)) _makepath(char *_Path, const char *_Drive, const char *_Dir, const char *_Filename, const char *_Ext);
_onexit_t __attribute__((__cdecl__)) _onexit(_onexit_t _Func);
void __attribute__((__cdecl__)) perror(const char *_ErrMsg);
__extension__ unsigned long long __attribute__((__cdecl__)) _rotl64(unsigned long long _Val, int _Shift);
__extension__ unsigned long long __attribute__((__cdecl__)) _rotr64(unsigned long long Value, int Shift);
unsigned int __attribute__((__cdecl__)) _rotr(unsigned int _Val, int _Shift);
unsigned int __attribute__((__cdecl__)) _rotl(unsigned int _Val, int _Shift);
__extension__ unsigned long long __attribute__((__cdecl__)) _rotr64(unsigned long long _Val, int _Shift);
__attribute__((__dllimport__)) void __attribute__((__cdecl__)) _searchenv(const char *_Filename, const char *_EnvVar, char *_ResultPath);
__attribute__((__dllimport__)) void __attribute__((__cdecl__)) _splitpath(const char *_FullPath, char *_Drive, char *_Dir, char *_Filename, char *_Ext);
__attribute__((__dllimport__)) void __attribute__((__cdecl__)) _swab(char *_Buf1, char *_Buf2, int _SizeInBytes);
__attribute__((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wfullpath(wchar_t *_FullPath, const wchar_t *_Path, size_t _SizeInWords);
__attribute__((__dllimport__)) void __attribute__((__cdecl__)) _wmakepath(wchar_t *_ResultPath, const wchar_t *_Drive, const wchar_t *_Dir, const wchar_t *_Filename, const wchar_t *_Ext);
__attribute__((__dllimport__)) void __attribute__((__cdecl__)) _wperror(const wchar_t *_ErrMsg);
__attribute__((__dllimport__)) void __attribute__((__cdecl__)) _wsearchenv(const wchar_t *_Filename, const wchar_t *_EnvVar, wchar_t *_ResultPath);
__attribute__((__dllimport__)) void __attribute__((__cdecl__)) _wsplitpath(const wchar_t *_FullPath, wchar_t *_Drive, wchar_t *_Dir, wchar_t *_Filename, wchar_t *_Ext);
__attribute__((__dllimport__)) void __attribute__((__cdecl__)) _beep(unsigned _Frequency, unsigned _Duration) __attribute__((__deprecated__));
__attribute__((__dllimport__)) void __attribute__((__cdecl__)) _seterrormode(int _Mode) __attribute__((__deprecated__));
__attribute__((__dllimport__)) void __attribute__((__cdecl__)) _sleep(unsigned long _Duration) __attribute__((__deprecated__));
char *__attribute__((__cdecl__)) ecvt(double _Val, int _NumOfDigits, int *_PtDec, int *_PtSign);
char *__attribute__((__cdecl__)) fcvt(double _Val, int _NumOfDec, int *_PtDec, int *_PtSign);
char *__attribute__((__cdecl__)) gcvt(double _Val, int _NumOfDigits, char *_DstBuf);
char *__attribute__((__cdecl__)) itoa(int _Val, char *_DstBuf, int _Radix);
char *__attribute__((__cdecl__)) ltoa(long _Val, char *_DstBuf, int _Radix);
int __attribute__((__cdecl__)) putenv(const char *_EnvString);
void __attribute__((__cdecl__)) swab(char *_Buf1, char *_Buf2, int _SizeInBytes);
char *__attribute__((__cdecl__)) ultoa(unsigned long _Val, char *_Dstbuf, int _Radix);
_onexit_t __attribute__((__cdecl__)) onexit(_onexit_t _Func);
typedef struct
{
__extension__ long long quot, rem;
} lldiv_t;
__extension__ lldiv_t __attribute__((__cdecl__)) lldiv(long long, long long);
__extension__ long long __attribute__((__cdecl__)) llabs(long long);
__extension__ long long __attribute__((__cdecl__)) strtoll(const char *__restrict__, char **__restrict, int);
__extension__ unsigned long long __attribute__((__cdecl__)) strtoull(const char *__restrict__, char **__restrict__, int);
__extension__ long long __attribute__((__cdecl__)) atoll(const char *);
__extension__ long long __attribute__((__cdecl__)) wtoll(const wchar_t *);
__extension__ char *__attribute__((__cdecl__)) lltoa(long long, char *, int);
__extension__ char *__attribute__((__cdecl__)) ulltoa(unsigned long long, char *, int);
__extension__ wchar_t *__attribute__((__cdecl__)) lltow(long long, wchar_t *, int);
__extension__ wchar_t *__attribute__((__cdecl__)) ulltow(unsigned long long, wchar_t *, int);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _dupenv_s(char **_PBuffer, size_t *_PBufferSizeInBytes, const char *_VarName);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _itoa_s(int _Value, char *_DstBuf, size_t _Size, int _Radix);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _i64toa_s(long long _Val, char *_DstBuf, size_t _Size, int _Radix);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _ui64toa_s(unsigned long long _Val, char *_DstBuf, size_t _Size, int _Radix);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _ltoa_s(long _Val, char *_DstBuf, size_t _Size, int _Radix);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) mbstowcs_s(size_t *_PtNumOfCharConverted, wchar_t *_DstBuf, size_t _SizeInWords, const char *_SrcBuf, size_t _MaxCount);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _mbstowcs_s_l(size_t *_PtNumOfCharConverted, wchar_t *_DstBuf, size_t _SizeInWords, const char *_SrcBuf, size_t _MaxCount, _locale_t _Locale);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _ultoa_s(unsigned long _Val, char *_DstBuf, size_t _Size, int _Radix);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wctomb_s_l(int *_SizeConverted, char *_MbCh, size_t _SizeInBytes, wchar_t _WCh, _locale_t _Locale);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) wcstombs_s(size_t *_PtNumOfCharConverted, char *_Dst, size_t _DstSizeInBytes, const wchar_t *_Src, size_t _MaxCountInBytes);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcstombs_s_l(size_t *_PtNumOfCharConverted, char *_Dst, size_t _DstSizeInBytes, const wchar_t *_Src, size_t _MaxCountInBytes, _locale_t _Locale);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _ecvt_s(char *_DstBuf, size_t _Size, double _Val, int _NumOfDights, int *_PtDec, int *_PtSign);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _fcvt_s(char *_DstBuf, size_t _Size, double _Val, int _NumOfDec, int *_PtDec, int *_PtSign);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _gcvt_s(char *_DstBuf, size_t _Size, double _Val, int _NumOfDigits);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _makepath_s(char *_PathResult, size_t _Size, const char *_Drive, const char *_Dir, const char *_Filename, const char *_Ext);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _putenv_s(const char *_Name, const char *_Value);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _searchenv_s(const char *_Filename, const char *_EnvVar, char *_ResultPath, size_t _SizeInBytes);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _splitpath_s(const char *_FullPath, char *_Drive, size_t _DriveSize, char *_Dir, size_t _DirSize, char *_Filename, size_t _FilenameSize, char *_Ext, size_t _ExtSize);
__attribute__((__dllimport__)) void __attribute__((__cdecl__)) qsort_s(void *_Base, size_t _NumOfElements, size_t _SizeOfElements, int(__attribute__((__cdecl__)) * _PtFuncCompare)(void *, const void *, const void *), void *_Context);
typedef struct _heapinfo
{
int *_pentry;
size_t _size;
int _useflag;
} _HEAPINFO;
extern unsigned int _amblksiz;
void *__mingw_aligned_malloc(size_t _Size, size_t _Alignment);
void __mingw_aligned_free(void *_Memory);
void *__mingw_aligned_offset_realloc(void *_Memory, size_t _Size, size_t _Alignment, size_t _Offset);
void *__mingw_aligned_realloc(void *_Memory, size_t _Size, size_t _Offset);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _resetstkoflw(void);
__attribute__((__dllimport__)) unsigned long __attribute__((__cdecl__)) _set_malloc_crt_max_wait(unsigned long _NewValue);
__attribute__((__dllimport__)) void *__attribute__((__cdecl__)) _expand(void *_Memory, size_t _NewSize);
__attribute__((__dllimport__)) size_t __attribute__((__cdecl__)) _msize(void *_Memory);
__attribute__((__dllimport__)) size_t __attribute__((__cdecl__)) _get_sbh_threshold(void);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _set_sbh_threshold(size_t _NewValue);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _set_amblksiz(size_t _Value);
__attribute__((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_amblksiz(size_t *_Value);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _heapadd(void *_Memory, size_t _Size);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _heapchk(void);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _heapmin(void);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _heapset(unsigned int _Fill);
__attribute__((__dllimport__)) int __attribute__((__cdecl__)) _heapwalk(_HEAPINFO *_EntryInfo);
__attribute__((__dllimport__)) size_t __attribute__((__cdecl__)) _heapused(size_t *_Used, size_t *_Commit);
__attribute__((__dllimport__)) intptr_t __attribute__((__cdecl__)) _get_heap_handle(void);
static __inline void *_MarkAllocaS(void *_Ptr, unsigned int _Marker)
{
if (_Ptr)
{
*((unsigned int *)_Ptr) = _Marker;
_Ptr = (char *)_Ptr + 16;
}
return _Ptr;
}
static __inline void __attribute__((__cdecl__)) _freea(void *_Memory)
{
unsigned int _Marker;
if (_Memory)
{
_Memory = (char *)_Memory - 16;
_Marker = *(unsigned int *)_Memory;
if (_Marker == 0xDDDD)
{
free(_Memory);
}
}
}
static __inline__ void *
_aligned_malloc(size_t __size, size_t __align)
{
void *__malloc_ptr;
void *__aligned_ptr;
if (__align & (__align - 1))
{
(*_errno()) = 22;
return ((void *)0);
}
if (__size == 0)
return ((void *)0);
if (__align < 2 * sizeof(void *))
__align = 2 * sizeof(void *);
__malloc_ptr = malloc(__size + __align);
if (!__malloc_ptr)
return ((void *)0);
__aligned_ptr = (void *)(((size_t)__malloc_ptr + __align) & ~((size_t)(__align)-1));
((void **)__aligned_ptr)[-1] = __malloc_ptr;
return __aligned_ptr;
}
static __inline__ void
_aligned_free(void *__aligned_ptr)
{
if (__aligned_ptr)
free(((void **)__aligned_ptr)[-1]);
}
enum _mm_hint
{
_MM_HINT_ET0 = 7,
_MM_HINT_ET1 = 6,
_MM_HINT_T0 = 3,
_MM_HINT_T1 = 2,
_MM_HINT_T2 = 1,
_MM_HINT_NTA = 0
};
typedef float __m128 __attribute__((__vector_size__(16), __may_alias__));
typedef float __m128_u __attribute__((__vector_size__(16), __may_alias__, __aligned__(1)));
typedef float __v4sf __attribute__((__vector_size__(16)));
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_undefined_ps(void)
{
__m128 __Y = __Y;
return __Y;
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setzero_ps(void)
{
return __extension__(__m128){0.0f, 0.0f, 0.0f, 0.0f};
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_add_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_addss((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sub_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_subss((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_mul_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_mulss((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_div_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_divss((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sqrt_ss(__m128 __A)
{
return (__m128)__builtin_ia32_sqrtss((__v4sf)__A);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_rcp_ss(__m128 __A)
{
return (__m128)__builtin_ia32_rcpss((__v4sf)__A);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_rsqrt_ss(__m128 __A)
{
return (__m128)__builtin_ia32_rsqrtss((__v4sf)__A);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_min_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_minss((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_max_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_maxss((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_add_ps(__m128 __A, __m128 __B)
{
return (__m128)((__v4sf)__A + (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sub_ps(__m128 __A, __m128 __B)
{
return (__m128)((__v4sf)__A - (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_mul_ps(__m128 __A, __m128 __B)
{
return (__m128)((__v4sf)__A * (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_div_ps(__m128 __A, __m128 __B)
{
return (__m128)((__v4sf)__A / (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sqrt_ps(__m128 __A)
{
return (__m128)__builtin_ia32_sqrtps((__v4sf)__A);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_rcp_ps(__m128 __A)
{
return (__m128)__builtin_ia32_rcpps((__v4sf)__A);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_rsqrt_ps(__m128 __A)
{
return (__m128)__builtin_ia32_rsqrtps((__v4sf)__A);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_min_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_minps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_max_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_maxps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_and_ps(__m128 __A, __m128 __B)
{
return __builtin_ia32_andps(__A, __B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_andnot_ps(__m128 __A, __m128 __B)
{
return __builtin_ia32_andnps(__A, __B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_or_ps(__m128 __A, __m128 __B)
{
return __builtin_ia32_orps(__A, __B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_xor_ps(__m128 __A, __m128 __B)
{
return __builtin_ia32_xorps(__A, __B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpeq_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpeqss((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmplt_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpltss((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmple_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpless((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpgt_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_movss((__v4sf)__A,
(__v4sf)
__builtin_ia32_cmpltss((__v4sf)__B,
(__v4sf)
__A));
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpge_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_movss((__v4sf)__A,
(__v4sf)
__builtin_ia32_cmpless((__v4sf)__B,
(__v4sf)
__A));
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpneq_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpneqss((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpnlt_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpnltss((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpnle_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpnless((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpngt_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_movss((__v4sf)__A,
(__v4sf)
__builtin_ia32_cmpnltss((__v4sf)__B,
(__v4sf)
__A));
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpnge_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_movss((__v4sf)__A,
(__v4sf)
__builtin_ia32_cmpnless((__v4sf)__B,
(__v4sf)
__A));
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpord_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpordss((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpunord_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpunordss((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpeq_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpeqps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmplt_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpltps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmple_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpleps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpgt_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpgtps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpge_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpgeps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpneq_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpneqps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpnlt_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpnltps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpnle_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpnleps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpngt_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpngtps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpnge_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpngeps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpord_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpordps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpunord_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_cmpunordps((__v4sf)__A, (__v4sf)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_comieq_ss(__m128 __A, __m128 __B)
{
return __builtin_ia32_comieq((__v4sf)__A, (__v4sf)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_comilt_ss(__m128 __A, __m128 __B)
{
return __builtin_ia32_comilt((__v4sf)__A, (__v4sf)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_comile_ss(__m128 __A, __m128 __B)
{
return __builtin_ia32_comile((__v4sf)__A, (__v4sf)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_comigt_ss(__m128 __A, __m128 __B)
{
return __builtin_ia32_comigt((__v4sf)__A, (__v4sf)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_comige_ss(__m128 __A, __m128 __B)
{
return __builtin_ia32_comige((__v4sf)__A, (__v4sf)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_comineq_ss(__m128 __A, __m128 __B)
{
return __builtin_ia32_comineq((__v4sf)__A, (__v4sf)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_ucomieq_ss(__m128 __A, __m128 __B)
{
return __builtin_ia32_ucomieq((__v4sf)__A, (__v4sf)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_ucomilt_ss(__m128 __A, __m128 __B)
{
return __builtin_ia32_ucomilt((__v4sf)__A, (__v4sf)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_ucomile_ss(__m128 __A, __m128 __B)
{
return __builtin_ia32_ucomile((__v4sf)__A, (__v4sf)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_ucomigt_ss(__m128 __A, __m128 __B)
{
return __builtin_ia32_ucomigt((__v4sf)__A, (__v4sf)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_ucomige_ss(__m128 __A, __m128 __B)
{
return __builtin_ia32_ucomige((__v4sf)__A, (__v4sf)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_ucomineq_ss(__m128 __A, __m128 __B)
{
return __builtin_ia32_ucomineq((__v4sf)__A, (__v4sf)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtss_si32(__m128 __A)
{
return __builtin_ia32_cvtss2si((__v4sf)__A);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvt_ss2si(__m128 __A)
{
return _mm_cvtss_si32(__A);
}
extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtss_si64(__m128 __A)
{
return __builtin_ia32_cvtss2si64((__v4sf)__A);
}
extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtss_si64x(__m128 __A)
{
return __builtin_ia32_cvtss2si64((__v4sf)__A);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtps_pi32(__m128 __A)
{
return (__m64)__builtin_ia32_cvtps2pi((__v4sf)__A);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvt_ps2pi(__m128 __A)
{
return _mm_cvtps_pi32(__A);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvttss_si32(__m128 __A)
{
return __builtin_ia32_cvttss2si((__v4sf)__A);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtt_ss2si(__m128 __A)
{
return _mm_cvttss_si32(__A);
}
extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvttss_si64(__m128 __A)
{
return __builtin_ia32_cvttss2si64((__v4sf)__A);
}
extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvttss_si64x(__m128 __A)
{
return __builtin_ia32_cvttss2si64((__v4sf)__A);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvttps_pi32(__m128 __A)
{
return (__m64)__builtin_ia32_cvttps2pi((__v4sf)__A);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtt_ps2pi(__m128 __A)
{
return _mm_cvttps_pi32(__A);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi32_ss(__m128 __A, int __B)
{
return (__m128)__builtin_ia32_cvtsi2ss((__v4sf)__A, __B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvt_si2ss(__m128 __A, int __B)
{
return _mm_cvtsi32_ss(__A, __B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi64_ss(__m128 __A, long long __B)
{
return (__m128)__builtin_ia32_cvtsi642ss((__v4sf)__A, __B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi64x_ss(__m128 __A, long long __B)
{
return (__m128)__builtin_ia32_cvtsi642ss((__v4sf)__A, __B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtpi32_ps(__m128 __A, __m64 __B)
{
return (__m128)__builtin_ia32_cvtpi2ps((__v4sf)__A, (__v2si)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvt_pi2ps(__m128 __A, __m64 __B)
{
return _mm_cvtpi32_ps(__A, __B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtpi16_ps(__m64 __A)
{
__v4hi __sign;
__v2si __hisi, __losi;
__v4sf __zero, __ra, __rb;
__sign = __builtin_ia32_pcmpgtw((__v4hi)0LL, (__v4hi)__A);
__losi = (__v2si)__builtin_ia32_punpcklwd((__v4hi)__A, __sign);
__hisi = (__v2si)__builtin_ia32_punpckhwd((__v4hi)__A, __sign);
__zero = (__v4sf)_mm_setzero_ps();
__ra = __builtin_ia32_cvtpi2ps(__zero, __losi);
__rb = __builtin_ia32_cvtpi2ps(__ra, __hisi);
return (__m128)__builtin_ia32_movlhps(__ra, __rb);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtpu16_ps(__m64 __A)
{
__v2si __hisi, __losi;
__v4sf __zero, __ra, __rb;
__losi = (__v2si)__builtin_ia32_punpcklwd((__v4hi)__A, (__v4hi)0LL);
__hisi = (__v2si)__builtin_ia32_punpckhwd((__v4hi)__A, (__v4hi)0LL);
__zero = (__v4sf)_mm_setzero_ps();
__ra = __builtin_ia32_cvtpi2ps(__zero, __losi);
__rb = __builtin_ia32_cvtpi2ps(__ra, __hisi);
return (__m128)__builtin_ia32_movlhps(__ra, __rb);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtpi8_ps(__m64 __A)
{
__v8qi __sign;
__sign = __builtin_ia32_pcmpgtb((__v8qi)0LL, (__v8qi)__A);
__A = (__m64)__builtin_ia32_punpcklbw((__v8qi)__A, __sign);
return _mm_cvtpi16_ps(__A);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtpu8_ps(__m64 __A)
{
__A = (__m64)__builtin_ia32_punpcklbw((__v8qi)__A, (__v8qi)0LL);
return _mm_cvtpu16_ps(__A);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtpi32x2_ps(__m64 __A, __m64 __B)
{
__v4sf __zero = (__v4sf)_mm_setzero_ps();
__v4sf __sfa = __builtin_ia32_cvtpi2ps(__zero, (__v2si)__A);
__v4sf __sfb = __builtin_ia32_cvtpi2ps(__sfa, (__v2si)__B);
return (__m128)__builtin_ia32_movlhps(__sfa, __sfb);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtps_pi16(__m128 __A)
{
__v4sf __hisf = (__v4sf)__A;
__v4sf __losf = __builtin_ia32_movhlps(__hisf, __hisf);
__v2si __hisi = __builtin_ia32_cvtps2pi(__hisf);
__v2si __losi = __builtin_ia32_cvtps2pi(__losf);
return (__m64)__builtin_ia32_packssdw(__hisi, __losi);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtps_pi8(__m128 __A)
{
__v4hi __tmp = (__v4hi)_mm_cvtps_pi16(__A);
return (__m64)__builtin_ia32_packsswb(__tmp, (__v4hi)0LL);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpackhi_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_unpckhps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpacklo_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_unpcklps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_loadh_pi(__m128 __A, __m64 const *__P)
{
return (__m128)__builtin_ia32_loadhps((__v4sf)__A, (const __v2sf *)__P);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_storeh_pi(__m64 *__P, __m128 __A)
{
__builtin_ia32_storehps((__v2sf *)__P, (__v4sf)__A);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_movehl_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_movhlps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_movelh_ps(__m128 __A, __m128 __B)
{
return (__m128)__builtin_ia32_movlhps((__v4sf)__A, (__v4sf)__B);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_loadl_pi(__m128 __A, __m64 const *__P)
{
return (__m128)__builtin_ia32_loadlps((__v4sf)__A, (const __v2sf *)__P);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_storel_pi(__m64 *__P, __m128 __A)
{
__builtin_ia32_storelps((__v2sf *)__P, (__v4sf)__A);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_movemask_ps(__m128 __A)
{
return __builtin_ia32_movmskps((__v4sf)__A);
}
extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_getcsr(void)
{
return __builtin_ia32_stmxcsr();
}
extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_MM_GET_EXCEPTION_STATE(void)
{
return _mm_getcsr() & 0x003f;
}
extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_MM_GET_EXCEPTION_MASK(void)
{
return _mm_getcsr() & 0x1f80;
}
extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_MM_GET_ROUNDING_MODE(void)
{
return _mm_getcsr() & 0x6000;
}
extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_MM_GET_FLUSH_ZERO_MODE(void)
{
return _mm_getcsr() & 0x8000;
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setcsr(unsigned int __I)
{
__builtin_ia32_ldmxcsr(__I);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_MM_SET_EXCEPTION_STATE(unsigned int __mask)
{
_mm_setcsr((_mm_getcsr() & ~0x003f) | __mask);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_MM_SET_EXCEPTION_MASK(unsigned int __mask)
{
_mm_setcsr((_mm_getcsr() & ~0x1f80) | __mask);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_MM_SET_ROUNDING_MODE(unsigned int __mode)
{
_mm_setcsr((_mm_getcsr() & ~0x6000) | __mode);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_MM_SET_FLUSH_ZERO_MODE(unsigned int __mode)
{
_mm_setcsr((_mm_getcsr() & ~0x8000) | __mode);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_ss(float __F)
{
return __extension__(__m128)(__v4sf){__F, 0.0f, 0.0f, 0.0f};
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set1_ps(float __F)
{
return __extension__(__m128)(__v4sf){__F, __F, __F, __F};
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_ps1(float __F)
{
return _mm_set1_ps(__F);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_load_ss(float const *__P)
{
return _mm_set_ss(*__P);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_load1_ps(float const *__P)
{
return _mm_set1_ps(*__P);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_load_ps1(float const *__P)
{
return _mm_load1_ps(__P);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_load_ps(float const *__P)
{
return *(__m128 *)__P;
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_loadu_ps(float const *__P)
{
return *(__m128_u *)__P;
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_loadr_ps(float const *__P)
{
__v4sf __tmp = *(__v4sf *)__P;
return (__m128)__builtin_ia32_shufps(__tmp, __tmp, (((0) << 6) | ((1) << 4) | ((2) << 2) | (3)));
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_ps(const float __Z, const float __Y, const float __X, const float __W)
{
return __extension__(__m128)(__v4sf){__W, __X, __Y, __Z};
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setr_ps(float __Z, float __Y, float __X, float __W)
{
return __extension__(__m128)(__v4sf){__Z, __Y, __X, __W};
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_store_ss(float *__P, __m128 __A)
{
*__P = ((__v4sf)__A)[0];
}
extern __inline float __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtss_f32(__m128 __A)
{
return ((__v4sf)__A)[0];
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_store_ps(float *__P, __m128 __A)
{
*(__m128 *)__P = __A;
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_storeu_ps(float *__P, __m128 __A)
{
*(__m128_u *)__P = __A;
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_store1_ps(float *__P, __m128 __A)
{
__v4sf __va = (__v4sf)__A;
__v4sf __tmp = __builtin_ia32_shufps(__va, __va, (((0) << 6) | ((0) << 4) | ((0) << 2) | (0)));
_mm_storeu_ps(__P, __tmp);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_store_ps1(float *__P, __m128 __A)
{
_mm_store1_ps(__P, __A);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_storer_ps(float *__P, __m128 __A)
{
__v4sf __va = (__v4sf)__A;
__v4sf __tmp = __builtin_ia32_shufps(__va, __va, (((0) << 6) | ((1) << 4) | ((2) << 2) | (3)));
_mm_store_ps(__P, __tmp);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_move_ss(__m128 __A, __m128 __B)
{
return (__m128)__builtin_shuffle((__v4sf)__A, (__v4sf)__B,
__extension__(__attribute__((__vector_size__(16))) int){4, 1, 2, 3});
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_max_pi16(__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pmaxsw((__v4hi)__A, (__v4hi)__B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pmaxsw(__m64 __A, __m64 __B)
{
return _mm_max_pi16(__A, __B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_max_pu8(__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pmaxub((__v8qi)__A, (__v8qi)__B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pmaxub(__m64 __A, __m64 __B)
{
return _mm_max_pu8(__A, __B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_min_pi16(__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pminsw((__v4hi)__A, (__v4hi)__B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pminsw(__m64 __A, __m64 __B)
{
return _mm_min_pi16(__A, __B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_min_pu8(__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pminub((__v8qi)__A, (__v8qi)__B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pminub(__m64 __A, __m64 __B)
{
return _mm_min_pu8(__A, __B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_movemask_pi8(__m64 __A)
{
return __builtin_ia32_pmovmskb((__v8qi)__A);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pmovmskb(__m64 __A)
{
return _mm_movemask_pi8(__A);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_mulhi_pu16(__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pmulhuw((__v4hi)__A, (__v4hi)__B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pmulhuw(__m64 __A, __m64 __B)
{
return _mm_mulhi_pu16(__A, __B);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_maskmove_si64(__m64 __A, __m64 __N, char *__P)
{
__builtin_ia32_maskmovq((__v8qi)__A, (__v8qi)__N, __P);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_maskmovq(__m64 __A, __m64 __N, char *__P)
{
_mm_maskmove_si64(__A, __N, __P);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_avg_pu8(__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pavgb((__v8qi)__A, (__v8qi)__B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pavgb(__m64 __A, __m64 __B)
{
return _mm_avg_pu8(__A, __B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_avg_pu16(__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pavgw((__v4hi)__A, (__v4hi)__B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_pavgw(__m64 __A, __m64 __B)
{
return _mm_avg_pu16(__A, __B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sad_pu8(__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_psadbw((__v8qi)__A, (__v8qi)__B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_m_psadbw(__m64 __A, __m64 __B)
{
return _mm_sad_pu8(__A, __B);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_stream_pi(__m64 *__P, __m64 __A)
{
__builtin_ia32_movntq((unsigned long long *)__P, (unsigned long long)__A);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_stream_ps(float *__P, __m128 __A)
{
__builtin_ia32_movntps(__P, (__v4sf)__A);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sfence(void)
{
__builtin_ia32_sfence();
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_pause(void)
{
__builtin_ia32_pause();
}
typedef double __v2df __attribute__((__vector_size__(16)));
typedef long long __v2di __attribute__((__vector_size__(16)));
typedef unsigned long long __v2du __attribute__((__vector_size__(16)));
typedef int __v4si __attribute__((__vector_size__(16)));
typedef unsigned int __v4su __attribute__((__vector_size__(16)));
typedef short __v8hi __attribute__((__vector_size__(16)));
typedef unsigned short __v8hu __attribute__((__vector_size__(16)));
typedef char __v16qi __attribute__((__vector_size__(16)));
typedef signed char __v16qs __attribute__((__vector_size__(16)));
typedef unsigned char __v16qu __attribute__((__vector_size__(16)));
typedef long long __m128i __attribute__((__vector_size__(16), __may_alias__));
typedef double __m128d __attribute__((__vector_size__(16), __may_alias__));
typedef long long __m128i_u __attribute__((__vector_size__(16), __may_alias__, __aligned__(1)));
typedef double __m128d_u __attribute__((__vector_size__(16), __may_alias__, __aligned__(1)));
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_sd(double __F)
{
return __extension__(__m128d){__F, 0.0};
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set1_pd(double __F)
{
return __extension__(__m128d){__F, __F};
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_pd1(double __F)
{
return _mm_set1_pd(__F);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_pd(double __W, double __X)
{
return __extension__(__m128d){__X, __W};
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setr_pd(double __W, double __X)
{
return __extension__(__m128d){__W, __X};
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_undefined_pd(void)
{
__m128d __Y = __Y;
return __Y;
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setzero_pd(void)
{
return __extension__(__m128d){0.0, 0.0};
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_move_sd(__m128d __A, __m128d __B)
{
return __extension__(__m128d) __builtin_shuffle((__v2df)__A, (__v2df)__B, (__v2di){2, 1});
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_load_pd(double const *__P)
{
return *(__m128d *)__P;
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_loadu_pd(double const *__P)
{
return *(__m128d_u *)__P;
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_load1_pd(double const *__P)
{
return _mm_set1_pd(*__P);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_load_sd(double const *__P)
{
return _mm_set_sd(*__P);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_load_pd1(double const *__P)
{
return _mm_load1_pd(__P);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_loadr_pd(double const *__P)
{
__m128d __tmp = _mm_load_pd(__P);
return __builtin_ia32_shufpd(__tmp, __tmp, (((0) << 1) | (1)));
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_store_pd(double *__P, __m128d __A)
{
*(__m128d *)__P = __A;
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_storeu_pd(double *__P, __m128d __A)
{
*(__m128d_u *)__P = __A;
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_store_sd(double *__P, __m128d __A)
{
*__P = ((__v2df)__A)[0];
}
extern __inline double __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsd_f64(__m128d __A)
{
return ((__v2df)__A)[0];
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_storel_pd(double *__P, __m128d __A)
{
_mm_store_sd(__P, __A);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_storeh_pd(double *__P, __m128d __A)
{
*__P = ((__v2df)__A)[1];
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_store1_pd(double *__P, __m128d __A)
{
_mm_store_pd(__P, __builtin_ia32_shufpd(__A, __A, (((0) << 1) | (0))));
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_store_pd1(double *__P, __m128d __A)
{
_mm_store1_pd(__P, __A);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_storer_pd(double *__P, __m128d __A)
{
_mm_store_pd(__P, __builtin_ia32_shufpd(__A, __A, (((0) << 1) | (1))));
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi128_si32(__m128i __A)
{
return __builtin_ia32_vec_ext_v4si((__v4si)__A, 0);
}
extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi128_si64(__m128i __A)
{
return ((__v2di)__A)[0];
}
extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi128_si64x(__m128i __A)
{
return ((__v2di)__A)[0];
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_add_pd(__m128d __A, __m128d __B)
{
return (__m128d)((__v2df)__A + (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_add_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_addsd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sub_pd(__m128d __A, __m128d __B)
{
return (__m128d)((__v2df)__A - (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sub_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_subsd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_mul_pd(__m128d __A, __m128d __B)
{
return (__m128d)((__v2df)__A * (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_mul_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_mulsd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_div_pd(__m128d __A, __m128d __B)
{
return (__m128d)((__v2df)__A / (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_div_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_divsd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sqrt_pd(__m128d __A)
{
return (__m128d)__builtin_ia32_sqrtpd((__v2df)__A);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sqrt_sd(__m128d __A, __m128d __B)
{
__v2df __tmp = __builtin_ia32_movsd((__v2df)__A, (__v2df)__B);
return (__m128d)__builtin_ia32_sqrtsd((__v2df)__tmp);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_min_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_minpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_min_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_minsd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_max_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_maxpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_max_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_maxsd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_and_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_andpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_andnot_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_andnpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_or_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_orpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_xor_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_xorpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpeq_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpeqpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmplt_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpltpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmple_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmplepd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpgt_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpgtpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpge_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpgepd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpneq_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpneqpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpnlt_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpnltpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpnle_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpnlepd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpngt_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpngtpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpnge_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpngepd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpord_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpordpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpunord_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpunordpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpeq_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpeqsd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmplt_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpltsd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmple_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmplesd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpgt_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_movsd((__v2df)__A,
(__v2df)
__builtin_ia32_cmpltsd((__v2df)__B,
(__v2df)
__A));
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpge_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_movsd((__v2df)__A,
(__v2df)
__builtin_ia32_cmplesd((__v2df)__B,
(__v2df)
__A));
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpneq_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpneqsd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpnlt_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpnltsd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpnle_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpnlesd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpngt_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_movsd((__v2df)__A,
(__v2df)
__builtin_ia32_cmpnltsd((__v2df)__B,
(__v2df)
__A));
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpnge_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_movsd((__v2df)__A,
(__v2df)
__builtin_ia32_cmpnlesd((__v2df)__B,
(__v2df)
__A));
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpord_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpordsd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpunord_sd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_cmpunordsd((__v2df)__A, (__v2df)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_comieq_sd(__m128d __A, __m128d __B)
{
return __builtin_ia32_comisdeq((__v2df)__A, (__v2df)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_comilt_sd(__m128d __A, __m128d __B)
{
return __builtin_ia32_comisdlt((__v2df)__A, (__v2df)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_comile_sd(__m128d __A, __m128d __B)
{
return __builtin_ia32_comisdle((__v2df)__A, (__v2df)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_comigt_sd(__m128d __A, __m128d __B)
{
return __builtin_ia32_comisdgt((__v2df)__A, (__v2df)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_comige_sd(__m128d __A, __m128d __B)
{
return __builtin_ia32_comisdge((__v2df)__A, (__v2df)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_comineq_sd(__m128d __A, __m128d __B)
{
return __builtin_ia32_comisdneq((__v2df)__A, (__v2df)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_ucomieq_sd(__m128d __A, __m128d __B)
{
return __builtin_ia32_ucomisdeq((__v2df)__A, (__v2df)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_ucomilt_sd(__m128d __A, __m128d __B)
{
return __builtin_ia32_ucomisdlt((__v2df)__A, (__v2df)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_ucomile_sd(__m128d __A, __m128d __B)
{
return __builtin_ia32_ucomisdle((__v2df)__A, (__v2df)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_ucomigt_sd(__m128d __A, __m128d __B)
{
return __builtin_ia32_ucomisdgt((__v2df)__A, (__v2df)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_ucomige_sd(__m128d __A, __m128d __B)
{
return __builtin_ia32_ucomisdge((__v2df)__A, (__v2df)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_ucomineq_sd(__m128d __A, __m128d __B)
{
return __builtin_ia32_ucomisdneq((__v2df)__A, (__v2df)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_epi64x(long long __q1, long long __q0)
{
return __extension__(__m128i)(__v2di){__q0, __q1};
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_epi64(__m64 __q1, __m64 __q0)
{
return _mm_set_epi64x((long long)__q1, (long long)__q0);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_epi32(int __q3, int __q2, int __q1, int __q0)
{
return __extension__(__m128i)(__v4si){__q0, __q1, __q2, __q3};
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_epi16(short __q7, short __q6, short __q5, short __q4,
short __q3, short __q2, short __q1, short __q0)
{
return __extension__(__m128i)(__v8hi){
__q0, __q1, __q2, __q3, __q4, __q5, __q6, __q7};
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set_epi8(char __q15, char __q14, char __q13, char __q12,
char __q11, char __q10, char __q09, char __q08,
char __q07, char __q06, char __q05, char __q04,
char __q03, char __q02, char __q01, char __q00)
{
return __extension__(__m128i)(__v16qi){
__q00, __q01, __q02, __q03, __q04, __q05, __q06, __q07,
__q08, __q09, __q10, __q11, __q12, __q13, __q14, __q15};
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set1_epi64x(long long __A)
{
return _mm_set_epi64x(__A, __A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set1_epi64(__m64 __A)
{
return _mm_set_epi64(__A, __A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set1_epi32(int __A)
{
return _mm_set_epi32(__A, __A, __A, __A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set1_epi16(short __A)
{
return _mm_set_epi16(__A, __A, __A, __A, __A, __A, __A, __A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_set1_epi8(char __A)
{
return _mm_set_epi8(__A, __A, __A, __A, __A, __A, __A, __A,
__A, __A, __A, __A, __A, __A, __A, __A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setr_epi64(__m64 __q0, __m64 __q1)
{
return _mm_set_epi64(__q1, __q0);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setr_epi32(int __q0, int __q1, int __q2, int __q3)
{
return _mm_set_epi32(__q3, __q2, __q1, __q0);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setr_epi16(short __q0, short __q1, short __q2, short __q3,
short __q4, short __q5, short __q6, short __q7)
{
return _mm_set_epi16(__q7, __q6, __q5, __q4, __q3, __q2, __q1, __q0);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setr_epi8(char __q00, char __q01, char __q02, char __q03,
char __q04, char __q05, char __q06, char __q07,
char __q08, char __q09, char __q10, char __q11,
char __q12, char __q13, char __q14, char __q15)
{
return _mm_set_epi8(__q15, __q14, __q13, __q12, __q11, __q10, __q09, __q08,
__q07, __q06, __q05, __q04, __q03, __q02, __q01, __q00);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_load_si128(__m128i const *__P)
{
return *__P;
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_loadu_si128(__m128i_u const *__P)
{
return *__P;
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_loadl_epi64(__m128i_u const *__P)
{
return _mm_set_epi64((__m64)0LL, *(__m64_u *)__P);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_loadu_si64(void const *__P)
{
return _mm_loadl_epi64((__m128i_u *)__P);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_store_si128(__m128i *__P, __m128i __B)
{
*__P = __B;
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_storeu_si128(__m128i_u *__P, __m128i __B)
{
*__P = __B;
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_storel_epi64(__m128i_u *__P, __m128i __B)
{
*(__m64_u *)__P = (__m64)((__v2di)__B)[0];
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_storeu_si64(void *__P, __m128i __B)
{
_mm_storel_epi64((__m128i_u *)__P, __B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_movepi64_pi64(__m128i __B)
{
return (__m64)((__v2di)__B)[0];
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_movpi64_epi64(__m64 __A)
{
return _mm_set_epi64((__m64)0LL, __A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_move_epi64(__m128i __A)
{
return (__m128i)__builtin_ia32_movq128((__v2di)__A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_undefined_si128(void)
{
__m128i __Y = __Y;
return __Y;
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_setzero_si128(void)
{
return __extension__(__m128i)(__v4si){0, 0, 0, 0};
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtepi32_pd(__m128i __A)
{
return (__m128d)__builtin_ia32_cvtdq2pd((__v4si)__A);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtepi32_ps(__m128i __A)
{
return (__m128)__builtin_ia32_cvtdq2ps((__v4si)__A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtpd_epi32(__m128d __A)
{
return (__m128i)__builtin_ia32_cvtpd2dq((__v2df)__A);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtpd_pi32(__m128d __A)
{
return (__m64)__builtin_ia32_cvtpd2pi((__v2df)__A);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtpd_ps(__m128d __A)
{
return (__m128)__builtin_ia32_cvtpd2ps((__v2df)__A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvttpd_epi32(__m128d __A)
{
return (__m128i)__builtin_ia32_cvttpd2dq((__v2df)__A);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvttpd_pi32(__m128d __A)
{
return (__m64)__builtin_ia32_cvttpd2pi((__v2df)__A);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtpi32_pd(__m64 __A)
{
return (__m128d)__builtin_ia32_cvtpi2pd((__v2si)__A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtps_epi32(__m128 __A)
{
return (__m128i)__builtin_ia32_cvtps2dq((__v4sf)__A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvttps_epi32(__m128 __A)
{
return (__m128i)__builtin_ia32_cvttps2dq((__v4sf)__A);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtps_pd(__m128 __A)
{
return (__m128d)__builtin_ia32_cvtps2pd((__v4sf)__A);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsd_si32(__m128d __A)
{
return __builtin_ia32_cvtsd2si((__v2df)__A);
}
extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsd_si64(__m128d __A)
{
return __builtin_ia32_cvtsd2si64((__v2df)__A);
}
extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsd_si64x(__m128d __A)
{
return __builtin_ia32_cvtsd2si64((__v2df)__A);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvttsd_si32(__m128d __A)
{
return __builtin_ia32_cvttsd2si((__v2df)__A);
}
extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvttsd_si64(__m128d __A)
{
return __builtin_ia32_cvttsd2si64((__v2df)__A);
}
extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvttsd_si64x(__m128d __A)
{
return __builtin_ia32_cvttsd2si64((__v2df)__A);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsd_ss(__m128 __A, __m128d __B)
{
return (__m128)__builtin_ia32_cvtsd2ss((__v4sf)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi32_sd(__m128d __A, int __B)
{
return (__m128d)__builtin_ia32_cvtsi2sd((__v2df)__A, __B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi64_sd(__m128d __A, long long __B)
{
return (__m128d)__builtin_ia32_cvtsi642sd((__v2df)__A, __B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi64x_sd(__m128d __A, long long __B)
{
return (__m128d)__builtin_ia32_cvtsi642sd((__v2df)__A, __B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtss_sd(__m128d __A, __m128 __B)
{
return (__m128d)__builtin_ia32_cvtss2sd((__v2df)__A, (__v4sf)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpackhi_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_unpckhpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpacklo_pd(__m128d __A, __m128d __B)
{
return (__m128d)__builtin_ia32_unpcklpd((__v2df)__A, (__v2df)__B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_loadh_pd(__m128d __A, double const *__B)
{
return (__m128d)__builtin_ia32_loadhpd((__v2df)__A, __B);
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_loadl_pd(__m128d __A, double const *__B)
{
return (__m128d)__builtin_ia32_loadlpd((__v2df)__A, __B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_movemask_pd(__m128d __A)
{
return __builtin_ia32_movmskpd((__v2df)__A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_packs_epi16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_packsswb128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_packs_epi32(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_packssdw128((__v4si)__A, (__v4si)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_packus_epi16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_packuswb128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpackhi_epi8(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_punpckhbw128((__v16qi)__A, (__v16qi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpackhi_epi16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_punpckhwd128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpackhi_epi32(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_punpckhdq128((__v4si)__A, (__v4si)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpackhi_epi64(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_punpckhqdq128((__v2di)__A, (__v2di)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpacklo_epi8(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_punpcklbw128((__v16qi)__A, (__v16qi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpacklo_epi16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_punpcklwd128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpacklo_epi32(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_punpckldq128((__v4si)__A, (__v4si)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_unpacklo_epi64(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_punpcklqdq128((__v2di)__A, (__v2di)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_add_epi8(__m128i __A, __m128i __B)
{
return (__m128i)((__v16qu)__A + (__v16qu)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_add_epi16(__m128i __A, __m128i __B)
{
return (__m128i)((__v8hu)__A + (__v8hu)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_add_epi32(__m128i __A, __m128i __B)
{
return (__m128i)((__v4su)__A + (__v4su)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_add_epi64(__m128i __A, __m128i __B)
{
return (__m128i)((__v2du)__A + (__v2du)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_adds_epi8(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_paddsb128((__v16qi)__A, (__v16qi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_adds_epi16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_paddsw128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_adds_epu8(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_paddusb128((__v16qi)__A, (__v16qi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_adds_epu16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_paddusw128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sub_epi8(__m128i __A, __m128i __B)
{
return (__m128i)((__v16qu)__A - (__v16qu)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sub_epi16(__m128i __A, __m128i __B)
{
return (__m128i)((__v8hu)__A - (__v8hu)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sub_epi32(__m128i __A, __m128i __B)
{
return (__m128i)((__v4su)__A - (__v4su)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sub_epi64(__m128i __A, __m128i __B)
{
return (__m128i)((__v2du)__A - (__v2du)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_subs_epi8(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_psubsb128((__v16qi)__A, (__v16qi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_subs_epi16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_psubsw128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_subs_epu8(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_psubusb128((__v16qi)__A, (__v16qi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_subs_epu16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_psubusw128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_madd_epi16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_pmaddwd128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_mulhi_epi16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_pmulhw128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_mullo_epi16(__m128i __A, __m128i __B)
{
return (__m128i)((__v8hu)__A * (__v8hu)__B);
}
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_mul_su32(__m64 __A, __m64 __B)
{
return (__m64)__builtin_ia32_pmuludq((__v2si)__A, (__v2si)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_mul_epu32(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_pmuludq128((__v4si)__A, (__v4si)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_slli_epi16(__m128i __A, int __B)
{
return (__m128i)__builtin_ia32_psllwi128((__v8hi)__A, __B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_slli_epi32(__m128i __A, int __B)
{
return (__m128i)__builtin_ia32_pslldi128((__v4si)__A, __B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_slli_epi64(__m128i __A, int __B)
{
return (__m128i)__builtin_ia32_psllqi128((__v2di)__A, __B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srai_epi16(__m128i __A, int __B)
{
return (__m128i)__builtin_ia32_psrawi128((__v8hi)__A, __B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srai_epi32(__m128i __A, int __B)
{
return (__m128i)__builtin_ia32_psradi128((__v4si)__A, __B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srli_epi16(__m128i __A, int __B)
{
return (__m128i)__builtin_ia32_psrlwi128((__v8hi)__A, __B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srli_epi32(__m128i __A, int __B)
{
return (__m128i)__builtin_ia32_psrldi128((__v4si)__A, __B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srli_epi64(__m128i __A, int __B)
{
return (__m128i)__builtin_ia32_psrlqi128((__v2di)__A, __B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sll_epi16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_psllw128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sll_epi32(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_pslld128((__v4si)__A, (__v4si)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sll_epi64(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_psllq128((__v2di)__A, (__v2di)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sra_epi16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_psraw128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sra_epi32(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_psrad128((__v4si)__A, (__v4si)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srl_epi16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_psrlw128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srl_epi32(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_psrld128((__v4si)__A, (__v4si)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_srl_epi64(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_psrlq128((__v2di)__A, (__v2di)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_and_si128(__m128i __A, __m128i __B)
{
return (__m128i)((__v2du)__A & (__v2du)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_andnot_si128(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_pandn128((__v2di)__A, (__v2di)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_or_si128(__m128i __A, __m128i __B)
{
return (__m128i)((__v2du)__A | (__v2du)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_xor_si128(__m128i __A, __m128i __B)
{
return (__m128i)((__v2du)__A ^ (__v2du)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpeq_epi8(__m128i __A, __m128i __B)
{
return (__m128i)((__v16qi)__A == (__v16qi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpeq_epi16(__m128i __A, __m128i __B)
{
return (__m128i)((__v8hi)__A == (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpeq_epi32(__m128i __A, __m128i __B)
{
return (__m128i)((__v4si)__A == (__v4si)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmplt_epi8(__m128i __A, __m128i __B)
{
return (__m128i)((__v16qs)__A < (__v16qs)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmplt_epi16(__m128i __A, __m128i __B)
{
return (__m128i)((__v8hi)__A < (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmplt_epi32(__m128i __A, __m128i __B)
{
return (__m128i)((__v4si)__A < (__v4si)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpgt_epi8(__m128i __A, __m128i __B)
{
return (__m128i)((__v16qs)__A > (__v16qs)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpgt_epi16(__m128i __A, __m128i __B)
{
return (__m128i)((__v8hi)__A > (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cmpgt_epi32(__m128i __A, __m128i __B)
{
return (__m128i)((__v4si)__A > (__v4si)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_max_epi16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_pmaxsw128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_max_epu8(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_pmaxub128((__v16qi)__A, (__v16qi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_min_epi16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_pminsw128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_min_epu8(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_pminub128((__v16qi)__A, (__v16qi)__B);
}
extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_movemask_epi8(__m128i __A)
{
return __builtin_ia32_pmovmskb128((__v16qi)__A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_mulhi_epu16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_pmulhuw128((__v8hi)__A, (__v8hi)__B);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_maskmoveu_si128(__m128i __A, __m128i __B, char *__C)
{
__builtin_ia32_maskmovdqu((__v16qi)__A, (__v16qi)__B, __C);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_avg_epu8(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_pavgb128((__v16qi)__A, (__v16qi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_avg_epu16(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_pavgw128((__v8hi)__A, (__v8hi)__B);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_sad_epu8(__m128i __A, __m128i __B)
{
return (__m128i)__builtin_ia32_psadbw128((__v16qi)__A, (__v16qi)__B);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_stream_si32(int *__A, int __B)
{
__builtin_ia32_movnti(__A, __B);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_stream_si64(long long int *__A, long long int __B)
{
__builtin_ia32_movnti64(__A, __B);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_stream_si128(__m128i *__A, __m128i __B)
{
__builtin_ia32_movntdq((__v2di *)__A, (__v2di)__B);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_stream_pd(double *__A, __m128d __B)
{
__builtin_ia32_movntpd(__A, (__v2df)__B);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_clflush(void const *__A)
{
__builtin_ia32_clflush(__A);
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_lfence(void)
{
__builtin_ia32_lfence();
}
extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_mfence(void)
{
__builtin_ia32_mfence();
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi32_si128(int __A)
{
return _mm_set_epi32(0, 0, 0, __A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi64_si128(long long __A)
{
return _mm_set_epi64x(0, __A);
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtsi64x_si128(long long __A)
{
return _mm_set_epi64x(0, __A);
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_castpd_ps(__m128d __A)
{
return (__m128)__A;
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_castpd_si128(__m128d __A)
{
return (__m128i)__A;
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_castps_pd(__m128 __A)
{
return (__m128d)__A;
}
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_castps_si128(__m128 __A)
{
return (__m128i)__A;
}
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_castsi128_ps(__m128i __A)
{
return (__m128)__A;
}
extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_castsi128_pd(__m128i __A)
{
return (__m128d)__A;
}
unsigned int __getcallerseflags(void);
DWORD __segmentlimit(DWORD Selector);
LONGLONG __mulh(LONGLONG Multiplier, LONGLONG Multiplicand);
ULONGLONG __umulh(ULONGLONG Multiplier, ULONGLONG Multiplicand);
DWORD64 __shiftleft128(DWORD64 LowPart, DWORD64 HighPart, BYTE Shift);
DWORD64 __shiftright128(DWORD64 LowPart, DWORD64 HighPart, BYTE Shift);
LONG64 _mul128(LONG64 Multiplier, LONG64 Multiplicand, LONG64 *HighProduct);
DWORD64 _umul128(DWORD64 Multiplier, DWORD64 Multiplicand, DWORD64 *HighProduct);
LONG64 MultiplyExtract128(LONG64 Multiplier, LONG64 Multiplicand, BYTE Shift);
DWORD64 UnsignedMultiplyExtract128(DWORD64 Multiplier, DWORD64 Multiplicand, BYTE Shift);
typedef struct _XMM_SAVE_AREA32
{
WORD ControlWord;
WORD StatusWord;
BYTE TagWord;
BYTE Reserved1;
WORD ErrorOpcode;
DWORD ErrorOffset;
WORD ErrorSelector;
WORD Reserved2;
DWORD DataOffset;
WORD DataSelector;
WORD Reserved3;
DWORD MxCsr;
DWORD MxCsr_Mask;
M128A FloatRegisters[8];
M128A XmmRegisters[16];
BYTE Reserved4[96];
} XMM_SAVE_AREA32, *PXMM_SAVE_AREA32;
typedef struct __attribute__((__aligned__(16))) _CONTEXT
{
DWORD64 P1Home;
DWORD64 P2Home;
DWORD64 P3Home;
DWORD64 P4Home;
DWORD64 P5Home;
DWORD64 P6Home;
DWORD ContextFlags;
DWORD MxCsr;
WORD SegCs;
WORD SegDs;
WORD SegEs;
WORD SegFs;
WORD SegGs;
WORD SegSs;
DWORD EFlags;
DWORD64 Dr0;
DWORD64 Dr1;
DWORD64 Dr2;
DWORD64 Dr3;
DWORD64 Dr6;
DWORD64 Dr7;
DWORD64 Rax;
DWORD64 Rcx;
DWORD64 Rdx;
DWORD64 Rbx;
DWORD64 Rsp;
DWORD64 Rbp;
DWORD64 Rsi;
DWORD64 Rdi;
DWORD64 R8;
DWORD64 R9;
DWORD64 R10;
DWORD64 R11;
DWORD64 R12;
DWORD64 R13;
DWORD64 R14;
DWORD64 R15;
DWORD64 Rip;
__extension__ union {
XMM_SAVE_AREA32 FltSave;
XMM_SAVE_AREA32 FloatSave;
__extension__ struct
{
M128A Header[2];
M128A Legacy[8];
M128A Xmm0;
M128A Xmm1;
M128A Xmm2;
M128A Xmm3;
M128A Xmm4;
M128A Xmm5;
M128A Xmm6;
M128A Xmm7;
M128A Xmm8;
M128A Xmm9;
M128A Xmm10;
M128A Xmm11;
M128A Xmm12;
M128A Xmm13;
M128A Xmm14;
M128A Xmm15;
};
};
M128A VectorRegister[26];
DWORD64 VectorControl;
DWORD64 DebugControl;
DWORD64 LastBranchToRip;
DWORD64 LastBranchFromRip;
DWORD64 LastExceptionToRip;
DWORD64 LastExceptionFromRip;
} CONTEXT, *PCONTEXT;
typedef struct _RUNTIME_FUNCTION
{
DWORD BeginAddress;
DWORD EndAddress;
DWORD UnwindData;
} RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
typedef PRUNTIME_FUNCTION (*PGET_RUNTIME_FUNCTION_CALLBACK)(DWORD64 ControlPc, PVOID Context);
typedef DWORD (*POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK)(HANDLE Process, PVOID TableAddress, PDWORD Entries, PRUNTIME_FUNCTION *Functions);
typedef struct _LDT_ENTRY
{
WORD LimitLow;
WORD BaseLow;
union {
struct
{
BYTE BaseMid;
BYTE Flags1;
BYTE Flags2;
BYTE BaseHi;
} Bytes;
struct
{
DWORD BaseMid : 8;
DWORD Type : 5;
DWORD Dpl : 2;
DWORD Pres : 1;
DWORD LimitHi : 4;
DWORD Sys : 1;
DWORD Reserved_0 : 1;
DWORD Default_Big : 1;
DWORD Granularity : 1;
DWORD BaseHi : 8;
} Bits;
} HighWord;
} LDT_ENTRY, *PLDT_ENTRY;
typedef struct _EXCEPTION_RECORD
{
DWORD ExceptionCode;
DWORD ExceptionFlags;
struct _EXCEPTION_RECORD *ExceptionRecord;
PVOID ExceptionAddress;
DWORD NumberParameters;
ULONG_PTR ExceptionInformation[15];
} EXCEPTION_RECORD;
typedef EXCEPTION_RECORD *PEXCEPTION_RECORD;
typedef struct _EXCEPTION_RECORD32
{
DWORD ExceptionCode;
DWORD ExceptionFlags;
DWORD ExceptionRecord;
DWORD ExceptionAddress;
DWORD NumberParameters;
DWORD ExceptionInformation[15];
} EXCEPTION_RECORD32, *PEXCEPTION_RECORD32;
typedef struct _EXCEPTION_RECORD64
{
DWORD ExceptionCode;
DWORD ExceptionFlags;
DWORD64 ExceptionRecord;
DWORD64 ExceptionAddress;
DWORD NumberParameters;
DWORD __unusedAlignment;
DWORD64 ExceptionInformation[15];
} EXCEPTION_RECORD64, *PEXCEPTION_RECORD64;
typedef struct _EXCEPTION_POINTERS
{
PEXCEPTION_RECORD ExceptionRecord;
PCONTEXT ContextRecord;
} EXCEPTION_POINTERS, *PEXCEPTION_POINTERS;
typedef struct _UNWIND_HISTORY_TABLE_ENTRY
{
ULONG64 ImageBase;
PRUNTIME_FUNCTION FunctionEntry;
} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
typedef struct _UNWIND_HISTORY_TABLE
{
ULONG Count;
BYTE LocalHint;
BYTE GlobalHint;
BYTE Search;
BYTE Once;
ULONG64 LowAddress;
ULONG64 HighAddress;
UNWIND_HISTORY_TABLE_ENTRY Entry[12];
} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
struct _DISPATCHER_CONTEXT;
typedef struct _DISPATCHER_CONTEXT DISPATCHER_CONTEXT;
typedef struct _DISPATCHER_CONTEXT *PDISPATCHER_CONTEXT;
struct _DISPATCHER_CONTEXT
{
ULONG64 ControlPc;
ULONG64 ImageBase;
PRUNTIME_FUNCTION FunctionEntry;
ULONG64 EstablisherFrame;
ULONG64 TargetIp;
PCONTEXT ContextRecord;
PEXCEPTION_ROUTINE LanguageHandler;
PVOID HandlerData;
PUNWIND_HISTORY_TABLE HistoryTable;
ULONG ScopeIndex;
ULONG Fill0;
};
typedef struct _KNONVOLATILE_CONTEXT_POINTERS
{
PM128A FloatingContext[16];
PULONG64 IntegerContext[16];
} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
typedef PVOID PACCESS_TOKEN;
typedef PVOID PSECURITY_DESCRIPTOR;
typedef PVOID PSID;
typedef PVOID PCLAIMS_BLOB;
typedef DWORD ACCESS_MASK;
typedef ACCESS_MASK *PACCESS_MASK;
typedef struct _GENERIC_MAPPING
{
ACCESS_MASK GenericRead;
ACCESS_MASK GenericWrite;
ACCESS_MASK GenericExecute;
ACCESS_MASK GenericAll;
} GENERIC_MAPPING;
typedef GENERIC_MAPPING *PGENERIC_MAPPING;
typedef struct _LUID_AND_ATTRIBUTES
{
LUID Luid;
DWORD Attributes;
} LUID_AND_ATTRIBUTES, *PLUID_AND_ATTRIBUTES;
typedef LUID_AND_ATTRIBUTES LUID_AND_ATTRIBUTES_ARRAY[1];
typedef LUID_AND_ATTRIBUTES_ARRAY *PLUID_AND_ATTRIBUTES_ARRAY;
typedef struct _SID_IDENTIFIER_AUTHORITY
{
BYTE Value[6];
} SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
typedef struct _SID
{
BYTE Revision;
BYTE SubAuthorityCount;
SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
DWORD SubAuthority[1];
} SID, *PISID;
typedef enum _SID_NAME_USE
{
SidTypeUser = 1,
SidTypeGroup,
SidTypeDomain,
SidTypeAlias,
SidTypeWellKnownGroup,
SidTypeDeletedAccount,
SidTypeInvalid,
SidTypeUnknown,
SidTypeComputer,
SidTypeLabel,
SidTypeLogonSession
} SID_NAME_USE,
*PSID_NAME_USE;
typedef struct _SID_AND_ATTRIBUTES
{
PSID Sid;
DWORD Attributes;
} SID_AND_ATTRIBUTES, *PSID_AND_ATTRIBUTES;
typedef SID_AND_ATTRIBUTES SID_AND_ATTRIBUTES_ARRAY[1];
typedef SID_AND_ATTRIBUTES_ARRAY *PSID_AND_ATTRIBUTES_ARRAY;
typedef ULONG_PTR SID_HASH_ENTRY, *PSID_HASH_ENTRY;
typedef struct _SID_AND_ATTRIBUTES_HASH
{
DWORD SidCount;
PSID_AND_ATTRIBUTES SidAttr;
SID_HASH_ENTRY Hash[32];
} SID_AND_ATTRIBUTES_HASH, *PSID_AND_ATTRIBUTES_HASH;
typedef enum
{
WinNullSid = 0,
WinWorldSid = 1,
WinLocalSid = 2,
WinCreatorOwnerSid = 3,
WinCreatorGroupSid = 4,
WinCreatorOwnerServerSid = 5,
WinCreatorGroupServerSid = 6,
WinNtAuthoritySid = 7,
WinDialupSid = 8,
WinNetworkSid = 9,
WinBatchSid = 10,
WinInteractiveSid = 11,
WinServiceSid = 12,
WinAnonymousSid = 13,
WinProxySid = 14,
WinEnterpriseControllersSid = 15,
WinSelfSid = 16,
WinAuthenticatedUserSid = 17,
WinRestrictedCodeSid = 18,
WinTerminalServerSid = 19,
WinRemoteLogonIdSid = 20,
WinLogonIdsSid = 21,
WinLocalSystemSid = 22,
WinLocalServiceSid = 23,
WinNetworkServiceSid = 24,
WinBuiltinDomainSid = 25,
WinBuiltinAdministratorsSid = 26,
WinBuiltinUsersSid = 27,
WinBuiltinGuestsSid = 28,
WinBuiltinPowerUsersSid = 29,
WinBuiltinAccountOperatorsSid = 30,
WinBuiltinSystemOperatorsSid = 31,
WinBuiltinPrintOperatorsSid = 32,
WinBuiltinBackupOperatorsSid = 33,
WinBuiltinReplicatorSid = 34,
WinBuiltinPreWindows2000CompatibleAccessSid = 35,
WinBuiltinRemoteDesktopUsersSid = 36,
WinBuiltinNetworkConfigurationOperatorsSid = 37,
WinAccountAdministratorSid = 38,
WinAccountGuestSid = 39,
WinAccountKrbtgtSid = 40,
WinAccountDomainAdminsSid = 41,
WinAccountDomainUsersSid = 42,
WinAccountDomainGuestsSid = 43,
WinAccountComputersSid = 44,
WinAccountControllersSid = 45,
WinAccountCertAdminsSid = 46,
WinAccountSchemaAdminsSid = 47,
WinAccountEnterpriseAdminsSid = 48,
WinAccountPolicyAdminsSid = 49,
WinAccountRasAndIasServersSid = 50,
WinNTLMAuthenticationSid = 51,
WinDigestAuthenticationSid = 52,
WinSChannelAuthenticationSid = 53,
WinThisOrganizationSid = 54,
WinOtherOrganizationSid = 55,
WinBuiltinIncomingForestTrustBuildersSid = 56,
WinBuiltinPerfMonitoringUsersSid = 57,
WinBuiltinPerfLoggingUsersSid = 58,
WinBuiltinAuthorizationAccessSid = 59,
WinBuiltinTerminalServerLicenseServersSid = 60,
WinBuiltinDCOMUsersSid = 61,
WinBuiltinIUsersSid = 62,
WinIUserSid = 63,
WinBuiltinCryptoOperatorsSid = 64,
WinUntrustedLabelSid = 65,
WinLowLabelSid = 66,
WinMediumLabelSid = 67,
WinHighLabelSid = 68,
WinSystemLabelSid = 69,
WinWriteRestrictedCodeSid = 70,
WinCreatorOwnerRightsSid = 71,
WinCacheablePrincipalsGroupSid = 72,
WinNonCacheablePrincipalsGroupSid = 73,
WinEnterpriseReadonlyControllersSid = 74,
WinAccountReadonlyControllersSid = 75,
WinBuiltinEventLogReadersGroup = 76,
WinNewEnterpriseReadonlyControllersSid = 77,
WinBuiltinCertSvcDComAccessGroup = 78,
WinMediumPlusLabelSid = 79,
WinLocalLogonSid = 80,
WinConsoleLogonSid = 81,
WinThisOrganizationCertificateSid = 82,
WinApplicationPackageAuthoritySid = 83,
WinBuiltinAnyPackageSid = 84,
WinCapabilityInternetClientSid = 85,
WinCapabilityInternetClientServerSid = 86,
WinCapabilityPrivateNetworkClientServerSid = 87,
WinCapabilityPicturesLibrarySid = 88,
WinCapabilityVideosLibrarySid = 89,
WinCapabilityMusicLibrarySid = 90,
WinCapabilityDocumentsLibrarySid = 91,
WinCapabilitySharedUserCertificatesSid = 92,
WinCapabilityEnterpriseAuthenticationSid = 93,
WinCapabilityRemovableStorageSid = 94,
WinBuiltinRDSRemoteAccessServersSid = 95,
WinBuiltinRDSEndpointServersSid = 96,
WinBuiltinRDSManagementServersSid = 97,
WinUserModeDriversSid = 98,
WinBuiltinHyperVAdminsSid = 99,
WinAccountCloneableControllersSid = 100,
WinBuiltinAccessControlAssistanceOperatorsSid = 101,
WinBuiltinRemoteManagementUsersSid = 102,
WinAuthenticationAuthorityAssertedSid = 103,
WinAuthenticationServiceAssertedSid = 104,
WinLocalAccountSid = 105,
WinLocalAccountAndAdministratorSid = 106,
WinAccountProtectedUsersSid = 107,
WinCapabilityAppointmentsSid = 108,
WinCapabilityContactsSid = 109,
WinAccountDefaultSystemManagedSid = 110,
WinBuiltinDefaultSystemManagedGroupSid = 111,
WinBuiltinStorageReplicaAdminsSid = 112,
WinAccountKeyAdminsSid = 113,
WinAccountEnterpriseKeyAdminsSid = 114,
WinAuthenticationKeyTrustSid = 115,
WinAuthenticationKeyPropertyMFASid = 116,
WinAuthenticationKeyPropertyAttestationSid = 117
} WELL_KNOWN_SID_TYPE;
typedef struct _ACL
{
BYTE AclRevision;
BYTE Sbz1;
WORD AclSize;
WORD AceCount;
WORD Sbz2;
} ACL;
typedef ACL *PACL;
typedef struct _ACE_HEADER
{
BYTE AceType;
BYTE AceFlags;
WORD AceSize;
} ACE_HEADER;
typedef ACE_HEADER *PACE_HEADER;
typedef struct _ACCESS_ALLOWED_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} ACCESS_ALLOWED_ACE;
typedef ACCESS_ALLOWED_ACE *PACCESS_ALLOWED_ACE;
typedef struct _ACCESS_DENIED_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} ACCESS_DENIED_ACE;
typedef ACCESS_DENIED_ACE *PACCESS_DENIED_ACE;
typedef struct _SYSTEM_AUDIT_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} SYSTEM_AUDIT_ACE;
typedef SYSTEM_AUDIT_ACE *PSYSTEM_AUDIT_ACE;
typedef struct _SYSTEM_ALARM_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} SYSTEM_ALARM_ACE;
typedef SYSTEM_ALARM_ACE *PSYSTEM_ALARM_ACE;
typedef struct _SYSTEM_RESOURCE_ATTRIBUTE_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} SYSTEM_RESOURCE_ATTRIBUTE_ACE, *PSYSTEM_RESOURCE_ATTRIBUTE_ACE;
typedef struct _SYSTEM_SCOPED_POLICY_ID_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} SYSTEM_SCOPED_POLICY_ID_ACE, *PSYSTEM_SCOPED_POLICY_ID_ACE;
typedef struct _SYSTEM_MANDATORY_LABEL_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} SYSTEM_MANDATORY_LABEL_ACE, *PSYSTEM_MANDATORY_LABEL_ACE;
typedef struct _ACCESS_ALLOWED_OBJECT_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} ACCESS_ALLOWED_OBJECT_ACE, *PACCESS_ALLOWED_OBJECT_ACE;
typedef struct _ACCESS_DENIED_OBJECT_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} ACCESS_DENIED_OBJECT_ACE, *PACCESS_DENIED_OBJECT_ACE;
typedef struct _SYSTEM_AUDIT_OBJECT_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} SYSTEM_AUDIT_OBJECT_ACE, *PSYSTEM_AUDIT_OBJECT_ACE;
typedef struct _SYSTEM_ALARM_OBJECT_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} SYSTEM_ALARM_OBJECT_ACE, *PSYSTEM_ALARM_OBJECT_ACE;
typedef struct _ACCESS_ALLOWED_CALLBACK_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} ACCESS_ALLOWED_CALLBACK_ACE, *PACCESS_ALLOWED_CALLBACK_ACE;
typedef struct _ACCESS_DENIED_CALLBACK_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} ACCESS_DENIED_CALLBACK_ACE, *PACCESS_DENIED_CALLBACK_ACE;
typedef struct _SYSTEM_AUDIT_CALLBACK_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} SYSTEM_AUDIT_CALLBACK_ACE, *PSYSTEM_AUDIT_CALLBACK_ACE;
typedef struct _SYSTEM_ALARM_CALLBACK_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} SYSTEM_ALARM_CALLBACK_ACE, *PSYSTEM_ALARM_CALLBACK_ACE;
typedef struct _ACCESS_ALLOWED_CALLBACK_OBJECT_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} ACCESS_ALLOWED_CALLBACK_OBJECT_ACE, *PACCESS_ALLOWED_CALLBACK_OBJECT_ACE;
typedef struct _ACCESS_DENIED_CALLBACK_OBJECT_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} ACCESS_DENIED_CALLBACK_OBJECT_ACE, *PACCESS_DENIED_CALLBACK_OBJECT_ACE;
typedef struct _SYSTEM_AUDIT_CALLBACK_OBJECT_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} SYSTEM_AUDIT_CALLBACK_OBJECT_ACE, *PSYSTEM_AUDIT_CALLBACK_OBJECT_ACE;
typedef struct _SYSTEM_ALARM_CALLBACK_OBJECT_ACE
{
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} SYSTEM_ALARM_CALLBACK_OBJECT_ACE, *PSYSTEM_ALARM_CALLBACK_OBJECT_ACE;
typedef enum _ACL_INFORMATION_CLASS
{
AclRevisionInformation = 1,
AclSizeInformation
} ACL_INFORMATION_CLASS;
typedef struct _ACL_REVISION_INFORMATION
{
DWORD AclRevision;
} ACL_REVISION_INFORMATION;
typedef ACL_REVISION_INFORMATION *PACL_REVISION_INFORMATION;
typedef struct _ACL_SIZE_INFORMATION
{
DWORD AceCount;
DWORD AclBytesInUse;
DWORD AclBytesFree;
} ACL_SIZE_INFORMATION;
typedef ACL_SIZE_INFORMATION *PACL_SIZE_INFORMATION;
typedef WORD SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
typedef struct _SECURITY_DESCRIPTOR_RELATIVE
{
BYTE Revision;
BYTE Sbz1;
SECURITY_DESCRIPTOR_CONTROL Control;
DWORD Owner;
DWORD Group;
DWORD Sacl;
DWORD Dacl;
} SECURITY_DESCRIPTOR_RELATIVE, *PISECURITY_DESCRIPTOR_RELATIVE;
typedef struct _SECURITY_DESCRIPTOR
{
BYTE Revision;
BYTE Sbz1;
SECURITY_DESCRIPTOR_CONTROL Control;
PSID Owner;
PSID Group;
PACL Sacl;
PACL Dacl;
} SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR;
typedef struct _OBJECT_TYPE_LIST
{
WORD Level;
WORD Sbz;
GUID *ObjectType;
} OBJECT_TYPE_LIST, *POBJECT_TYPE_LIST;
typedef enum _AUDIT_EVENT_TYPE
{
AuditEventObjectAccess,
AuditEventDirectoryServiceAccess
} AUDIT_EVENT_TYPE,
*PAUDIT_EVENT_TYPE;
typedef struct _PRIVILEGE_SET
{
DWORD PrivilegeCount;
DWORD Control;
LUID_AND_ATTRIBUTES Privilege[1];
} PRIVILEGE_SET, *PPRIVILEGE_SET;
typedef enum _ACCESS_REASON_TYPE
{
AccessReasonNone = 0x00000000,
AccessReasonAllowedAce = 0x00010000,
AccessReasonDeniedAce = 0x00020000,
AccessReasonAllowedParentAce = 0x00030000,
AccessReasonDeniedParentAce = 0x00040000,
AccessReasonNotGrantedByCape = 0x00050000,
AccessReasonNotGrantedByParentCape = 0x00060000,
AccessReasonNotGrantedToAppContainer = 0x00070000,
AccessReasonMissingPrivilege = 0x00100000,
AccessReasonFromPrivilege = 0x00200000,
AccessReasonIntegrityLevel = 0x00300000,
AccessReasonOwnership = 0x00400000,
AccessReasonNullDacl = 0x00500000,
AccessReasonEmptyDacl = 0x00600000,
AccessReasonNoSD = 0x00700000,
AccessReasonNoGrant = 0x00800000
} ACCESS_REASON_TYPE;
typedef DWORD ACCESS_REASON;
typedef struct _ACCESS_REASONS
{
ACCESS_REASON Data[32];
} ACCESS_REASONS, *PACCESS_REASONS;
typedef struct _SE_SECURITY_DESCRIPTOR
{
DWORD Size;
DWORD Flags;
PSECURITY_DESCRIPTOR SecurityDescriptor;
} SE_SECURITY_DESCRIPTOR, *PSE_SECURITY_DESCRIPTOR;
typedef struct _SE_ACCESS_REQUEST
{
DWORD Size;
PSE_SECURITY_DESCRIPTOR SeSecurityDescriptor;
ACCESS_MASK DesiredAccess;
ACCESS_MASK PreviouslyGrantedAccess;
PSID PrincipalSelfSid;
PGENERIC_MAPPING GenericMapping;
DWORD ObjectTypeListCount;
POBJECT_TYPE_LIST ObjectTypeList;
} SE_ACCESS_REQUEST, *PSE_ACCESS_REQUEST;
typedef struct _SE_ACCESS_REPLY
{
DWORD Size;
DWORD ResultListCount;
PACCESS_MASK GrantedAccess;
PDWORD AccessStatus;
PACCESS_REASONS AccessReason;
PPRIVILEGE_SET *Privileges;
} SE_ACCESS_REPLY, *PSE_ACCESS_REPLY;
typedef enum _SECURITY_IMPERSONATION_LEVEL
{
SecurityAnonymous,
SecurityIdentification,
SecurityImpersonation,
SecurityDelegation
} SECURITY_IMPERSONATION_LEVEL,
*PSECURITY_IMPERSONATION_LEVEL;
typedef enum _TOKEN_TYPE
{
TokenPrimary = 1,
TokenImpersonation
} TOKEN_TYPE;
typedef TOKEN_TYPE *PTOKEN_TYPE;
typedef enum _TOKEN_ELEVATION_TYPE
{
TokenElevationTypeDefault = 1,
TokenElevationTypeFull,
TokenElevationTypeLimited
} TOKEN_ELEVATION_TYPE,
*PTOKEN_ELEVATION_TYPE;
typedef enum _TOKEN_INFORMATION_CLASS
{
TokenUser = 1,
TokenGroups,
TokenPrivileges,
TokenOwner,
TokenPrimaryGroup,
TokenDefaultDacl,
TokenSource,
TokenType,
TokenImpersonationLevel,
TokenStatistics,
TokenRestrictedSids,
TokenSessionId,
TokenGroupsAndPrivileges,
TokenSessionReference,
TokenSandBoxInert,
TokenAuditPolicy,
TokenOrigin,
TokenElevationType,
TokenLinkedToken,
TokenElevation,
TokenHasRestrictions,
TokenAccessInformation,
TokenVirtualizationAllowed,
TokenVirtualizationEnabled,
TokenIntegrityLevel,
TokenUIAccess,
TokenMandatoryPolicy,
TokenLogonSid,
TokenIsAppContainer,
TokenCapabilities,
TokenAppContainerSid,
TokenAppContainerNumber,
TokenUserClaimAttributes,
TokenDeviceClaimAttributes,
TokenRestrictedUserClaimAttributes,
TokenRestrictedDeviceClaimAttributes,
TokenDeviceGroups,
TokenRestrictedDeviceGroups,
TokenSecurityAttributes,
TokenIsRestricted,
MaxTokenInfoClass
} TOKEN_INFORMATION_CLASS,
*PTOKEN_INFORMATION_CLASS;
typedef struct _TOKEN_USER
{
SID_AND_ATTRIBUTES User;
} TOKEN_USER, *PTOKEN_USER;
typedef struct _TOKEN_GROUPS
{
DWORD GroupCount;
SID_AND_ATTRIBUTES Groups[1];
} TOKEN_GROUPS, *PTOKEN_GROUPS;
typedef struct _TOKEN_PRIVILEGES
{
DWORD PrivilegeCount;
LUID_AND_ATTRIBUTES Privileges[1];
} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
typedef struct _TOKEN_OWNER
{
PSID Owner;
} TOKEN_OWNER, *PTOKEN_OWNER;
typedef struct _TOKEN_PRIMARY_GROUP
{
PSID PrimaryGroup;
} TOKEN_PRIMARY_GROUP, *PTOKEN_PRIMARY_GROUP;
typedef struct _TOKEN_DEFAULT_DACL
{
PACL DefaultDacl;
} TOKEN_DEFAULT_DACL, *PTOKEN_DEFAULT_DACL;
typedef struct _TOKEN_USER_CLAIMS
{
PCLAIMS_BLOB UserClaims;
} TOKEN_USER_CLAIMS, *PTOKEN_USER_CLAIMS;
typedef struct _TOKEN_DEVICE_CLAIMS
{
PCLAIMS_BLOB DeviceClaims;
} TOKEN_DEVICE_CLAIMS, *PTOKEN_DEVICE_CLAIMS;
typedef struct _TOKEN_GROUPS_AND_PRIVILEGES
{
DWORD SidCount;
DWORD SidLength;
PSID_AND_ATTRIBUTES Sids;
DWORD RestrictedSidCount;
DWORD RestrictedSidLength;
PSID_AND_ATTRIBUTES RestrictedSids;
DWORD PrivilegeCount;
DWORD PrivilegeLength;
PLUID_AND_ATTRIBUTES Privileges;
LUID AuthenticationId;
} TOKEN_GROUPS_AND_PRIVILEGES, *PTOKEN_GROUPS_AND_PRIVILEGES;
typedef struct _TOKEN_LINKED_TOKEN
{
HANDLE LinkedToken;
} TOKEN_LINKED_TOKEN, *PTOKEN_LINKED_TOKEN;
typedef struct _TOKEN_ELEVATION
{
DWORD TokenIsElevated;
} TOKEN_ELEVATION, *PTOKEN_ELEVATION;
typedef struct _TOKEN_MANDATORY_LABEL
{
SID_AND_ATTRIBUTES Label;
} TOKEN_MANDATORY_LABEL, *PTOKEN_MANDATORY_LABEL;
typedef struct _TOKEN_MANDATORY_POLICY
{
DWORD Policy;
} TOKEN_MANDATORY_POLICY, *PTOKEN_MANDATORY_POLICY;
typedef struct _TOKEN_ACCESS_INFORMATION
{
PSID_AND_ATTRIBUTES_HASH SidHash;
PSID_AND_ATTRIBUTES_HASH RestrictedSidHash;
PTOKEN_PRIVILEGES Privileges;
LUID AuthenticationId;
TOKEN_TYPE TokenType;
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
TOKEN_MANDATORY_POLICY MandatoryPolicy;
DWORD Flags;
DWORD AppContainerNumber;
PSID PackageSid;
PSID_AND_ATTRIBUTES_HASH CapabilitiesHash;
} TOKEN_ACCESS_INFORMATION, *PTOKEN_ACCESS_INFORMATION;
typedef struct _TOKEN_AUDIT_POLICY
{
UCHAR PerUserPolicy[(((56)) >> 1) + 1];
} TOKEN_AUDIT_POLICY, *PTOKEN_AUDIT_POLICY;
typedef struct _TOKEN_SOURCE
{
CHAR SourceName[8];
LUID SourceIdentifier;
} TOKEN_SOURCE, *PTOKEN_SOURCE;
typedef struct _TOKEN_STATISTICS
{
LUID TokenId;
LUID AuthenticationId;
LARGE_INTEGER ExpirationTime;
TOKEN_TYPE TokenType;
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
DWORD DynamicCharged;
DWORD DynamicAvailable;
DWORD GroupCount;
DWORD PrivilegeCount;
LUID ModifiedId;
} TOKEN_STATISTICS, *PTOKEN_STATISTICS;
typedef struct _TOKEN_CONTROL
{
LUID TokenId;
LUID AuthenticationId;
LUID ModifiedId;
TOKEN_SOURCE TokenSource;
} TOKEN_CONTROL, *PTOKEN_CONTROL;
typedef struct _TOKEN_ORIGIN
{
LUID OriginatingLogonSession;
} TOKEN_ORIGIN, *PTOKEN_ORIGIN;
typedef enum _MANDATORY_LEVEL
{
MandatoryLevelUntrusted = 0,
MandatoryLevelLow,
MandatoryLevelMedium,
MandatoryLevelHigh,
MandatoryLevelSystem,
MandatoryLevelSecureProcess,
MandatoryLevelCount
} MANDATORY_LEVEL,
*PMANDATORY_LEVEL;
typedef struct _TOKEN_APPCONTAINER_INFORMATION
{
PSID TokenAppContainer;
} TOKEN_APPCONTAINER_INFORMATION, *PTOKEN_APPCONTAINER_INFORMATION;
typedef struct _CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE
{
DWORD64 Version;
PWSTR Name;
} CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE, *PCLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE;
typedef struct _CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE
{
PVOID pValue;
DWORD ValueLength;
} CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE, *PCLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE;
typedef struct _CLAIM_SECURITY_ATTRIBUTE_V1
{
PWSTR Name;
WORD ValueType;
WORD Reserved;
DWORD Flags;
DWORD ValueCount;
union {
PLONG64 pInt64;
PDWORD64 pUint64;
PWSTR *ppString;
PCLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE pFqbn;
PCLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE pOctetString;
} Values;
} CLAIM_SECURITY_ATTRIBUTE_V1, *PCLAIM_SECURITY_ATTRIBUTE_V1;
typedef struct _CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1
{
DWORD Name;
WORD ValueType;
WORD Reserved;
DWORD Flags;
DWORD ValueCount;
union {
DWORD pInt64[1];
DWORD pUint64[1];
DWORD ppString[1];
DWORD pFqbn[1];
DWORD pOctetString[1];
} Values;
} CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1, *PCLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1;
typedef struct _CLAIM_SECURITY_ATTRIBUTES_INFORMATION
{
WORD Version;
WORD Reserved;
DWORD AttributeCount;
union {
PCLAIM_SECURITY_ATTRIBUTE_V1 pAttributeV1;
} Attribute;
} CLAIM_SECURITY_ATTRIBUTES_INFORMATION, *PCLAIM_SECURITY_ATTRIBUTES_INFORMATION;
typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE, *PSECURITY_CONTEXT_TRACKING_MODE;
typedef struct _SECURITY_QUALITY_OF_SERVICE
{
DWORD Length;
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode;
BOOLEAN EffectiveOnly;
} SECURITY_QUALITY_OF_SERVICE, *PSECURITY_QUALITY_OF_SERVICE;
typedef struct _SE_IMPERSONATION_STATE
{
PACCESS_TOKEN Token;
BOOLEAN CopyOnOpen;
BOOLEAN EffectiveOnly;
SECURITY_IMPERSONATION_LEVEL Level;
} SE_IMPERSONATION_STATE, *PSE_IMPERSONATION_STATE;
typedef DWORD SECURITY_INFORMATION, *PSECURITY_INFORMATION;
typedef enum _SE_LEARNING_MODE_DATA_TYPE
{
SeLearningModeInvalidType = 0,
SeLearningModeSettings,
SeLearningModeMax
} SE_LEARNING_MODE_DATA_TYPE;
typedef struct _SECURITY_CAPABILITIES
{
PSID AppContainerSid;
PSID_AND_ATTRIBUTES Capabilities;
DWORD CapabilityCount;
DWORD Reserved;
} SECURITY_CAPABILITIES, *PSECURITY_CAPABILITIES, *LPSECURITY_CAPABILITIES;
typedef struct _JOB_SET_ARRAY
{
HANDLE JobHandle;
DWORD MemberLevel;
DWORD Flags;
} JOB_SET_ARRAY, *PJOB_SET_ARRAY;
typedef struct _EXCEPTION_REGISTRATION_RECORD
{
__extension__ union {
struct _EXCEPTION_REGISTRATION_RECORD *Next;
struct _EXCEPTION_REGISTRATION_RECORD *prev;
};
__extension__ union {
PEXCEPTION_ROUTINE Handler;
PEXCEPTION_ROUTINE handler;
};
} EXCEPTION_REGISTRATION_RECORD;
typedef EXCEPTION_REGISTRATION_RECORD *PEXCEPTION_REGISTRATION_RECORD;
typedef EXCEPTION_REGISTRATION_RECORD EXCEPTION_REGISTRATION;
typedef PEXCEPTION_REGISTRATION_RECORD PEXCEPTION_REGISTRATION;
__extension__ typedef struct _NT_TIB
{
struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;
PVOID StackBase;
PVOID StackLimit;
PVOID SubSystemTib;
__extension__ union {
PVOID FiberData;
DWORD Version;
};
PVOID ArbitraryUserPointer;
struct _NT_TIB *Self;
} NT_TIB;
typedef NT_TIB *PNT_TIB;
__extension__ typedef struct _NT_TIB32
{
DWORD ExceptionList;
DWORD StackBase;
DWORD StackLimit;
DWORD SubSystemTib;
__extension__ union {
DWORD FiberData;
DWORD Version;
};
DWORD ArbitraryUserPointer;
DWORD Self;
} NT_TIB32, *PNT_TIB32;
__extension__ typedef struct _NT_TIB64
{
DWORD64 ExceptionList;
DWORD64 StackBase;
DWORD64 StackLimit;
DWORD64 SubSystemTib;
__extension__ union {
DWORD64 FiberData;
DWORD Version;
};
DWORD64 ArbitraryUserPointer;
DWORD64 Self;
} NT_TIB64, *PNT_TIB64;
typedef struct _UMS_CREATE_THREAD_ATTRIBUTES
{
DWORD UmsVersion;
PVOID UmsContext;
PVOID UmsCompletionList;
} UMS_CREATE_THREAD_ATTRIBUTES, *PUMS_CREATE_THREAD_ATTRIBUTES;
typedef struct _QUOTA_LIMITS
{
SIZE_T PagedPoolLimit;
SIZE_T NonPagedPoolLimit;
SIZE_T MinimumWorkingSetSize;
SIZE_T MaximumWorkingSetSize;
SIZE_T PagefileLimit;
LARGE_INTEGER TimeLimit;
} QUOTA_LIMITS, *PQUOTA_LIMITS;
typedef union _RATE_QUOTA_LIMIT {
DWORD RateData;
__extension__ struct
{
DWORD RatePercent : 7;
DWORD Reserved0 : 25;
};
} RATE_QUOTA_LIMIT, *PRATE_QUOTA_LIMIT;
typedef struct _QUOTA_LIMITS_EX
{
SIZE_T PagedPoolLimit;
SIZE_T NonPagedPoolLimit;
SIZE_T MinimumWorkingSetSize;
SIZE_T MaximumWorkingSetSize;
SIZE_T PagefileLimit;
LARGE_INTEGER TimeLimit;
SIZE_T WorkingSetLimit;
SIZE_T Reserved2;
SIZE_T Reserved3;
SIZE_T Reserved4;
DWORD Flags;
RATE_QUOTA_LIMIT CpuRateLimit;
} QUOTA_LIMITS_EX, *PQUOTA_LIMITS_EX;
typedef struct _IO_COUNTERS
{
ULONGLONG ReadOperationCount;
ULONGLONG WriteOperationCount;
ULONGLONG OtherOperationCount;
ULONGLONG ReadTransferCount;
ULONGLONG WriteTransferCount;
ULONGLONG OtherTransferCount;
} IO_COUNTERS;
typedef IO_COUNTERS *PIO_COUNTERS;
typedef enum _HARDWARE_COUNTER_TYPE
{
PMCCounter,
MaxHardwareCounterType
} HARDWARE_COUNTER_TYPE,
*PHARDWARE_COUNTER_TYPE;
typedef enum _PROCESS_MITIGATION_POLICY
{
ProcessDEPPolicy,
ProcessASLRPolicy,
ProcessDynamicCodePolicy,
ProcessStrictHandleCheckPolicy,
ProcessSystemCallDisablePolicy,
ProcessMitigationOptionsMask,
ProcessExtensionPointDisablePolicy,
ProcessControlFlowGuardPolicy,
ProcessSignaturePolicy,
ProcessFontDisablePolicy,
ProcessImageLoadPolicy,
MaxProcessMitigationPolicy
} PROCESS_MITIGATION_POLICY,
*PPROCESS_MITIGATION_POLICY;
typedef struct _PROCESS_MITIGATION_ASLR_POLICY
{
__extension__ union {
DWORD Flags;
__extension__ struct
{
DWORD EnableBottomUpRandomization : 1;
DWORD EnableForceRelocateImages : 1;
DWORD EnableHighEntropy : 1;
DWORD DisallowStrippedImages : 1;
DWORD ReservedFlags : 28;
};
};
} PROCESS_MITIGATION_ASLR_POLICY, *PPROCESS_MITIGATION_ASLR_POLICY;
typedef struct _PROCESS_MITIGATION_DEP_POLICY
{
__extension__ union {
DWORD Flags;
__extension__ struct
{
DWORD Enable : 1;
DWORD DisableAtlThunkEmulation : 1;
DWORD ReservedFlags : 30;
};
};
BOOLEAN Permanent;
} PROCESS_MITIGATION_DEP_POLICY, *PPROCESS_MITIGATION_DEP_POLICY;
typedef struct _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY
{
__extension__ union {
DWORD Flags;
__extension__ struct
{
DWORD RaiseExceptionOnInvalidHandleReference : 1;
DWORD HandleExceptionsPermanentlyEnabled : 1;
DWORD ReservedFlags : 30;
};
};
} PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY, *PPROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY;
typedef struct _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY
{
__extension__ union {
DWORD Flags;
__extension__ struct
{
DWORD DisallowWin32kSystemCalls : 1;
DWORD ReservedFlags : 31;
};
};
} PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY, *PPROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY;
typedef struct _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY
{
__extension__ union {
DWORD Flags;
__extension__ struct
{
DWORD DisableExtensionPoints : 1;
DWORD ReservedFlags : 31;
};
};
} PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY, *PPROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY;
typedef struct _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY
{
__extension__ union {
DWORD Flags;
__extension__ struct
{
DWORD EnableControlFlowGuard : 1;
DWORD EnableExportSuppression : 1;
DWORD StrictMode : 1;
DWORD ReservedFlags : 29;
};
};
} PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY, *PPROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY;
typedef struct _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY
{
__extension__ union {
DWORD Flags;
__extension__ struct
{
DWORD MicrosoftSignedOnly : 1;
DWORD StoreSignedOnly : 1;
DWORD MitigationOptIn : 1;
DWORD ReservedFlags : 29;
};
};
} PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY, *PPROCESS_MITIGATION_BINARY_SIGNATURE_POLICY;
typedef struct _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY
{
__extension__ union {
DWORD Flags;
__extension__ struct
{
DWORD ProhibitDynamicCode : 1;
DWORD AllowThreadOptOut : 1;
DWORD AllowRemoteDowngrade : 1;
DWORD ReservedFlags : 30;
};
};
} PROCESS_MITIGATION_DYNAMIC_CODE_POLICY, *PPROCESS_MITIGATION_DYNAMIC_CODE_POLICY;
typedef struct _PROCESS_MITIGATION_FONT_DISABLE_POLICY
{
__extension__ union {
DWORD Flags;
__extension__ struct
{
DWORD DisableNonSystemFonts : 1;
DWORD AuditNonSystemFontLoading : 1;
DWORD ReservedFlags : 30;
};
};
} PROCESS_MITIGATION_FONT_DISABLE_POLICY, *PPROCESS_MITIGATION_FONT_DISABLE_POLICY;
typedef struct _PROCESS_MITIGATION_IMAGE_LOAD_POLICY
{
__extension__ union {
DWORD Flags;
__extension__ struct
{
DWORD NoRemoteImages : 1;
DWORD NoLowMandatoryLabelImages : 1;
DWORD PreferSystem32Images : 1;
DWORD ReservedFlags : 29;
};
};
} PROCESS_MITIGATION_IMAGE_LOAD_POLICY, *PPROCESS_MITIGATION_IMAGE_LOAD_POLICY;
typedef struct _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION
{
LARGE_INTEGER TotalUserTime;
LARGE_INTEGER TotalKernelTime;
LARGE_INTEGER ThisPeriodTotalUserTime;
LARGE_INTEGER ThisPeriodTotalKernelTime;
DWORD TotalPageFaultCount;
DWORD TotalProcesses;
DWORD ActiveProcesses;
DWORD TotalTerminatedProcesses;
} JOBOBJECT_BASIC_ACCOUNTING_INFORMATION, *PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
typedef struct _JOBOBJECT_BASIC_LIMIT_INFORMATION
{
LARGE_INTEGER PerProcessUserTimeLimit;
LARGE_INTEGER PerJobUserTimeLimit;
DWORD LimitFlags;
SIZE_T MinimumWorkingSetSize;
SIZE_T MaximumWorkingSetSize;
DWORD ActiveProcessLimit;
ULONG_PTR Affinity;
DWORD PriorityClass;
DWORD SchedulingClass;
} JOBOBJECT_BASIC_LIMIT_INFORMATION, *PJOBOBJECT_BASIC_LIMIT_INFORMATION;
typedef struct _JOBOBJECT_EXTENDED_LIMIT_INFORMATION
{
JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation;
IO_COUNTERS IoInfo;
SIZE_T ProcessMemoryLimit;
SIZE_T JobMemoryLimit;
SIZE_T PeakProcessMemoryUsed;
SIZE_T PeakJobMemoryUsed;
} JOBOBJECT_EXTENDED_LIMIT_INFORMATION, *PJOBOBJECT_EXTENDED_LIMIT_INFORMATION;
typedef struct _JOBOBJECT_BASIC_PROCESS_ID_LIST
{
DWORD NumberOfAssignedProcesses;
DWORD NumberOfProcessIdsInList;
ULONG_PTR ProcessIdList[1];
} JOBOBJECT_BASIC_PROCESS_ID_LIST, *PJOBOBJECT_BASIC_PROCESS_ID_LIST;
typedef struct _JOBOBJECT_BASIC_UI_RESTRICTIONS
{
DWORD UIRestrictionsClass;
} JOBOBJECT_BASIC_UI_RESTRICTIONS, *PJOBOBJECT_BASIC_UI_RESTRICTIONS;
typedef struct _JOBOBJECT_SECURITY_LIMIT_INFORMATION
{
DWORD SecurityLimitFlags;
HANDLE JobToken;
PTOKEN_GROUPS SidsToDisable;
PTOKEN_PRIVILEGES PrivilegesToDelete;
PTOKEN_GROUPS RestrictedSids;
} JOBOBJECT_SECURITY_LIMIT_INFORMATION, *PJOBOBJECT_SECURITY_LIMIT_INFORMATION;
typedef struct _JOBOBJECT_END_OF_JOB_TIME_INFORMATION
{
DWORD EndOfJobTimeAction;
} JOBOBJECT_END_OF_JOB_TIME_INFORMATION, *PJOBOBJECT_END_OF_JOB_TIME_INFORMATION;
typedef struct _JOBOBJECT_ASSOCIATE_COMPLETION_PORT
{
PVOID CompletionKey;
HANDLE CompletionPort;
} JOBOBJECT_ASSOCIATE_COMPLETION_PORT, *PJOBOBJECT_ASSOCIATE_COMPLETION_PORT;
typedef struct _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION
{
JOBOBJECT_BASIC_ACCOUNTING_INFORMATION BasicInfo;
IO_COUNTERS IoInfo;
} JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION, *PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION;
typedef struct _JOBOBJECT_JOBSET_INFORMATION
{
DWORD MemberLevel;
} JOBOBJECT_JOBSET_INFORMATION, *PJOBOBJECT_JOBSET_INFORMATION;
typedef enum _JOBOBJECT_RATE_CONTROL_TOLERANCE
{
ToleranceLow = 1,
ToleranceMedium,
ToleranceHigh
} JOBOBJECT_RATE_CONTROL_TOLERANCE;
typedef enum _JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL
{
ToleranceIntervalShort = 1,
ToleranceIntervalMedium,
ToleranceIntervalLong
} JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL;
typedef struct _JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION
{
DWORD64 IoReadBytesLimit;
DWORD64 IoWriteBytesLimit;
LARGE_INTEGER PerJobUserTimeLimit;
DWORD64 JobMemoryLimit;
JOBOBJECT_RATE_CONTROL_TOLERANCE RateControlTolerance;
JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL RateControlToleranceInterval;
DWORD LimitFlags;
} JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION, *PJOBOBJECT_NOTIFICATION_LIMIT_INFORMATION;
typedef struct _JOBOBJECT_LIMIT_VIOLATION_INFORMATION
{
DWORD LimitFlags;
DWORD ViolationLimitFlags;
DWORD64 IoReadBytes;
DWORD64 IoReadBytesLimit;
DWORD64 IoWriteBytes;
DWORD64 IoWriteBytesLimit;
LARGE_INTEGER PerJobUserTime;
LARGE_INTEGER PerJobUserTimeLimit;
DWORD64 JobMemory;
DWORD64 JobMemoryLimit;
JOBOBJECT_RATE_CONTROL_TOLERANCE RateControlTolerance;
JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL RateControlToleranceLimit;
} JOBOBJECT_LIMIT_VIOLATION_INFORMATION, *PJOBOBJECT_LIMIT_VIOLATION_INFORMATION;
typedef struct _JOBOBJECT_CPU_RATE_CONTROL_INFORMATION
{
DWORD ControlFlags;
__extension__ union {
DWORD CpuRate;
DWORD Weight;
};
} JOBOBJECT_CPU_RATE_CONTROL_INFORMATION, *PJOBOBJECT_CPU_RATE_CONTROL_INFORMATION;
typedef enum _JOBOBJECTINFOCLASS
{
JobObjectBasicAccountingInformation = 1,
JobObjectBasicLimitInformation,
JobObjectBasicProcessIdList,
JobObjectBasicUIRestrictions,
JobObjectSecurityLimitInformation,
JobObjectEndOfJobTimeInformation,
JobObjectAssociateCompletionPortInformation,
JobObjectBasicAndIoAccountingInformation,
JobObjectExtendedLimitInformation,
JobObjectJobSetInformation,
JobObjectGroupInformation,
JobObjectNotificationLimitInformation,
JobObjectLimitViolationInformation,
JobObjectGroupInformationEx,
JobObjectCpuRateControlInformation,
JobObjectCompletionFilter,
JobObjectCompletionCounter,
JobObjectReserved1Information = 18,
JobObjectReserved2Information,
JobObjectReserved3Information,
JobObjectReserved4Information,
JobObjectReserved5Information,
JobObjectReserved6Information,
JobObjectReserved7Information,
JobObjectReserved8Information,
MaxJobObjectInfoClass
} JOBOBJECTINFOCLASS;
typedef enum _FIRMWARE_TYPE
{
FirmwareTypeUnknown,
FirmwareTypeBios,
FirmwareTypeUefi,
FirmwareTypeMax
} FIRMWARE_TYPE,
*PFIRMWARE_TYPE;
typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP
{
RelationProcessorCore,
RelationNumaNode,
RelationCache,
RelationProcessorPackage,
RelationGroup,
RelationAll = 0xffff
} LOGICAL_PROCESSOR_RELATIONSHIP;
typedef enum _PROCESSOR_CACHE_TYPE
{
CacheUnified,
CacheInstruction,
CacheData,
CacheTrace
} PROCESSOR_CACHE_TYPE;
typedef struct _CACHE_DESCRIPTOR
{
BYTE Level;
BYTE Associativity;
WORD LineSize;
DWORD Size;
PROCESSOR_CACHE_TYPE Type;
} CACHE_DESCRIPTOR, *PCACHE_DESCRIPTOR;
typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION
{
ULONG_PTR ProcessorMask;
LOGICAL_PROCESSOR_RELATIONSHIP Relationship;
__extension__ union {
struct
{
BYTE Flags;
} ProcessorCore;
struct
{
DWORD NodeNumber;
} NumaNode;
CACHE_DESCRIPTOR Cache;
ULONGLONG Reserved[2];
};
} SYSTEM_LOGICAL_PROCESSOR_INFORMATION, *PSYSTEM_LOGICAL_PROCESSOR_INFORMATION;
typedef struct _PROCESSOR_RELATIONSHIP
{
BYTE Flags;
BYTE Reserved[21];
WORD GroupCount;
GROUP_AFFINITY GroupMask[1];
} PROCESSOR_RELATIONSHIP, *PPROCESSOR_RELATIONSHIP;
typedef struct _NUMA_NODE_RELATIONSHIP
{
DWORD NodeNumber;
BYTE Reserved[20];
GROUP_AFFINITY GroupMask;
} NUMA_NODE_RELATIONSHIP, *PNUMA_NODE_RELATIONSHIP;
typedef struct _CACHE_RELATIONSHIP
{
BYTE Level;
BYTE Associativity;
WORD LineSize;
DWORD CacheSize;
PROCESSOR_CACHE_TYPE Type;
BYTE Reserved[20];
GROUP_AFFINITY GroupMask;
} CACHE_RELATIONSHIP, *PCACHE_RELATIONSHIP;
typedef struct _PROCESSOR_GROUP_INFO
{
BYTE MaximumProcessorCount;
BYTE ActiveProcessorCount;
BYTE Reserved[38];
KAFFINITY ActiveProcessorMask;
} PROCESSOR_GROUP_INFO, *PPROCESSOR_GROUP_INFO;
typedef struct _GROUP_RELATIONSHIP
{
WORD MaximumGroupCount;
WORD ActiveGroupCount;
BYTE Reserved[20];
PROCESSOR_GROUP_INFO GroupInfo[1];
} GROUP_RELATIONSHIP, *PGROUP_RELATIONSHIP;
struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX
{
LOGICAL_PROCESSOR_RELATIONSHIP Relationship;
DWORD Size;
__extension__ union {
PROCESSOR_RELATIONSHIP Processor;
NUMA_NODE_RELATIONSHIP NumaNode;
CACHE_RELATIONSHIP Cache;
GROUP_RELATIONSHIP Group;
};
};
typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX, *PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX;
typedef struct _SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION
{
DWORD64 CycleTime;
} SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION, *PSYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION;
typedef struct _XSTATE_FEATURE
{
DWORD Offset;
DWORD Size;
} XSTATE_FEATURE, *PXSTATE_FEATURE;
typedef struct _XSTATE_CONFIGURATION
{
DWORD64 EnabledFeatures;
DWORD64 EnabledVolatileFeatures;
DWORD Size;
DWORD OptimizedSave : 1;
XSTATE_FEATURE Features[(64)];
} XSTATE_CONFIGURATION, *PXSTATE_CONFIGURATION;
typedef struct _MEMORY_BASIC_INFORMATION
{
PVOID BaseAddress;
PVOID AllocationBase;
DWORD AllocationProtect;
SIZE_T RegionSize;
DWORD State;
DWORD Protect;
DWORD Type;
} MEMORY_BASIC_INFORMATION, *PMEMORY_BASIC_INFORMATION;
typedef struct _MEMORY_BASIC_INFORMATION32
{
DWORD BaseAddress;
DWORD AllocationBase;
DWORD AllocationProtect;
DWORD RegionSize;
DWORD State;
DWORD Protect;
DWORD Type;
} MEMORY_BASIC_INFORMATION32, *PMEMORY_BASIC_INFORMATION32;
typedef struct __attribute__((__aligned__(16))) _MEMORY_BASIC_INFORMATION64
{
ULONGLONG BaseAddress;
ULONGLONG AllocationBase;
DWORD AllocationProtect;
DWORD __alignment1;
ULONGLONG RegionSize;
DWORD State;
DWORD Protect;
DWORD Type;
DWORD __alignment2;
} MEMORY_BASIC_INFORMATION64, *PMEMORY_BASIC_INFORMATION64;
typedef struct FILE_ID_128
{
BYTE Identifier[16];
} FILE_ID_128, *PFILE_ID_128;
typedef struct _FILE_NOTIFY_INFORMATION
{
DWORD NextEntryOffset;
DWORD Action;
DWORD FileNameLength;
WCHAR FileName[1];
} FILE_NOTIFY_INFORMATION, *PFILE_NOTIFY_INFORMATION;
typedef union _FILE_SEGMENT_ELEMENT {
PVOID64 Buffer;
ULONGLONG Alignment;
} FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT;
typedef struct _REPARSE_GUID_DATA_BUFFER
{
DWORD ReparseTag;
WORD ReparseDataLength;
WORD Reserved;
GUID ReparseGuid;
struct
{
BYTE DataBuffer[1];
} GenericReparseBuffer;
} REPARSE_GUID_DATA_BUFFER, *PREPARSE_GUID_DATA_BUFFER;
extern const GUID GUID_MAX_POWER_SAVINGS;
extern const GUID GUID_MIN_POWER_SAVINGS;
extern const GUID GUID_TYPICAL_POWER_SAVINGS;
extern const GUID NO_SUBGROUP_GUID;
extern const GUID ALL_POWERSCHEMES_GUID;
extern const GUID GUID_POWERSCHEME_PERSONALITY;
extern const GUID GUID_ACTIVE_POWERSCHEME;
extern const GUID GUID_IDLE_RESILIENCY_SUBGROUP;
extern const GUID GUID_IDLE_RESILIENCY_PERIOD;
extern const GUID GUID_DISK_COALESCING_POWERDOWN_TIMEOUT;
extern const GUID GUID_EXECUTION_REQUIRED_REQUEST_TIMEOUT;
extern const GUID GUID_VIDEO_SUBGROUP;
extern const GUID GUID_VIDEO_POWERDOWN_TIMEOUT;
extern const GUID GUID_VIDEO_ANNOYANCE_TIMEOUT;
extern const GUID GUID_VIDEO_ADAPTIVE_PERCENT_INCREASE;
extern const GUID GUID_VIDEO_DIM_TIMEOUT;
extern const GUID GUID_VIDEO_ADAPTIVE_POWERDOWN;
extern const GUID GUID_MONITOR_POWER_ON;
extern const GUID GUID_DEVICE_POWER_POLICY_VIDEO_BRIGHTNESS;
extern const GUID GUID_DEVICE_POWER_POLICY_VIDEO_DIM_BRIGHTNESS;
extern const GUID GUID_VIDEO_CURRENT_MONITOR_BRIGHTNESS;
extern const GUID GUID_VIDEO_ADAPTIVE_DISPLAY_BRIGHTNESS;
extern const GUID GUID_CONSOLE_DISPLAY_STATE;
extern const GUID GUID_ALLOW_DISPLAY_REQUIRED;
extern const GUID GUID_VIDEO_CONSOLE_LOCK_TIMEOUT;
extern const GUID GUID_ADAPTIVE_POWER_BEHAVIOR_SUBGROUP;
extern const GUID GUID_NON_ADAPTIVE_INPUT_TIMEOUT;
extern const GUID GUID_DISK_SUBGROUP;
extern const GUID GUID_DISK_POWERDOWN_TIMEOUT;
extern const GUID GUID_DISK_IDLE_TIMEOUT;
extern const GUID GUID_DISK_BURST_IGNORE_THRESHOLD;
extern const GUID GUID_DISK_ADAPTIVE_POWERDOWN;
extern const GUID GUID_SLEEP_SUBGROUP;
extern const GUID GUID_SLEEP_IDLE_THRESHOLD;
extern const GUID GUID_STANDBY_TIMEOUT;
extern const GUID GUID_UNATTEND_SLEEP_TIMEOUT;
extern const GUID GUID_HIBERNATE_TIMEOUT;
extern const GUID GUID_HIBERNATE_FASTS4_POLICY;
extern const GUID GUID_CRITICAL_POWER_TRANSITION;
extern const GUID GUID_SYSTEM_AWAYMODE;
extern const GUID GUID_ALLOW_AWAYMODE;
extern const GUID GUID_ALLOW_STANDBY_STATES;
extern const GUID GUID_ALLOW_RTC_WAKE;
extern const GUID GUID_ALLOW_SYSTEM_REQUIRED;
extern const GUID GUID_SYSTEM_BUTTON_SUBGROUP;
extern const GUID GUID_POWERBUTTON_ACTION;
extern const GUID GUID_SLEEPBUTTON_ACTION;
extern const GUID GUID_USERINTERFACEBUTTON_ACTION;
extern const GUID GUID_LIDCLOSE_ACTION;
extern const GUID GUID_LIDOPEN_POWERSTATE;
extern const GUID GUID_BATTERY_SUBGROUP;
extern const GUID GUID_BATTERY_DISCHARGE_ACTION_0;
extern const GUID GUID_BATTERY_DISCHARGE_LEVEL_0;
extern const GUID GUID_BATTERY_DISCHARGE_FLAGS_0;
extern const GUID GUID_BATTERY_DISCHARGE_ACTION_1;
extern const GUID GUID_BATTERY_DISCHARGE_LEVEL_1;
extern const GUID GUID_BATTERY_DISCHARGE_FLAGS_1;
extern const GUID GUID_BATTERY_DISCHARGE_ACTION_2;
extern const GUID GUID_BATTERY_DISCHARGE_LEVEL_2;
extern const GUID GUID_BATTERY_DISCHARGE_FLAGS_2;
extern const GUID GUID_BATTERY_DISCHARGE_ACTION_3;
extern const GUID GUID_BATTERY_DISCHARGE_LEVEL_3;
extern const GUID GUID_BATTERY_DISCHARGE_FLAGS_3;
extern const GUID GUID_PROCESSOR_SETTINGS_SUBGROUP;
extern const GUID GUID_PROCESSOR_THROTTLE_POLICY;
extern const GUID GUID_PROCESSOR_THROTTLE_MAXIMUM;
extern const GUID GUID_PROCESSOR_THROTTLE_MINIMUM;
extern const GUID GUID_PROCESSOR_ALLOW_THROTTLING;
extern const GUID GUID_PROCESSOR_IDLESTATE_POLICY;
extern const GUID GUID_PROCESSOR_PERFSTATE_POLICY;
extern const GUID GUID_PROCESSOR_PERF_INCREASE_THRESHOLD;
extern const GUID GUID_PROCESSOR_PERF_DECREASE_THRESHOLD;
extern const GUID GUID_PROCESSOR_PERF_INCREASE_POLICY;
extern const GUID GUID_PROCESSOR_PERF_DECREASE_POLICY;
extern const GUID GUID_PROCESSOR_PERF_INCREASE_TIME;
extern const GUID GUID_PROCESSOR_PERF_DECREASE_TIME;
extern const GUID GUID_PROCESSOR_PERF_TIME_CHECK;
extern const GUID GUID_PROCESSOR_PERF_BOOST_POLICY;
extern const GUID GUID_PROCESSOR_PERF_BOOST_MODE;
extern const GUID GUID_PROCESSOR_IDLE_ALLOW_SCALING;
extern const GUID GUID_PROCESSOR_IDLE_DISABLE;
extern const GUID GUID_PROCESSOR_IDLE_STATE_MAXIMUM;
extern const GUID GUID_PROCESSOR_IDLE_TIME_CHECK;
extern const GUID GUID_PROCESSOR_IDLE_DEMOTE_THRESHOLD;
extern const GUID GUID_PROCESSOR_IDLE_PROMOTE_THRESHOLD;
extern const GUID GUID_PROCESSOR_CORE_PARKING_INCREASE_THRESHOLD;
extern const GUID GUID_PROCESSOR_CORE_PARKING_DECREASE_THRESHOLD;
extern const GUID GUID_PROCESSOR_CORE_PARKING_INCREASE_POLICY;
extern const GUID GUID_PROCESSOR_CORE_PARKING_DECREASE_POLICY;
extern const GUID GUID_PROCESSOR_CORE_PARKING_MAX_CORES;
extern const GUID GUID_PROCESSOR_CORE_PARKING_MIN_CORES;
extern const GUID GUID_PROCESSOR_CORE_PARKING_INCREASE_TIME;
extern const GUID GUID_PROCESSOR_CORE_PARKING_DECREASE_TIME;
extern const GUID GUID_PROCESSOR_CORE_PARKING_AFFINITY_HISTORY_DECREASE_FACTOR;
extern const GUID GUID_PROCESSOR_CORE_PARKING_AFFINITY_HISTORY_THRESHOLD;
extern const GUID GUID_PROCESSOR_CORE_PARKING_AFFINITY_WEIGHTING;
extern const GUID GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_HISTORY_DECREASE_FACTOR;
extern const GUID GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_HISTORY_THRESHOLD;
extern const GUID GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_WEIGHTING;
extern const GUID GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_THRESHOLD;
extern const GUID GUID_PROCESSOR_PARKING_CORE_OVERRIDE;
extern const GUID GUID_PROCESSOR_PARKING_PERF_STATE;
extern const GUID GUID_PROCESSOR_PARKING_CONCURRENCY_THRESHOLD;
extern const GUID GUID_PROCESSOR_PARKING_HEADROOM_THRESHOLD;
extern const GUID GUID_PROCESSOR_PERF_HISTORY;
extern const GUID GUID_PROCESSOR_PERF_LATENCY_HINT;
extern const GUID GUID_PROCESSOR_DISTRIBUTE_UTILITY;
extern const GUID GUID_SYSTEM_COOLING_POLICY;
extern const GUID GUID_LOCK_CONSOLE_ON_WAKE;
extern const GUID GUID_DEVICE_IDLE_POLICY;
extern const GUID GUID_ACDC_POWER_SOURCE;
extern const GUID GUID_LIDSWITCH_STATE_CHANGE;
extern const GUID GUID_BATTERY_PERCENTAGE_REMAINING;
extern const GUID GUID_GLOBAL_USER_PRESENCE;
extern const GUID GUID_SESSION_DISPLAY_STATUS;
extern const GUID GUID_SESSION_USER_PRESENCE;
extern const GUID GUID_IDLE_BACKGROUND_TASK;
extern const GUID GUID_BACKGROUND_TASK_NOTIFICATION;
extern const GUID GUID_APPLAUNCH_BUTTON;
extern const GUID GUID_PCIEXPRESS_SETTINGS_SUBGROUP;
extern const GUID GUID_PCIEXPRESS_ASPM_POLICY;
extern const GUID GUID_ENABLE_SWITCH_FORCED_SHUTDOWN;
typedef enum _SYSTEM_POWER_STATE
{
PowerSystemUnspecified = 0,
PowerSystemWorking = 1,
PowerSystemSleeping1 = 2,
PowerSystemSleeping2 = 3,
PowerSystemSleeping3 = 4,
PowerSystemHibernate = 5,
PowerSystemShutdown = 6,
PowerSystemMaximum = 7
} SYSTEM_POWER_STATE,
*PSYSTEM_POWER_STATE;
typedef enum
{
PowerActionNone = 0,
PowerActionReserved,
PowerActionSleep,
PowerActionHibernate,
PowerActionShutdown,
PowerActionShutdownReset,
PowerActionShutdownOff,
PowerActionWarmEject
} POWER_ACTION,
*PPOWER_ACTION;
typedef enum _DEVICE_POWER_STATE
{
PowerDeviceUnspecified = 0,
PowerDeviceD0,
PowerDeviceD1,
PowerDeviceD2,
PowerDeviceD3,
PowerDeviceMaximum
} DEVICE_POWER_STATE,
*PDEVICE_POWER_STATE;
typedef enum _MONITOR_DISPLAY_STATE
{
PowerMonitorOff = 0,
PowerMonitorOn,
PowerMonitorDim
} MONITOR_DISPLAY_STATE,
*PMONITOR_DISPLAY_STATE;
typedef enum _USER_ACTIVITY_PRESENCE
{
PowerUserPresent = 0,
PowerUserNotPresent,
PowerUserInactive,
PowerUserMaximum,
PowerUserInvalid = PowerUserMaximum
} USER_ACTIVITY_PRESENCE,
*PUSER_ACTIVITY_PRESENCE;
typedef DWORD EXECUTION_STATE, *PEXECUTION_STATE;
typedef enum
{
LT_DONT_CARE,
LT_LOWEST_LATENCY
} LATENCY_TIME;
typedef enum _POWER_REQUEST_TYPE
{
PowerRequestDisplayRequired,
PowerRequestSystemRequired,
PowerRequestAwayModeRequired,
PowerRequestExecutionRequired
} POWER_REQUEST_TYPE,
*PPOWER_REQUEST_TYPE;
typedef struct CM_Power_Data_s
{
DWORD PD_Size;
DEVICE_POWER_STATE PD_MostRecentPowerState;
DWORD PD_Capabilities;
DWORD PD_D1Latency;
DWORD PD_D2Latency;
DWORD PD_D3Latency;
DEVICE_POWER_STATE PD_PowerStateMapping[7];
SYSTEM_POWER_STATE PD_DeepestSystemWake;
} CM_POWER_DATA, *PCM_POWER_DATA;
typedef enum
{
SystemPowerPolicyAc,
SystemPowerPolicyDc,
VerifySystemPolicyAc,
VerifySystemPolicyDc,
SystemPowerCapabilities,
SystemBatteryState,
SystemPowerStateHandler,
ProcessorStateHandler,
SystemPowerPolicyCurrent,
AdministratorPowerPolicy,
SystemReserveHiberFile,
ProcessorInformation,
SystemPowerInformation,
ProcessorStateHandler2,
LastWakeTime,
LastSleepTime,
SystemExecutionState,
SystemPowerStateNotifyHandler,
ProcessorPowerPolicyAc,
ProcessorPowerPolicyDc,
VerifyProcessorPowerPolicyAc,
VerifyProcessorPowerPolicyDc,
ProcessorPowerPolicyCurrent,
SystemPowerStateLogging,
SystemPowerLoggingEntry,
SetPowerSettingValue,
NotifyUserPowerSetting,
PowerInformationLevelUnused0,
SystemMonitorHiberBootPowerOff,
SystemVideoState,
TraceApplicationPowerMessage,
TraceApplicationPowerMessageEnd,
ProcessorPerfStates,
ProcessorIdleStates,
ProcessorCap,
SystemWakeSource,
SystemHiberFileInformation,
TraceServicePowerMessage,
ProcessorLoad,
PowerShutdownNotification,
MonitorCapabilities,
SessionPowerInit,
SessionDisplayState,
PowerRequestCreate,
PowerRequestAction,
GetPowerRequestList,
ProcessorInformationEx,
NotifyUserModeLegacyPowerEvent,
GroupPark,
ProcessorIdleDomains,
WakeTimerList,
SystemHiberFileSize,
ProcessorIdleStatesHv,
ProcessorPerfStatesHv,
ProcessorPerfCapHv,
ProcessorSetIdle,
LogicalProcessorIdling,
UserPresence,
PowerSettingNotificationName,
GetPowerSettingValue,
IdleResiliency,
SessionRITState,
SessionConnectNotification,
SessionPowerCleanup,
SessionLockState,
SystemHiberbootState,
PlatformInformation,
PdcInvocation,
MonitorInvocation,
FirmwareTableInformationRegistered,
SetShutdownSelectedTime,
SuspendResumeInvocation,
PlmPowerRequestCreate,
ScreenOff,
CsDeviceNotification,
PlatformRole,
LastResumePerformance,
DisplayBurst,
ExitLatencySamplingPercentage,
ApplyLowPowerScenarioSettings,
PowerInformationLevelMaximum
} POWER_INFORMATION_LEVEL;
typedef enum
{
UserNotPresent = 0,
UserPresent = 1,
UserUnknown = 0xff
} POWER_USER_PRESENCE_TYPE,
*PPOWER_USER_PRESENCE_TYPE;
typedef struct _POWER_USER_PRESENCE
{
POWER_USER_PRESENCE_TYPE UserPresence;
} POWER_USER_PRESENCE, *PPOWER_USER_PRESENCE;
typedef struct _POWER_SESSION_CONNECT
{
BOOLEAN Connected;
BOOLEAN Console;
} POWER_SESSION_CONNECT, *PPOWER_SESSION_CONNECT;
typedef struct _POWER_SESSION_TIMEOUTS
{
DWORD InputTimeout;
DWORD DisplayTimeout;
} POWER_SESSION_TIMEOUTS, *PPOWER_SESSION_TIMEOUTS;
typedef struct _POWER_SESSION_RIT_STATE
{
BOOLEAN Active;
DWORD LastInputTime;
} POWER_SESSION_RIT_STATE, *PPOWER_SESSION_RIT_STATE;
typedef struct _POWER_SESSION_WINLOGON
{
DWORD SessionId;
BOOLEAN Console;
BOOLEAN Locked;
} POWER_SESSION_WINLOGON, *PPOWER_SESSION_WINLOGON;
typedef struct _POWER_IDLE_RESILIENCY
{
DWORD CoalescingTimeout;
DWORD IdleResiliencyPeriod;
} POWER_IDLE_RESILIENCY, *PPOWER_IDLE_RESILIENCY;
typedef enum
{
MonitorRequestReasonUnknown,
MonitorRequestReasonPowerButton,
MonitorRequestReasonRemoteConnection,
MonitorRequestReasonScMonitorpower,
MonitorRequestReasonUserInput,
MonitorRequestReasonAcDcDisplayBurst,
MonitorRequestReasonUserDisplayBurst,
MonitorRequestReasonPoSetSystemState,
MonitorRequestReasonSetThreadExecutionState,
MonitorRequestReasonFullWake,
MonitorRequestReasonSessionUnlock,
MonitorRequestReasonScreenOffRequest,
MonitorRequestReasonIdleTimeout,
MonitorRequestReasonPolicyChange,
MonitorRequestReasonMax
} POWER_MONITOR_REQUEST_REASON;
typedef struct _POWER_MONITOR_INVOCATION
{
BOOLEAN On;
BOOLEAN Console;
POWER_MONITOR_REQUEST_REASON RequestReason;
} POWER_MONITOR_INVOCATION, *PPOWER_MONITOR_INVOCATION;
typedef struct _RESUME_PERFORMANCE
{
DWORD PostTimeMs;
ULONGLONG TotalResumeTimeMs;
ULONGLONG ResumeCompleteTimestamp;
} RESUME_PERFORMANCE, *PRESUME_PERFORMANCE;
typedef enum
{
PoAc,
PoDc,
PoHot,
PoConditionMaximum
} SYSTEM_POWER_CONDITION;
typedef struct
{
DWORD Version;
GUID Guid;
SYSTEM_POWER_CONDITION PowerCondition;
DWORD DataLength;
BYTE Data[1];
} SET_POWER_SETTING_VALUE, *PSET_POWER_SETTING_VALUE;
typedef struct
{
GUID Guid;
} NOTIFY_USER_POWER_SETTING, *PNOTIFY_USER_POWER_SETTING;
typedef struct _APPLICATIONLAUNCH_SETTING_VALUE
{
LARGE_INTEGER ActivationTime;
DWORD Flags;
DWORD ButtonInstanceID;
} APPLICATIONLAUNCH_SETTING_VALUE, *PAPPLICATIONLAUNCH_SETTING_VALUE;
typedef enum _POWER_PLATFORM_ROLE
{
PlatformRoleUnspecified = 0,
PlatformRoleDesktop,
PlatformRoleMobile,
PlatformRoleWorkstation,
PlatformRoleEnterpriseServer,
PlatformRoleSOHOServer,
PlatformRoleAppliancePC,
PlatformRolePerformanceServer,
PlatformRoleSlate,
PlatformRoleMaximum
} POWER_PLATFORM_ROLE,
*PPOWER_PLATFORM_ROLE;
typedef struct _POWER_PLATFORM_INFORMATION
{
BOOLEAN AoAc;
} POWER_PLATFORM_INFORMATION, *PPOWER_PLATFORM_INFORMATION;
typedef struct
{
DWORD Granularity;
DWORD Capacity;
} BATTERY_REPORTING_SCALE, *PBATTERY_REPORTING_SCALE;
typedef struct
{
DWORD Frequency;
DWORD Flags;
DWORD PercentFrequency;
} PPM_WMI_LEGACY_PERFSTATE, *PPPM_WMI_LEGACY_PERFSTATE;
typedef struct
{
DWORD Latency;
DWORD Power;
DWORD TimeCheck;
BYTE PromotePercent;
BYTE DemotePercent;
BYTE StateType;
BYTE Reserved;
DWORD StateFlags;
DWORD Context;
DWORD IdleHandler;
DWORD Reserved1;
} PPM_WMI_IDLE_STATE, *PPPM_WMI_IDLE_STATE;
typedef struct
{
DWORD Type;
DWORD Count;
DWORD TargetState;
DWORD OldState;
DWORD64 TargetProcessors;
PPM_WMI_IDLE_STATE State[1];
} PPM_WMI_IDLE_STATES, *PPPM_WMI_IDLE_STATES;
typedef struct
{
DWORD Type;
DWORD Count;
DWORD TargetState;
DWORD OldState;
PVOID TargetProcessors;
PPM_WMI_IDLE_STATE State[1];
} PPM_WMI_IDLE_STATES_EX, *PPPM_WMI_IDLE_STATES_EX;
typedef struct
{
DWORD Frequency;
DWORD Power;
BYTE PercentFrequency;
BYTE IncreaseLevel;
BYTE DecreaseLevel;
BYTE Type;
DWORD IncreaseTime;
DWORD DecreaseTime;
DWORD64 Control;
DWORD64 Status;
DWORD HitCount;
DWORD Reserved1;
DWORD64 Reserved2;
DWORD64 Reserved3;
} PPM_WMI_PERF_STATE, *PPPM_WMI_PERF_STATE;
typedef struct
{
DWORD Count;
DWORD MaxFrequency;
DWORD CurrentState;
DWORD MaxPerfState;
DWORD MinPerfState;
DWORD LowestPerfState;
DWORD ThermalConstraint;
BYTE BusyAdjThreshold;
BYTE PolicyType;
BYTE Type;
BYTE Reserved;
DWORD TimerInterval;
DWORD64 TargetProcessors;
DWORD PStateHandler;
DWORD PStateContext;
DWORD TStateHandler;
DWORD TStateContext;
DWORD FeedbackHandler;
DWORD Reserved1;
DWORD64 Reserved2;
PPM_WMI_PERF_STATE State[1];
} PPM_WMI_PERF_STATES, *PPPM_WMI_PERF_STATES;
typedef struct
{
DWORD Count;
DWORD MaxFrequency;
DWORD CurrentState;
DWORD MaxPerfState;
DWORD MinPerfState;
DWORD LowestPerfState;
DWORD ThermalConstraint;
BYTE BusyAdjThreshold;
BYTE PolicyType;
BYTE Type;
BYTE Reserved;
DWORD TimerInterval;
PVOID TargetProcessors;
DWORD PStateHandler;
DWORD PStateContext;
DWORD TStateHandler;
DWORD TStateContext;
DWORD FeedbackHandler;
DWORD Reserved1;
DWORD64 Reserved2;
PPM_WMI_PERF_STATE State[1];
} PPM_WMI_PERF_STATES_EX, *PPPM_WMI_PERF_STATES_EX;
typedef struct
{
DWORD IdleTransitions;
DWORD FailedTransitions;
DWORD InvalidBucketIndex;
DWORD64 TotalTime;
DWORD IdleTimeBuckets[6];
} PPM_IDLE_STATE_ACCOUNTING, *PPPM_IDLE_STATE_ACCOUNTING;
typedef struct
{
DWORD StateCount;
DWORD TotalTransitions;
DWORD ResetCount;
DWORD64 StartTime;
PPM_IDLE_STATE_ACCOUNTING State[1];
} PPM_IDLE_ACCOUNTING, *PPPM_IDLE_ACCOUNTING;
typedef struct
{
DWORD64 TotalTimeUs;
DWORD MinTimeUs;
DWORD MaxTimeUs;
DWORD Count;
} PPM_IDLE_STATE_BUCKET_EX, *PPPM_IDLE_STATE_BUCKET_EX;
typedef struct
{
DWORD64 TotalTime;
DWORD IdleTransitions;
DWORD FailedTransitions;
DWORD InvalidBucketIndex;
DWORD MinTimeUs;
DWORD MaxTimeUs;
DWORD CancelledTransitions;
PPM_IDLE_STATE_BUCKET_EX IdleTimeBuckets[16];
} PPM_IDLE_STATE_ACCOUNTING_EX, *PPPM_IDLE_STATE_ACCOUNTING_EX;
typedef struct
{
DWORD StateCount;
DWORD TotalTransitions;
DWORD ResetCount;
DWORD AbortCount;
DWORD64 StartTime;
PPM_IDLE_STATE_ACCOUNTING_EX State[1];
} PPM_IDLE_ACCOUNTING_EX, *PPPM_IDLE_ACCOUNTING_EX;
typedef struct
{
DWORD State;
DWORD Status;
DWORD Latency;
DWORD Speed;
DWORD Processor;
} PPM_PERFSTATE_EVENT, *PPPM_PERFSTATE_EVENT;
typedef struct
{
DWORD State;
DWORD Latency;
DWORD Speed;
DWORD64 Processors;
} PPM_PERFSTATE_DOMAIN_EVENT, *PPPM_PERFSTATE_DOMAIN_EVENT;
typedef struct
{
DWORD NewState;
DWORD OldState;
DWORD64 Processors;
} PPM_IDLESTATE_EVENT, *PPPM_IDLESTATE_EVENT;
typedef struct
{
DWORD ThermalConstraint;
DWORD64 Processors;
} PPM_THERMALCHANGE_EVENT, *PPPM_THERMALCHANGE_EVENT;
typedef struct
{
BYTE Mode;
DWORD64 Processors;
} PPM_THERMAL_POLICY_EVENT, *PPPM_THERMAL_POLICY_EVENT;
extern const GUID PPM_PERFSTATE_CHANGE_GUID;
extern const GUID PPM_PERFSTATE_DOMAIN_CHANGE_GUID;
extern const GUID PPM_IDLESTATE_CHANGE_GUID;
extern const GUID PPM_PERFSTATES_DATA_GUID;
extern const GUID PPM_IDLESTATES_DATA_GUID;
extern const GUID PPM_IDLE_ACCOUNTING_GUID;
extern const GUID PPM_IDLE_ACCOUNTING_EX_GUID;
extern const GUID PPM_THERMALCONSTRAINT_GUID;
extern const GUID PPM_PERFMON_PERFSTATE_GUID;
extern const GUID PPM_THERMAL_POLICY_CHANGE_GUID;
typedef struct
{
POWER_ACTION Action;
DWORD Flags;
DWORD EventCode;
} POWER_ACTION_POLICY, *PPOWER_ACTION_POLICY;
typedef struct
{
DWORD TimeCheck;
BYTE DemotePercent;
BYTE PromotePercent;
BYTE Spare[2];
} PROCESSOR_IDLESTATE_INFO, *PPROCESSOR_IDLESTATE_INFO;
typedef struct
{
BOOLEAN Enable;
BYTE Spare[3];
DWORD BatteryLevel;
POWER_ACTION_POLICY PowerPolicy;
SYSTEM_POWER_STATE MinSystemState;
} SYSTEM_POWER_LEVEL, *PSYSTEM_POWER_LEVEL;
typedef struct _SYSTEM_POWER_POLICY
{
DWORD Revision;
POWER_ACTION_POLICY PowerButton;
POWER_ACTION_POLICY SleepButton;
POWER_ACTION_POLICY LidClose;
SYSTEM_POWER_STATE LidOpenWake;
DWORD Reserved;
POWER_ACTION_POLICY Idle;
DWORD IdleTimeout;
BYTE IdleSensitivity;
BYTE DynamicThrottle;
BYTE Spare2[2];
SYSTEM_POWER_STATE MinSleep;
SYSTEM_POWER_STATE MaxSleep;
SYSTEM_POWER_STATE ReducedLatencySleep;
DWORD WinLogonFlags;
DWORD Spare3;
DWORD DozeS4Timeout;
DWORD BroadcastCapacityResolution;
SYSTEM_POWER_LEVEL DischargePolicy[4];
DWORD VideoTimeout;
BOOLEAN VideoDimDisplay;
DWORD VideoReserved[3];
DWORD SpindownTimeout;
BOOLEAN OptimizeForPower;
BYTE FanThrottleTolerance;
BYTE ForcedThrottle;
BYTE MinThrottle;
POWER_ACTION_POLICY OverThrottled;
} SYSTEM_POWER_POLICY, *PSYSTEM_POWER_POLICY;
typedef struct
{
WORD Revision;
union {
WORD AsWORD;
__extension__ struct
{
WORD AllowScaling : 1;
WORD Disabled : 1;
WORD Reserved : 14;
};
} Flags;
DWORD PolicyCount;
PROCESSOR_IDLESTATE_INFO Policy[0x3];
} PROCESSOR_IDLESTATE_POLICY, *PPROCESSOR_IDLESTATE_POLICY;
typedef struct _PROCESSOR_POWER_POLICY_INFO
{
DWORD TimeCheck;
DWORD DemoteLimit;
DWORD PromoteLimit;
BYTE DemotePercent;
BYTE PromotePercent;
BYTE Spare[2];
DWORD AllowDemotion : 1;
DWORD AllowPromotion : 1;
DWORD Reserved : 30;
} PROCESSOR_POWER_POLICY_INFO, *PPROCESSOR_POWER_POLICY_INFO;
typedef struct _PROCESSOR_POWER_POLICY
{
DWORD Revision;
BYTE DynamicThrottle;
BYTE Spare[3];
DWORD DisableCStates : 1;
DWORD Reserved : 31;
DWORD PolicyCount;
PROCESSOR_POWER_POLICY_INFO Policy[3];
} PROCESSOR_POWER_POLICY, *PPROCESSOR_POWER_POLICY;
typedef struct
{
DWORD Revision;
BYTE MaxThrottle;
BYTE MinThrottle;
BYTE BusyAdjThreshold;
__extension__ union {
BYTE Spare;
union {
BYTE AsBYTE;
__extension__ struct
{
BYTE NoDomainAccounting : 1;
BYTE IncreasePolicy : 2;
BYTE DecreasePolicy : 2;
BYTE Reserved : 3;
};
} Flags;
};
DWORD TimeCheck;
DWORD IncreaseTime;
DWORD DecreaseTime;
DWORD IncreasePercent;
DWORD DecreasePercent;
} PROCESSOR_PERFSTATE_POLICY, *PPROCESSOR_PERFSTATE_POLICY;
typedef struct _ADMINISTRATOR_POWER_POLICY
{
SYSTEM_POWER_STATE MinSleep;
SYSTEM_POWER_STATE MaxSleep;
DWORD MinVideoTimeout;
DWORD MaxVideoTimeout;
DWORD MinSpindownTimeout;
DWORD MaxSpindownTimeout;
} ADMINISTRATOR_POWER_POLICY, *PADMINISTRATOR_POWER_POLICY;
typedef struct
{
BOOLEAN 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;
BYTE ProcessorMinThrottle;
BYTE ProcessorMaxThrottle;
BOOLEAN FastSystemS4;
BYTE spare2[3];
BOOLEAN DiskSpinDown;
BYTE spare3[8];
BOOLEAN SystemBatteriesPresent;
BOOLEAN BatteriesAreShortTerm;
BATTERY_REPORTING_SCALE BatteryScale[3];
SYSTEM_POWER_STATE AcOnLineWake;
SYSTEM_POWER_STATE SoftLidWake;
SYSTEM_POWER_STATE RtcWake;
SYSTEM_POWER_STATE MinDeviceWakeState;
SYSTEM_POWER_STATE DefaultLowLatencyWake;
} SYSTEM_POWER_CAPABILITIES, *PSYSTEM_POWER_CAPABILITIES;
typedef struct
{
BOOLEAN AcOnLine;
BOOLEAN BatteryPresent;
BOOLEAN Charging;
BOOLEAN Discharging;
BOOLEAN Spare1[4];
DWORD MaxCapacity;
DWORD RemainingCapacity;
DWORD Rate;
DWORD EstimatedTime;
DWORD DefaultAlert1;
DWORD DefaultAlert2;
} SYSTEM_BATTERY_STATE, *PSYSTEM_BATTERY_STATE;
typedef struct _IMAGE_DOS_HEADER
{
WORD 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[4];
WORD e_oemid;
WORD e_oeminfo;
WORD e_res2[10];
LONG e_lfanew;
} IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;
typedef struct _IMAGE_OS2_HEADER
{
WORD ne_magic;
CHAR ne_ver;
CHAR ne_rev;
WORD ne_enttab;
WORD ne_cbenttab;
LONG ne_crc;
WORD ne_flags;
WORD ne_autodata;
WORD ne_heap;
WORD ne_stack;
LONG ne_csip;
LONG ne_sssp;
WORD ne_cseg;
WORD ne_cmod;
WORD ne_cbnrestab;
WORD ne_segtab;
WORD ne_rsrctab;
WORD ne_restab;
WORD ne_modtab;
WORD ne_imptab;
LONG ne_nrestab;
WORD ne_cmovent;
WORD ne_align;
WORD ne_cres;
BYTE ne_exetyp;
BYTE ne_flagsothers;
WORD ne_pretthunks;
WORD ne_psegrefbytes;
WORD ne_swaparea;
WORD ne_expver;
} IMAGE_OS2_HEADER, *PIMAGE_OS2_HEADER;
typedef struct _IMAGE_VXD_HEADER
{
WORD e32_magic;
BYTE e32_border;
BYTE e32_worder;
DWORD e32_level;
WORD e32_cpu;
WORD e32_os;
DWORD 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;
BYTE e32_res3[12];
DWORD e32_winresoff;
DWORD e32_winreslen;
WORD e32_devid;
WORD e32_ddkver;
} IMAGE_VXD_HEADER, *PIMAGE_VXD_HEADER;
typedef struct _IMAGE_FILE_HEADER
{
WORD Machine;
WORD NumberOfSections;
DWORD TimeDateStamp;
DWORD PointerToSymbolTable;
DWORD NumberOfSymbols;
WORD SizeOfOptionalHeader;
WORD Characteristics;
} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
typedef struct _IMAGE_DATA_DIRECTORY
{
DWORD VirtualAddress;
DWORD Size;
} IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY;
typedef struct _IMAGE_OPTIONAL_HEADER
{
WORD Magic;
BYTE MajorLinkerVersion;
BYTE MinorLinkerVersion;
DWORD SizeOfCode;
DWORD SizeOfInitializedData;
DWORD SizeOfUninitializedData;
DWORD AddressOfEntryPoint;
DWORD BaseOfCode;
DWORD BaseOfData;
DWORD ImageBase;
DWORD SectionAlignment;
DWORD FileAlignment;
WORD MajorOperatingSystemVersion;
WORD MinorOperatingSystemVersion;
WORD MajorImageVersion;
WORD MinorImageVersion;
WORD MajorSubsystemVersion;
WORD MinorSubsystemVersion;
DWORD Win32VersionValue;
DWORD SizeOfImage;
DWORD SizeOfHeaders;
DWORD CheckSum;
WORD Subsystem;
WORD DllCharacteristics;
DWORD SizeOfStackReserve;
DWORD SizeOfStackCommit;
DWORD SizeOfHeapReserve;
DWORD SizeOfHeapCommit;
DWORD LoaderFlags;
DWORD NumberOfRvaAndSizes;
IMAGE_DATA_DIRECTORY DataDirectory[16];
} IMAGE_OPTIONAL_HEADER32, *PIMAGE_OPTIONAL_HEADER32;
typedef struct _IMAGE_ROM_OPTIONAL_HEADER
{
WORD Magic;
BYTE MajorLinkerVersion;
BYTE MinorLinkerVersion;
DWORD SizeOfCode;
DWORD SizeOfInitializedData;
DWORD SizeOfUninitializedData;
DWORD AddressOfEntryPoint;
DWORD BaseOfCode;
DWORD BaseOfData;
DWORD BaseOfBss;
DWORD GprMask;
DWORD CprMask[4];
DWORD GpValue;
} IMAGE_ROM_OPTIONAL_HEADER, *PIMAGE_ROM_OPTIONAL_HEADER;
typedef struct _IMAGE_OPTIONAL_HEADER64
{
WORD Magic;
BYTE MajorLinkerVersion;
BYTE MinorLinkerVersion;
DWORD SizeOfCode;
DWORD SizeOfInitializedData;
DWORD SizeOfUninitializedData;
DWORD AddressOfEntryPoint;
DWORD BaseOfCode;
ULONGLONG ImageBase;
DWORD SectionAlignment;
DWORD FileAlignment;
WORD MajorOperatingSystemVersion;
WORD MinorOperatingSystemVersion;
WORD MajorImageVersion;
WORD MinorImageVersion;
WORD MajorSubsystemVersion;
WORD MinorSubsystemVersion;
DWORD Win32VersionValue;
DWORD SizeOfImage;
DWORD SizeOfHeaders;
DWORD CheckSum;
WORD Subsystem;
WORD DllCharacteristics;
ULONGLONG SizeOfStackReserve;
ULONGLONG SizeOfStackCommit;
ULONGLONG SizeOfHeapReserve;
ULONGLONG SizeOfHeapCommit;
DWORD LoaderFlags;
DWORD NumberOfRvaAndSizes;
IMAGE_DATA_DIRECTORY DataDirectory[16];
} IMAGE_OPTIONAL_HEADER64, *PIMAGE_OPTIONAL_HEADER64;
typedef IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER;
typedef PIMAGE_OPTIONAL_HEADER64 PIMAGE_OPTIONAL_HEADER;
typedef struct _IMAGE_NT_HEADERS64
{
DWORD Signature;
IMAGE_FILE_HEADER FileHeader;
IMAGE_OPTIONAL_HEADER64 OptionalHeader;
} IMAGE_NT_HEADERS64, *PIMAGE_NT_HEADERS64;
typedef struct _IMAGE_NT_HEADERS
{
DWORD Signature;
IMAGE_FILE_HEADER FileHeader;
IMAGE_OPTIONAL_HEADER32 OptionalHeader;
} IMAGE_NT_HEADERS32, *PIMAGE_NT_HEADERS32;
typedef struct _IMAGE_ROM_HEADERS
{
IMAGE_FILE_HEADER FileHeader;
IMAGE_ROM_OPTIONAL_HEADER OptionalHeader;
} IMAGE_ROM_HEADERS, *PIMAGE_ROM_HEADERS;
typedef IMAGE_NT_HEADERS64 IMAGE_NT_HEADERS;
typedef PIMAGE_NT_HEADERS64 PIMAGE_NT_HEADERS;
typedef struct ANON_OBJECT_HEADER
{
WORD Sig1;
WORD Sig2;
WORD Version;
WORD Machine;
DWORD TimeDateStamp;
CLSID ClassID;
DWORD SizeOfData;
} ANON_OBJECT_HEADER;
typedef struct ANON_OBJECT_HEADER_V2
{
WORD Sig1;
WORD Sig2;
WORD Version;
WORD Machine;
DWORD TimeDateStamp;
CLSID ClassID;
DWORD SizeOfData;
DWORD Flags;
DWORD MetaDataSize;
DWORD MetaDataOffset;
} ANON_OBJECT_HEADER_V2;
typedef struct ANON_OBJECT_HEADER_BIGOBJ
{
WORD Sig1;
WORD Sig2;
WORD Version;
WORD Machine;
DWORD TimeDateStamp;
CLSID ClassID;
DWORD SizeOfData;
DWORD Flags;
DWORD MetaDataSize;
DWORD MetaDataOffset;
DWORD NumberOfSections;
DWORD PointerToSymbolTable;
DWORD NumberOfSymbols;
} ANON_OBJECT_HEADER_BIGOBJ;
typedef struct _IMAGE_SECTION_HEADER
{
BYTE Name[8];
union {
DWORD PhysicalAddress;
DWORD VirtualSize;
} Misc;
DWORD VirtualAddress;
DWORD SizeOfRawData;
DWORD PointerToRawData;
DWORD PointerToRelocations;
DWORD PointerToLinenumbers;
WORD NumberOfRelocations;
WORD NumberOfLinenumbers;
DWORD Characteristics;
} IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;
typedef struct _IMAGE_SYMBOL
{
union {
BYTE ShortName[8];
struct
{
DWORD Short;
DWORD Long;
} Name;
DWORD LongName[2];
} N;
DWORD Value;
SHORT SectionNumber;
WORD Type;
BYTE StorageClass;
BYTE NumberOfAuxSymbols;
} IMAGE_SYMBOL;
typedef IMAGE_SYMBOL *PIMAGE_SYMBOL;
typedef struct _IMAGE_SYMBOL_EX
{
union {
BYTE ShortName[8];
struct
{
DWORD Short;
DWORD Long;
} Name;
DWORD LongName[2];
} N;
DWORD Value;
LONG SectionNumber;
WORD Type;
BYTE StorageClass;
BYTE NumberOfAuxSymbols;
} IMAGE_SYMBOL_EX, *PIMAGE_SYMBOL_EX;
typedef struct IMAGE_AUX_SYMBOL_TOKEN_DEF
{
BYTE bAuxType;
BYTE bReserved;
DWORD SymbolTableIndex;
BYTE rgbReserved[12];
} IMAGE_AUX_SYMBOL_TOKEN_DEF, *PIMAGE_AUX_SYMBOL_TOKEN_DEF;
typedef union _IMAGE_AUX_SYMBOL {
struct
{
DWORD TagIndex;
union {
struct
{
WORD Linenumber;
WORD Size;
} LnSz;
DWORD TotalSize;
} Misc;
union {
struct
{
DWORD PointerToLinenumber;
DWORD PointerToNextFunction;
} Function;
struct
{
WORD Dimension[4];
} Array;
} FcnAry;
WORD TvIndex;
} Sym;
struct
{
BYTE Name[18];
} File;
struct
{
DWORD Length;
WORD NumberOfRelocations;
WORD NumberOfLinenumbers;
DWORD CheckSum;
SHORT Number;
BYTE Selection;
} Section;
IMAGE_AUX_SYMBOL_TOKEN_DEF TokenDef;
struct
{
DWORD crc;
BYTE rgbReserved[14];
} CRC;
} IMAGE_AUX_SYMBOL, *PIMAGE_AUX_SYMBOL;
typedef union _IMAGE_AUX_SYMBOL_EX {
struct
{
DWORD WeakDefaultSymIndex;
DWORD WeakSearchType;
BYTE rgbReserved[12];
} Sym;
struct
{
BYTE Name[sizeof(IMAGE_SYMBOL_EX)];
} File;
struct
{
DWORD Length;
WORD NumberOfRelocations;
WORD NumberOfLinenumbers;
DWORD CheckSum;
SHORT Number;
BYTE Selection;
BYTE bReserved;
SHORT HighNumber;
BYTE rgbReserved[2];
} Section;
__extension__ struct
{
IMAGE_AUX_SYMBOL_TOKEN_DEF TokenDef;
BYTE rgbReserved[2];
};
struct
{
DWORD crc;
BYTE rgbReserved[16];
} CRC;
} IMAGE_AUX_SYMBOL_EX, *PIMAGE_AUX_SYMBOL_EX;
typedef enum IMAGE_AUX_SYMBOL_TYPE
{
IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF = 1
} IMAGE_AUX_SYMBOL_TYPE;
typedef struct _IMAGE_RELOCATION
{
__extension__ union {
DWORD VirtualAddress;
DWORD RelocCount;
};
DWORD SymbolTableIndex;
WORD Type;
} IMAGE_RELOCATION;
typedef IMAGE_RELOCATION *PIMAGE_RELOCATION;
typedef struct _IMAGE_LINENUMBER
{
union {
DWORD SymbolTableIndex;
DWORD VirtualAddress;
} Type;
WORD Linenumber;
} IMAGE_LINENUMBER;
typedef IMAGE_LINENUMBER *PIMAGE_LINENUMBER;
typedef struct _IMAGE_BASE_RELOCATION
{
DWORD VirtualAddress;
DWORD SizeOfBlock;
} IMAGE_BASE_RELOCATION;
typedef IMAGE_BASE_RELOCATION *PIMAGE_BASE_RELOCATION;
typedef struct _IMAGE_ARCHIVE_MEMBER_HEADER
{
BYTE Name[16];
BYTE Date[12];
BYTE UserID[6];
BYTE GroupID[6];
BYTE Mode[8];
BYTE Size[10];
BYTE EndHeader[2];
} IMAGE_ARCHIVE_MEMBER_HEADER, *PIMAGE_ARCHIVE_MEMBER_HEADER;
typedef struct _IMAGE_EXPORT_DIRECTORY
{
DWORD Characteristics;
DWORD TimeDateStamp;
WORD MajorVersion;
WORD MinorVersion;
DWORD Name;
DWORD Base;
DWORD NumberOfFunctions;
DWORD NumberOfNames;
DWORD AddressOfFunctions;
DWORD AddressOfNames;
DWORD AddressOfNameOrdinals;
} IMAGE_EXPORT_DIRECTORY, *PIMAGE_EXPORT_DIRECTORY;
typedef struct _IMAGE_IMPORT_BY_NAME
{
WORD Hint;
CHAR Name[1];
} IMAGE_IMPORT_BY_NAME, *PIMAGE_IMPORT_BY_NAME;
typedef struct _IMAGE_THUNK_DATA64
{
union {
ULONGLONG ForwarderString;
ULONGLONG Function;
ULONGLONG Ordinal;
ULONGLONG AddressOfData;
} u1;
} IMAGE_THUNK_DATA64;
typedef IMAGE_THUNK_DATA64 *PIMAGE_THUNK_DATA64;
typedef struct _IMAGE_THUNK_DATA32
{
union {
DWORD ForwarderString;
DWORD Function;
DWORD Ordinal;
DWORD AddressOfData;
} u1;
} IMAGE_THUNK_DATA32;
typedef IMAGE_THUNK_DATA32 *PIMAGE_THUNK_DATA32;
typedef void (*PIMAGE_TLS_CALLBACK)(PVOID DllHandle, DWORD Reason, PVOID Reserved);
typedef struct _IMAGE_TLS_DIRECTORY64
{
ULONGLONG StartAddressOfRawData;
ULONGLONG EndAddressOfRawData;
ULONGLONG AddressOfIndex;
ULONGLONG AddressOfCallBacks;
DWORD SizeOfZeroFill;
DWORD Characteristics;
} IMAGE_TLS_DIRECTORY64;
typedef IMAGE_TLS_DIRECTORY64 *PIMAGE_TLS_DIRECTORY64;
typedef struct _IMAGE_TLS_DIRECTORY32
{
DWORD StartAddressOfRawData;
DWORD EndAddressOfRawData;
DWORD AddressOfIndex;
DWORD AddressOfCallBacks;
DWORD SizeOfZeroFill;
DWORD Characteristics;
} IMAGE_TLS_DIRECTORY32;
typedef IMAGE_TLS_DIRECTORY32 *PIMAGE_TLS_DIRECTORY32;
typedef IMAGE_THUNK_DATA64 IMAGE_THUNK_DATA;
typedef PIMAGE_THUNK_DATA64 PIMAGE_THUNK_DATA;
typedef IMAGE_TLS_DIRECTORY64 IMAGE_TLS_DIRECTORY;
typedef PIMAGE_TLS_DIRECTORY64 PIMAGE_TLS_DIRECTORY;
typedef struct _IMAGE_IMPORT_DESCRIPTOR
{
__extension__ union {
DWORD Characteristics;
DWORD OriginalFirstThunk;
};
DWORD TimeDateStamp;
DWORD ForwarderChain;
DWORD Name;
DWORD FirstThunk;
} IMAGE_IMPORT_DESCRIPTOR;
typedef IMAGE_IMPORT_DESCRIPTOR *PIMAGE_IMPORT_DESCRIPTOR;
typedef struct _IMAGE_BOUND_IMPORT_DESCRIPTOR
{
DWORD TimeDateStamp;
WORD OffsetModuleName;
WORD NumberOfModuleForwarderRefs;
} IMAGE_BOUND_IMPORT_DESCRIPTOR, *PIMAGE_BOUND_IMPORT_DESCRIPTOR;
typedef struct _IMAGE_BOUND_FORWARDER_REF
{
DWORD TimeDateStamp;
WORD OffsetModuleName;
WORD Reserved;
} IMAGE_BOUND_FORWARDER_REF, *PIMAGE_BOUND_FORWARDER_REF;
typedef struct _IMAGE_DELAYLOAD_DESCRIPTOR
{
union {
DWORD AllAttributes;
__extension__ struct
{
DWORD RvaBased : 1;
DWORD ReservedAttributes : 31;
};
} Attributes;
DWORD DllNameRVA;
DWORD ModuleHandleRVA;
DWORD ImportAddressTableRVA;
DWORD ImportNameTableRVA;
DWORD BoundImportAddressTableRVA;
DWORD UnloadInformationTableRVA;
DWORD TimeDateStamp;
} IMAGE_DELAYLOAD_DESCRIPTOR, *PIMAGE_DELAYLOAD_DESCRIPTOR;
typedef const IMAGE_DELAYLOAD_DESCRIPTOR *PCIMAGE_DELAYLOAD_DESCRIPTOR;
typedef struct _IMAGE_RESOURCE_DIRECTORY
{
DWORD Characteristics;
DWORD TimeDateStamp;
WORD MajorVersion;
WORD MinorVersion;
WORD NumberOfNamedEntries;
WORD NumberOfIdEntries;
} IMAGE_RESOURCE_DIRECTORY, *PIMAGE_RESOURCE_DIRECTORY;
typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY
{
__extension__ union {
__extension__ struct
{
DWORD NameOffset : 31;
DWORD NameIsString : 1;
};
DWORD Name;
WORD Id;
};
__extension__ union {
DWORD OffsetToData;
__extension__ struct
{
DWORD OffsetToDirectory : 31;
DWORD DataIsDirectory : 1;
};
};
} IMAGE_RESOURCE_DIRECTORY_ENTRY, *PIMAGE_RESOURCE_DIRECTORY_ENTRY;
typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING
{
WORD Length;
CHAR NameString[1];
} IMAGE_RESOURCE_DIRECTORY_STRING, *PIMAGE_RESOURCE_DIRECTORY_STRING;
typedef struct _IMAGE_RESOURCE_DIR_STRING_U
{
WORD Length;
WCHAR NameString[1];
} IMAGE_RESOURCE_DIR_STRING_U, *PIMAGE_RESOURCE_DIR_STRING_U;
typedef struct _IMAGE_RESOURCE_DATA_ENTRY
{
DWORD OffsetToData;
DWORD Size;
DWORD CodePage;
DWORD Reserved;
} IMAGE_RESOURCE_DATA_ENTRY, *PIMAGE_RESOURCE_DATA_ENTRY;
typedef struct
{
DWORD Size;
DWORD TimeDateStamp;
WORD MajorVersion;
WORD MinorVersion;
DWORD GlobalFlagsClear;
DWORD GlobalFlagsSet;
DWORD CriticalSectionDefaultTimeout;
DWORD DeCommitFreeBlockThreshold;
DWORD DeCommitTotalFreeThreshold;
DWORD LockPrefixTable;
DWORD MaximumAllocationSize;
DWORD VirtualMemoryThreshold;
DWORD ProcessHeapFlags;
DWORD ProcessAffinityMask;
WORD CSDVersion;
WORD Reserved1;
DWORD EditList;
DWORD SecurityCookie;
DWORD SEHandlerTable;
DWORD SEHandlerCount;
} IMAGE_LOAD_CONFIG_DIRECTORY32, *PIMAGE_LOAD_CONFIG_DIRECTORY32;
typedef struct
{
DWORD Size;
DWORD TimeDateStamp;
WORD MajorVersion;
WORD MinorVersion;
DWORD GlobalFlagsClear;
DWORD GlobalFlagsSet;
DWORD CriticalSectionDefaultTimeout;
ULONGLONG DeCommitFreeBlockThreshold;
ULONGLONG DeCommitTotalFreeThreshold;
ULONGLONG LockPrefixTable;
ULONGLONG MaximumAllocationSize;
ULONGLONG VirtualMemoryThreshold;
ULONGLONG ProcessAffinityMask;
DWORD ProcessHeapFlags;
WORD CSDVersion;
WORD Reserved1;
ULONGLONG EditList;
ULONGLONG SecurityCookie;
ULONGLONG SEHandlerTable;
ULONGLONG SEHandlerCount;
} IMAGE_LOAD_CONFIG_DIRECTORY64, *PIMAGE_LOAD_CONFIG_DIRECTORY64;
typedef IMAGE_LOAD_CONFIG_DIRECTORY64 IMAGE_LOAD_CONFIG_DIRECTORY;
typedef PIMAGE_LOAD_CONFIG_DIRECTORY64 PIMAGE_LOAD_CONFIG_DIRECTORY;
typedef struct _IMAGE_CE_RUNTIME_FUNCTION_ENTRY
{
DWORD FuncStart;
DWORD PrologLen : 8;
DWORD FuncLen : 22;
DWORD ThirtyTwoBit : 1;
DWORD ExceptionFlag : 1;
} IMAGE_CE_RUNTIME_FUNCTION_ENTRY, *PIMAGE_CE_RUNTIME_FUNCTION_ENTRY;
typedef struct _IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY
{
ULONGLONG BeginAddress;
ULONGLONG EndAddress;
ULONGLONG ExceptionHandler;
ULONGLONG HandlerData;
ULONGLONG PrologEndAddress;
} IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY, *PIMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY;
typedef struct _IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY
{
DWORD BeginAddress;
DWORD EndAddress;
DWORD ExceptionHandler;
DWORD HandlerData;
DWORD PrologEndAddress;
} IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY, *PIMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY;
typedef struct _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY
{
DWORD BeginAddress;
__extension__ union {
DWORD UnwindData;
__extension__ struct
{
DWORD Flag : 2;
DWORD FunctionLength : 11;
DWORD Ret : 2;
DWORD H : 1;
DWORD Reg : 3;
DWORD R : 1;
DWORD L : 1;
DWORD C : 1;
DWORD StackAdjust : 10;
};
};
} IMAGE_ARM_RUNTIME_FUNCTION_ENTRY, *PIMAGE_ARM_RUNTIME_FUNCTION_ENTRY;
typedef struct _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY
{
DWORD BeginAddress;
__extension__ union {
DWORD UnwindData;
__extension__ struct
{
DWORD Flag : 2;
DWORD FunctionLength : 11;
DWORD RegF : 3;
DWORD RegI : 4;
DWORD H : 1;
DWORD CR : 2;
DWORD FrameSize : 9;
};
};
} IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY, *PIMAGE_ARM64_RUNTIME_FUNCTION_ENTRY;
typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY
{
DWORD BeginAddress;
DWORD EndAddress;
__extension__ union {
DWORD UnwindInfoAddress;
DWORD UnwindData;
};
} _IMAGE_RUNTIME_FUNCTION_ENTRY, *_PIMAGE_RUNTIME_FUNCTION_ENTRY;
typedef _IMAGE_RUNTIME_FUNCTION_ENTRY IMAGE_IA64_RUNTIME_FUNCTION_ENTRY;
typedef _PIMAGE_RUNTIME_FUNCTION_ENTRY PIMAGE_IA64_RUNTIME_FUNCTION_ENTRY;
typedef _IMAGE_RUNTIME_FUNCTION_ENTRY IMAGE_RUNTIME_FUNCTION_ENTRY;
typedef _PIMAGE_RUNTIME_FUNCTION_ENTRY PIMAGE_RUNTIME_FUNCTION_ENTRY;
typedef struct _IMAGE_DEBUG_DIRECTORY
{
DWORD Characteristics;
DWORD TimeDateStamp;
WORD MajorVersion;
WORD MinorVersion;
DWORD Type;
DWORD SizeOfData;
DWORD AddressOfRawData;
DWORD PointerToRawData;
} IMAGE_DEBUG_DIRECTORY, *PIMAGE_DEBUG_DIRECTORY;
typedef struct _IMAGE_COFF_SYMBOLS_HEADER
{
DWORD NumberOfSymbols;
DWORD LvaToFirstSymbol;
DWORD NumberOfLinenumbers;
DWORD LvaToFirstLinenumber;
DWORD RvaToFirstByteOfCode;
DWORD RvaToLastByteOfCode;
DWORD RvaToFirstByteOfData;
DWORD RvaToLastByteOfData;
} IMAGE_COFF_SYMBOLS_HEADER, *PIMAGE_COFF_SYMBOLS_HEADER;
typedef struct _FPO_DATA
{
DWORD ulOffStart;
DWORD cbProcSize;
DWORD cdwLocals;
WORD cdwParams;
WORD cbProlog : 8;
WORD cbRegs : 3;
WORD fHasSEH : 1;
WORD fUseBP : 1;
WORD reserved : 1;
WORD cbFrame : 2;
} FPO_DATA, *PFPO_DATA;
typedef struct _IMAGE_DEBUG_MISC
{
DWORD DataType;
DWORD Length;
BOOLEAN Unicode;
BYTE Reserved[3];
BYTE Data[1];
} IMAGE_DEBUG_MISC, *PIMAGE_DEBUG_MISC;
typedef struct _IMAGE_FUNCTION_ENTRY
{
DWORD StartingAddress;
DWORD EndingAddress;
DWORD EndOfPrologue;
} IMAGE_FUNCTION_ENTRY, *PIMAGE_FUNCTION_ENTRY;
typedef struct _IMAGE_FUNCTION_ENTRY64
{
ULONGLONG StartingAddress;
ULONGLONG EndingAddress;
__extension__ union {
ULONGLONG EndOfPrologue;
ULONGLONG UnwindInfoAddress;
};
} IMAGE_FUNCTION_ENTRY64, *PIMAGE_FUNCTION_ENTRY64;
typedef struct _IMAGE_SEPARATE_DEBUG_HEADER
{
WORD Signature;
WORD Flags;
WORD Machine;
WORD Characteristics;
DWORD TimeDateStamp;
DWORD CheckSum;
DWORD ImageBase;
DWORD SizeOfImage;
DWORD NumberOfSections;
DWORD ExportedNamesSize;
DWORD DebugDirectorySize;
DWORD SectionAlignment;
DWORD Reserved[2];
} IMAGE_SEPARATE_DEBUG_HEADER, *PIMAGE_SEPARATE_DEBUG_HEADER;
typedef struct _NON_PAGED_DEBUG_INFO
{
WORD Signature;
WORD Flags;
DWORD Size;
WORD Machine;
WORD Characteristics;
DWORD TimeDateStamp;
DWORD CheckSum;
DWORD SizeOfImage;
ULONGLONG ImageBase;
} NON_PAGED_DEBUG_INFO, *PNON_PAGED_DEBUG_INFO;
typedef struct _ImageArchitectureHeader
{
unsigned int AmaskValue : 1;
int Adummy1 : 7;
unsigned int AmaskShift : 8;
int Adummy2 : 16;
DWORD FirstEntryRVA;
} IMAGE_ARCHITECTURE_HEADER, *PIMAGE_ARCHITECTURE_HEADER;
typedef struct _ImageArchitectureEntry
{
DWORD FixupInstRVA;
DWORD NewInst;
} IMAGE_ARCHITECTURE_ENTRY, *PIMAGE_ARCHITECTURE_ENTRY;
typedef struct IMPORT_OBJECT_HEADER
{
WORD Sig1;
WORD Sig2;
WORD Version;
WORD Machine;
DWORD TimeDateStamp;
DWORD SizeOfData;
__extension__ union {
WORD Ordinal;
WORD Hint;
};
WORD Type : 2;
WORD NameType : 3;
WORD Reserved : 11;
} IMPORT_OBJECT_HEADER;
typedef enum IMPORT_OBJECT_TYPE
{
IMPORT_OBJECT_CODE = 0,
IMPORT_OBJECT_DATA = 1,
IMPORT_OBJECT_CONST = 2
} IMPORT_OBJECT_TYPE;
typedef enum IMPORT_OBJECT_NAME_TYPE
{
IMPORT_OBJECT_ORDINAL = 0,
IMPORT_OBJECT_NAME = 1,
IMPORT_OBJECT_NAME_NO_PREFIX = 2,
IMPORT_OBJECT_NAME_UNDECORATE = 3
} IMPORT_OBJECT_NAME_TYPE;
typedef enum ReplacesCorHdrNumericDefines
{
COMIMAGE_FLAGS_ILONLY = 0x00000001,
COMIMAGE_FLAGS_32BITREQUIRED = 0x00000002,
COMIMAGE_FLAGS_IL_LIBRARY = 0x00000004,
COMIMAGE_FLAGS_STRONGNAMESIGNED = 0x00000008,
COMIMAGE_FLAGS_TRACKDEBUGDATA = 0x00010000,
COR_VERSION_MAJOR_V2 = 2,
COR_VERSION_MAJOR = COR_VERSION_MAJOR_V2,
COR_VERSION_MINOR = 0,
COR_DELETED_NAME_LENGTH = 8,
COR_VTABLEGAP_NAME_LENGTH = 8,
NATIVE_TYPE_MAX_CB = 1,
COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE = 0xFF,
IMAGE_COR_MIH_METHODRVA = 0x01,
IMAGE_COR_MIH_EHRVA = 0x02,
IMAGE_COR_MIH_BASICBLOCK = 0x08,
COR_VTABLE_32BIT = 0x01,
COR_VTABLE_64BIT = 0x02,
COR_VTABLE_FROM_UNMANAGED = 0x04,
COR_VTABLE_CALL_MOST_DERIVED = 0x10,
IMAGE_COR_EATJ_THUNK_SIZE = 32,
MAX_CLASS_NAME = 1024,
MAX_PACKAGE_NAME = 1024
} ReplacesCorHdrNumericDefines;
typedef struct IMAGE_COR20_HEADER
{
DWORD cb;
WORD MajorRuntimeVersion;
WORD MinorRuntimeVersion;
IMAGE_DATA_DIRECTORY MetaData;
DWORD Flags;
__extension__ union {
DWORD EntryPointToken;
DWORD EntryPointRVA;
};
IMAGE_DATA_DIRECTORY Resources;
IMAGE_DATA_DIRECTORY StrongNameSignature;
IMAGE_DATA_DIRECTORY CodeManagerTable;
IMAGE_DATA_DIRECTORY VTableFixups;
IMAGE_DATA_DIRECTORY ExportAddressTableJumps;
IMAGE_DATA_DIRECTORY ManagedNativeHeader;
} IMAGE_COR20_HEADER, *PIMAGE_COR20_HEADER;
__attribute__((dllimport)) WORD RtlCaptureStackBackTrace(DWORD FramesToSkip, DWORD FramesToCapture, PVOID *BackTrace, PDWORD BackTraceHash);
__attribute__((dllimport)) void RtlCaptureContext(PCONTEXT ContextRecord);
__attribute__((dllimport)) SIZE_T RtlCompareMemory(const void *Source1, const void *Source2, SIZE_T Length);
__attribute__((dllimport)) BOOLEAN __attribute__((__cdecl__)) RtlAddFunctionTable(PRUNTIME_FUNCTION FunctionTable, DWORD EntryCount, DWORD64 BaseAddress);
__attribute__((dllimport)) BOOLEAN __attribute__((__cdecl__)) RtlDeleteFunctionTable(PRUNTIME_FUNCTION FunctionTable);
__attribute__((dllimport)) BOOLEAN __attribute__((__cdecl__)) RtlInstallFunctionTableCallback(DWORD64 TableIdentifier, DWORD64 BaseAddress, DWORD Length, PGET_RUNTIME_FUNCTION_CALLBACK Callback, PVOID Context, PCWSTR OutOfProcessCallbackDll);
__attribute__((dllimport)) void __attribute__((__cdecl__)) RtlRestoreContext(PCONTEXT ContextRecord, struct _EXCEPTION_RECORD *ExceptionRecord);
__attribute__((dllimport)) PEXCEPTION_ROUTINE RtlVirtualUnwind(DWORD HandlerType, DWORD64 ImageBase, DWORD64 ControlPc, PRUNTIME_FUNCTION FunctionEntry, PCONTEXT ContextRecord, PVOID *HandlerData, PDWORD64 EstablisherFrame, PKNONVOLATILE_CONTEXT_POINTERS ContextPointers);
__attribute__((dllimport)) void RtlUnwind(PVOID TargetFrame, PVOID TargetIp, PEXCEPTION_RECORD ExceptionRecord, PVOID ReturnValue);
__attribute__((dllimport)) PVOID RtlPcToFileHeader(PVOID PcValue, PVOID *BaseOfImage);
__attribute__((dllimport)) PRUNTIME_FUNCTION RtlLookupFunctionEntry(DWORD64 ControlPc, PDWORD64 ImageBase, PUNWIND_HISTORY_TABLE HistoryTable);
__attribute__((dllimport)) void RtlUnwindEx(PVOID TargetFrame, PVOID TargetIp, PEXCEPTION_RECORD ExceptionRecord, PVOID ReturnValue, PCONTEXT ContextRecord, PUNWIND_HISTORY_TABLE HistoryTable);
typedef struct __attribute__((__aligned__(16))) _SLIST_ENTRY
{
struct _SLIST_ENTRY *Next;
} SLIST_ENTRY, *PSLIST_ENTRY;
typedef union __attribute__((__aligned__(16))) _SLIST_HEADER {
__extension__ struct
{
ULONGLONG Alignment;
ULONGLONG Region;
};
struct
{
ULONGLONG Depth : 16;
ULONGLONG Sequence : 9;
ULONGLONG NextEntry : 39;
ULONGLONG HeaderType : 1;
ULONGLONG Init : 1;
ULONGLONG Reserved : 59;
ULONGLONG Region : 3;
} Header8;
struct
{
ULONGLONG Depth : 16;
ULONGLONG Sequence : 48;
ULONGLONG HeaderType : 1;
ULONGLONG Reserved : 3;
ULONGLONG NextEntry : 60;
} HeaderX64;
} SLIST_HEADER, *PSLIST_HEADER;
__attribute__((dllimport)) void RtlInitializeSListHead(PSLIST_HEADER ListHead);
__attribute__((dllimport)) PSLIST_ENTRY RtlFirstEntrySList(const SLIST_HEADER *ListHead);
__attribute__((dllimport)) PSLIST_ENTRY RtlInterlockedPopEntrySList(PSLIST_HEADER ListHead);
__attribute__((dllimport)) PSLIST_ENTRY RtlInterlockedPushEntrySList(PSLIST_HEADER ListHead, PSLIST_ENTRY ListEntry);
__attribute__((dllimport)) PSLIST_ENTRY RtlInterlockedPushListSListEx(PSLIST_HEADER ListHead, PSLIST_ENTRY List, PSLIST_ENTRY ListEnd, DWORD Count);
__attribute__((dllimport)) PSLIST_ENTRY RtlInterlockedFlushSList(PSLIST_HEADER ListHead);
__attribute__((dllimport)) WORD RtlQueryDepthSList(PSLIST_HEADER ListHead);
typedef struct _RTL_RUN_ONCE
{
PVOID Ptr;
} RTL_RUN_ONCE, *PRTL_RUN_ONCE;
typedef DWORD (*PRTL_RUN_ONCE_INIT_FN)(PRTL_RUN_ONCE, PVOID, PVOID *);
typedef struct _RTL_BARRIER
{
DWORD Reserved1;
DWORD Reserved2;
ULONG_PTR Reserved3[2];
DWORD Reserved4;
DWORD Reserved5;
} RTL_BARRIER, *PRTL_BARRIER;
PVOID RtlSecureZeroMemory(PVOID ptr, SIZE_T cnt);
typedef struct _MESSAGE_RESOURCE_ENTRY
{
WORD Length;
WORD Flags;
BYTE Text[1];
} MESSAGE_RESOURCE_ENTRY, *PMESSAGE_RESOURCE_ENTRY;
typedef struct _MESSAGE_RESOURCE_BLOCK
{
DWORD LowId;
DWORD HighId;
DWORD OffsetToEntries;
} MESSAGE_RESOURCE_BLOCK, *PMESSAGE_RESOURCE_BLOCK;
typedef struct _MESSAGE_RESOURCE_DATA
{
DWORD NumberOfBlocks;
MESSAGE_RESOURCE_BLOCK Blocks[1];
} MESSAGE_RESOURCE_DATA, *PMESSAGE_RESOURCE_DATA;
typedef struct _OSVERSIONINFOA
{
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
CHAR szCSDVersion[128];
} OSVERSIONINFOA, *POSVERSIONINFOA, *LPOSVERSIONINFOA;
typedef struct _OSVERSIONINFOW
{
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
WCHAR szCSDVersion[128];
} OSVERSIONINFOW, *POSVERSIONINFOW, *LPOSVERSIONINFOW, RTL_OSVERSIONINFOW, *PRTL_OSVERSIONINFOW;
typedef OSVERSIONINFOW OSVERSIONINFO;
typedef POSVERSIONINFOW POSVERSIONINFO;
typedef LPOSVERSIONINFOW LPOSVERSIONINFO;
typedef struct _OSVERSIONINFOEXA
{
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
CHAR szCSDVersion[128];
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wSuiteMask;
BYTE wProductType;
BYTE wReserved;
} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA;
typedef struct _OSVERSIONINFOEXW
{
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
WCHAR szCSDVersion[128];
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wSuiteMask;
BYTE wProductType;
BYTE wReserved;
} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW, RTL_OSVERSIONINFOEXW, *PRTL_OSVERSIONINFOEXW;
typedef OSVERSIONINFOEXW OSVERSIONINFOEX;
typedef POSVERSIONINFOEXW POSVERSIONINFOEX;
typedef LPOSVERSIONINFOEXW LPOSVERSIONINFOEX;
__attribute__((dllimport)) ULONGLONG VerSetConditionMask(ULONGLONG ConditionMask, DWORD TypeMask, BYTE Condition);
__attribute__((dllimport)) BOOLEAN RtlGetProductInfo(DWORD OSMajorVersion, DWORD OSMinorVersion, DWORD SpMajorVersion, DWORD SpMinorVersion, PDWORD ReturnedProductType);
typedef enum _RTL_UMS_THREAD_INFO_CLASS
{
UmsThreadInvalidInfoClass = 0,
UmsThreadUserContext,
UmsThreadPriority,
UmsThreadAffinity,
UmsThreadTeb,
UmsThreadIsSuspended,
UmsThreadIsTerminated,
UmsThreadMaxInfoClass
} RTL_UMS_THREAD_INFO_CLASS,
*PRTL_UMS_THREAD_INFO_CLASS;
typedef enum _RTL_UMS_SCHEDULER_REASON
{
UmsSchedulerStartup = 0,
UmsSchedulerThreadBlocked,
UmsSchedulerThreadYield,
} RTL_UMS_SCHEDULER_REASON,
*PRTL_UMS_SCHEDULER_REASON;
typedef void RTL_UMS_SCHEDULER_ENTRY_POINT(RTL_UMS_SCHEDULER_REASON Reason, ULONG_PTR ActivationPayload, PVOID SchedulerParam);
typedef RTL_UMS_SCHEDULER_ENTRY_POINT *PRTL_UMS_SCHEDULER_ENTRY_POINT;
typedef struct _RTL_CRITICAL_SECTION_DEBUG
{
WORD Type;
WORD CreatorBackTraceIndex;
struct _RTL_CRITICAL_SECTION *CriticalSection;
LIST_ENTRY ProcessLocksList;
DWORD EntryCount;
DWORD ContentionCount;
DWORD Flags;
WORD CreatorBackTraceIndexHigh;
WORD SpareWORD;
} RTL_CRITICAL_SECTION_DEBUG, *PRTL_CRITICAL_SECTION_DEBUG, RTL_RESOURCE_DEBUG, *PRTL_RESOURCE_DEBUG;
typedef struct _RTL_CRITICAL_SECTION
{
PRTL_CRITICAL_SECTION_DEBUG DebugInfo;
LONG LockCount;
LONG RecursionCount;
HANDLE OwningThread;
HANDLE LockSemaphore;
ULONG_PTR SpinCount;
} RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION;
typedef struct _RTL_SRWLOCK
{
PVOID Ptr;
} RTL_SRWLOCK, *PRTL_SRWLOCK;
typedef struct _RTL_CONDITION_VARIABLE
{
PVOID Ptr;
} RTL_CONDITION_VARIABLE, *PRTL_CONDITION_VARIABLE;
typedef void (*PAPCFUNC)(ULONG_PTR Parameter);
typedef LONG (*PVECTORED_EXCEPTION_HANDLER)(struct _EXCEPTION_POINTERS *ExceptionInfo);
typedef enum _HEAP_INFORMATION_CLASS
{
HeapCompatibilityInformation,
HeapEnableTerminationOnCorruption
} HEAP_INFORMATION_CLASS;
typedef void (*WORKERCALLBACKFUNC)(PVOID);
typedef void (*APC_CALLBACK_FUNCTION)(DWORD, PVOID, PVOID);
typedef void (*WAITORTIMERCALLBACKFUNC)(PVOID, BOOLEAN);
typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK;
typedef void (*PFLS_CALLBACK_FUNCTION)(PVOID lpFlsData);
typedef BOOLEAN (*PSECURE_MEMORY_CACHE_CALLBACK)(PVOID Addr, SIZE_T Range);
typedef enum _ACTIVATION_CONTEXT_INFO_CLASS
{
ActivationContextBasicInformation = 1,
ActivationContextDetailedInformation = 2,
AssemblyDetailedInformationInActivationContext = 3,
FileInformationInAssemblyOfAssemblyInActivationContext = 4,
RunlevelInformationInActivationContext = 5,
CompatibilityInformationInActivationContext = 6,
ActivationContextManifestResourceName = 7,
MaxActivationContextInfoClass,
AssemblyDetailedInformationInActivationContxt = 3,
FileInformationInAssemblyOfAssemblyInActivationContxt = 4
} ACTIVATION_CONTEXT_INFO_CLASS;
typedef enum
{
ACTCTX_RUN_LEVEL_UNSPECIFIED = 0,
ACTCTX_RUN_LEVEL_AS_INVOKER,
ACTCTX_RUN_LEVEL_HIGHEST_AVAILABLE,
ACTCTX_RUN_LEVEL_REQUIRE_ADMIN,
ACTCTX_RUN_LEVEL_NUMBERS
} ACTCTX_REQUESTED_RUN_LEVEL;
typedef enum
{
ACTCTX_COMPATIBILITY_ELEMENT_TYPE_UNKNOWN = 0,
ACTCTX_COMPATIBILITY_ELEMENT_TYPE_OS,
ACTCTX_COMPATIBILITY_ELEMENT_TYPE_MITIGATION
} ACTCTX_COMPATIBILITY_ELEMENT_TYPE;
typedef struct _ACTIVATION_CONTEXT_QUERY_INDEX
{
DWORD ulAssemblyIndex;
DWORD ulFileIndexInAssembly;
} ACTIVATION_CONTEXT_QUERY_INDEX, *PACTIVATION_CONTEXT_QUERY_INDEX;
typedef struct _ASSEMBLY_FILE_DETAILED_INFORMATION
{
DWORD ulFlags;
DWORD ulFilenameLength;
DWORD ulPathLength;
PCWSTR lpFileName;
PCWSTR lpFilePath;
} ASSEMBLY_FILE_DETAILED_INFORMATION, *PASSEMBLY_FILE_DETAILED_INFORMATION;
typedef struct _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION
{
DWORD ulFlags;
DWORD ulEncodedAssemblyIdentityLength;
DWORD ulManifestPathType;
DWORD ulManifestPathLength;
LARGE_INTEGER liManifestLastWriteTime;
DWORD ulPolicyPathType;
DWORD ulPolicyPathLength;
LARGE_INTEGER liPolicyLastWriteTime;
DWORD ulMetadataSatelliteRosterIndex;
DWORD ulManifestVersionMajor;
DWORD ulManifestVersionMinor;
DWORD ulPolicyVersionMajor;
DWORD ulPolicyVersionMinor;
DWORD ulAssemblyDirectoryNameLength;
PCWSTR lpAssemblyEncodedAssemblyIdentity;
PCWSTR lpAssemblyManifestPath;
PCWSTR lpAssemblyPolicyPath;
PCWSTR lpAssemblyDirectoryName;
DWORD ulFileCount;
} ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION, *PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
typedef struct _ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION
{
DWORD ulFlags;
ACTCTX_REQUESTED_RUN_LEVEL RunLevel;
DWORD UiAccess;
} ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION, *PACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION;
typedef struct _COMPATIBILITY_CONTEXT_ELEMENT
{
GUID Id;
ACTCTX_COMPATIBILITY_ELEMENT_TYPE Type;
} COMPATIBILITY_CONTEXT_ELEMENT, *PCOMPATIBILITY_CONTEXT_ELEMENT;
typedef struct _ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION
{
DWORD ElementCount;
COMPATIBILITY_CONTEXT_ELEMENT Elements[];
} ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION, *PACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION;
typedef struct _SUPPORTED_OS_INFO
{
WORD OsCount;
WORD MitigationExist;
WORD OsList[(4)];
} SUPPORTED_OS_INFO, *PSUPPORTED_OS_INFO;
typedef struct _ACTIVATION_CONTEXT_DETAILED_INFORMATION
{
DWORD dwFlags;
DWORD ulFormatVersion;
DWORD ulAssemblyCount;
DWORD ulRootManifestPathType;
DWORD ulRootManifestPathChars;
DWORD ulRootConfigurationPathType;
DWORD ulRootConfigurationPathChars;
DWORD ulAppDirPathType;
DWORD ulAppDirPathChars;
PCWSTR lpRootManifestPath;
PCWSTR lpRootConfigurationPath;
PCWSTR lpAppDirPath;
} ACTIVATION_CONTEXT_DETAILED_INFORMATION, *PACTIVATION_CONTEXT_DETAILED_INFORMATION;
typedef const struct _ACTIVATION_CONTEXT_QUERY_INDEX *PCACTIVATION_CONTEXT_QUERY_INDEX;
typedef const ASSEMBLY_FILE_DETAILED_INFORMATION *PCASSEMBLY_FILE_DETAILED_INFORMATION;
typedef const struct _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION *PCACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
typedef const struct _ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION *PCACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION;
typedef const struct _COMPATIBILITY_CONTEXT_ELEMENT *PCCOMPATIBILITY_CONTEXT_ELEMENT;
typedef const struct _ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION *PCACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION;
typedef const struct _ACTIVATION_CONTEXT_DETAILED_INFORMATION *PCACTIVATION_CONTEXT_DETAILED_INFORMATION;
typedef void (*RTL_VERIFIER_DLL_LOAD_CALLBACK)(PWSTR DllName, PVOID DllBase, SIZE_T DllSize, PVOID Reserved);
typedef void (*RTL_VERIFIER_DLL_UNLOAD_CALLBACK)(PWSTR DllName, PVOID DllBase, SIZE_T DllSize, PVOID Reserved);
typedef void (*RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK)(PVOID AllocationBase, SIZE_T AllocationSize);
typedef struct _RTL_VERIFIER_THUNK_DESCRIPTOR
{
PCHAR ThunkName;
PVOID ThunkOldAddress;
PVOID ThunkNewAddress;
} RTL_VERIFIER_THUNK_DESCRIPTOR, *PRTL_VERIFIER_THUNK_DESCRIPTOR;
typedef struct _RTL_VERIFIER_DLL_DESCRIPTOR
{
PWCHAR DllName;
DWORD DllFlags;
PVOID DllAddress;
PRTL_VERIFIER_THUNK_DESCRIPTOR DllThunks;
} RTL_VERIFIER_DLL_DESCRIPTOR, *PRTL_VERIFIER_DLL_DESCRIPTOR;
typedef struct _RTL_VERIFIER_PROVIDER_DESCRIPTOR
{
DWORD Length;
PRTL_VERIFIER_DLL_DESCRIPTOR ProviderDlls;
RTL_VERIFIER_DLL_LOAD_CALLBACK ProviderDllLoadCallback;
RTL_VERIFIER_DLL_UNLOAD_CALLBACK ProviderDllUnloadCallback;
PWSTR VerifierImage;
DWORD VerifierFlags;
DWORD VerifierDebug;
PVOID RtlpGetStackTraceAddress;
PVOID RtlpDebugPageHeapCreate;
PVOID RtlpDebugPageHeapDestroy;
RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK ProviderNtdllHeapFreeCallback;
} RTL_VERIFIER_PROVIDER_DESCRIPTOR, *PRTL_VERIFIER_PROVIDER_DESCRIPTOR;
void RtlApplicationVerifierStop(ULONG_PTR Code, PSTR Message, ULONG_PTR Param1, PSTR Description1, ULONG_PTR Param2, PSTR Description2, ULONG_PTR Param3, PSTR Description3, ULONG_PTR Param4, PSTR Description4);
__attribute__((dllimport)) DWORD RtlSetHeapInformation(PVOID HeapHandle, HEAP_INFORMATION_CLASS HeapInformationClass, PVOID HeapInformation, SIZE_T HeapInformationLength);
__attribute__((dllimport)) DWORD RtlQueryHeapInformation(PVOID HeapHandle, HEAP_INFORMATION_CLASS HeapInformationClass, PVOID HeapInformation, SIZE_T HeapInformationLength, PSIZE_T ReturnLength);
DWORD RtlMultipleAllocateHeap(PVOID HeapHandle, DWORD Flags, SIZE_T Size, DWORD Count, PVOID *Array);
DWORD RtlMultipleFreeHeap(PVOID HeapHandle, DWORD Flags, DWORD Count, PVOID *Array);
typedef struct _HARDWARE_COUNTER_DATA
{
HARDWARE_COUNTER_TYPE Type;
DWORD Reserved;
DWORD64 Value;
} HARDWARE_COUNTER_DATA, *PHARDWARE_COUNTER_DATA;
typedef struct _PERFORMANCE_DATA
{
WORD Size;
BYTE Version;
BYTE HwCountersCount;
DWORD ContextSwitchCount;
DWORD64 WaitReasonBitMap;
DWORD64 CycleTime;
DWORD RetryCount;
DWORD Reserved;
HARDWARE_COUNTER_DATA HwCounters[16];
} PERFORMANCE_DATA, *PPERFORMANCE_DATA;
typedef struct _EVENTLOGRECORD
{
DWORD Length;
DWORD Reserved;
DWORD RecordNumber;
DWORD TimeGenerated;
DWORD TimeWritten;
DWORD EventID;
WORD EventType;
WORD NumStrings;
WORD EventCategory;
WORD ReservedFlags;
DWORD ClosingRecordNumber;
DWORD StringOffset;
DWORD UserSidLength;
DWORD UserSidOffset;
DWORD DataLength;
DWORD DataOffset;
} EVENTLOGRECORD, *PEVENTLOGRECORD;
typedef struct _EVENTSFORLOGFILE
{
DWORD ulSize;
WCHAR szLogicalLogFile[256];
DWORD ulNumRecords;
EVENTLOGRECORD pEventLogRecords[];
} EVENTSFORLOGFILE, *PEVENTSFORLOGFILE;
typedef struct _PACKEDEVENTINFO
{
DWORD ulSize;
DWORD ulNumEventsForLogFile;
DWORD ulOffsets[];
} PACKEDEVENTINFO, *PPACKEDEVENTINFO;
typedef enum _CM_SERVICE_NODE_TYPE
{
DriverType = 0x00000001,
FileSystemType = 0x00000002,
Win32ServiceOwnProcess = 0x00000010,
Win32ServiceShareProcess = 0x00000020,
AdapterType = 0x00000004,
RecognizerType = 0x00000008
} SERVICE_NODE_TYPE;
typedef enum _CM_SERVICE_LOAD_TYPE
{
BootLoad = 0x00000000,
SystemLoad = 0x00000001,
AutoLoad = 0x00000002,
DemandLoad = 0x00000003,
DisableLoad = 0x00000004
} SERVICE_LOAD_TYPE;
typedef enum _CM_ERROR_CONTROL_TYPE
{
IgnoreError = 0x00000000,
NormalError = 0x00000001,
SevereError = 0x00000002,
CriticalError = 0x00000003
} SERVICE_ERROR_TYPE;
typedef struct _TAPE_ERASE
{
DWORD Type;
BOOLEAN Immediate;
} TAPE_ERASE, *PTAPE_ERASE;
typedef struct _TAPE_PREPARE
{
DWORD Operation;
BOOLEAN Immediate;
} TAPE_PREPARE, *PTAPE_PREPARE;
typedef struct _TAPE_WRITE_MARKS
{
DWORD Type;
DWORD Count;
BOOLEAN Immediate;
} TAPE_WRITE_MARKS, *PTAPE_WRITE_MARKS;
typedef struct _TAPE_GET_POSITION
{
DWORD Type;
DWORD Partition;
LARGE_INTEGER Offset;
} TAPE_GET_POSITION, *PTAPE_GET_POSITION;
typedef struct _TAPE_SET_POSITION
{
DWORD Method;
DWORD Partition;
LARGE_INTEGER Offset;
BOOLEAN Immediate;
} TAPE_SET_POSITION, *PTAPE_SET_POSITION;
typedef struct _TAPE_GET_DRIVE_PARAMETERS
{
BOOLEAN ECC;
BOOLEAN Compression;
BOOLEAN DataPadding;
BOOLEAN ReportSetmarks;
DWORD DefaultBlockSize;
DWORD MaximumBlockSize;
DWORD MinimumBlockSize;
DWORD MaximumPartitionCount;
DWORD FeaturesLow;
DWORD FeaturesHigh;
DWORD EOTWarningZoneSize;
} TAPE_GET_DRIVE_PARAMETERS, *PTAPE_GET_DRIVE_PARAMETERS;
typedef struct _TAPE_SET_DRIVE_PARAMETERS
{
BOOLEAN ECC;
BOOLEAN Compression;
BOOLEAN DataPadding;
BOOLEAN ReportSetmarks;
DWORD EOTWarningZoneSize;
} TAPE_SET_DRIVE_PARAMETERS, *PTAPE_SET_DRIVE_PARAMETERS;
typedef struct _TAPE_GET_MEDIA_PARAMETERS
{
LARGE_INTEGER Capacity;
LARGE_INTEGER Remaining;
DWORD BlockSize;
DWORD PartitionCount;
BOOLEAN WriteProtected;
} TAPE_GET_MEDIA_PARAMETERS, *PTAPE_GET_MEDIA_PARAMETERS;
typedef struct _TAPE_SET_MEDIA_PARAMETERS
{
DWORD BlockSize;
} TAPE_SET_MEDIA_PARAMETERS, *PTAPE_SET_MEDIA_PARAMETERS;
typedef struct _TAPE_CREATE_PARTITION
{
DWORD Method;
DWORD Count;
DWORD Size;
} TAPE_CREATE_PARTITION, *PTAPE_CREATE_PARTITION;
typedef struct _TAPE_WMI_OPERATIONS
{
DWORD Method;
DWORD DataBufferSize;
PVOID DataBuffer;
} TAPE_WMI_OPERATIONS, *PTAPE_WMI_OPERATIONS;
typedef enum _TAPE_DRIVE_PROBLEM_TYPE
{
TapeDriveProblemNone,
TapeDriveReadWriteWarning,
TapeDriveReadWriteError,
TapeDriveReadWarning,
TapeDriveWriteWarning,
TapeDriveReadError,
TapeDriveWriteError,
TapeDriveHardwareError,
TapeDriveUnsupportedMedia,
TapeDriveScsiConnectionError,
TapeDriveTimetoClean,
TapeDriveCleanDriveNow,
TapeDriveMediaLifeExpired,
TapeDriveSnappedTape
} TAPE_DRIVE_PROBLEM_TYPE;
typedef DWORD TP_VERSION, *PTP_VERSION;
typedef struct _TP_CALLBACK_INSTANCE TP_CALLBACK_INSTANCE, *PTP_CALLBACK_INSTANCE;
typedef void (*PTP_SIMPLE_CALLBACK)(PTP_CALLBACK_INSTANCE Instance, PVOID Context);
typedef struct _TP_POOL TP_POOL, *PTP_POOL;
typedef enum _TP_CALLBACK_PRIORITY
{
TP_CALLBACK_PRIORITY_HIGH,
TP_CALLBACK_PRIORITY_NORMAL,
TP_CALLBACK_PRIORITY_LOW,
TP_CALLBACK_PRIORITY_INVALID,
TP_CALLBACK_PRIORITY_COUNT = TP_CALLBACK_PRIORITY_INVALID
} TP_CALLBACK_PRIORITY;
typedef struct _TP_POOL_STACK_INFORMATION
{
SIZE_T StackReserve;
SIZE_T StackCommit;
} TP_POOL_STACK_INFORMATION, *PTP_POOL_STACK_INFORMATION;
typedef struct _TP_CLEANUP_GROUP TP_CLEANUP_GROUP, *PTP_CLEANUP_GROUP;
typedef void (*PTP_CLEANUP_GROUP_CANCEL_CALLBACK)(PVOID ObjectContext, PVOID CleanupContext);
typedef struct _TP_CALLBACK_ENVIRON_V3
{
TP_VERSION Version;
PTP_POOL Pool;
PTP_CLEANUP_GROUP CleanupGroup;
PTP_CLEANUP_GROUP_CANCEL_CALLBACK CleanupGroupCancelCallback;
PVOID RaceDll;
struct _ACTIVATION_CONTEXT *ActivationContext;
PTP_SIMPLE_CALLBACK FinalizationCallback;
union {
DWORD Flags;
struct
{
DWORD LongFunction : 1;
DWORD Persistent : 1;
DWORD Private : 30;
} s;
} u;
TP_CALLBACK_PRIORITY CallbackPriority;
DWORD Size;
} TP_CALLBACK_ENVIRON_V3;
typedef TP_CALLBACK_ENVIRON_V3 TP_CALLBACK_ENVIRON, *PTP_CALLBACK_ENVIRON;
typedef struct _TP_WORK TP_WORK, *PTP_WORK;
typedef void (*PTP_WORK_CALLBACK)(PTP_CALLBACK_INSTANCE Instance, PVOID Context, PTP_WORK Work);
typedef struct _TP_TIMER TP_TIMER, *PTP_TIMER;
typedef void (*PTP_TIMER_CALLBACK)(PTP_CALLBACK_INSTANCE Instance, PVOID Context, PTP_TIMER Timer);
typedef DWORD TP_WAIT_RESULT;
typedef struct _TP_WAIT TP_WAIT, *PTP_WAIT;
typedef void (*PTP_WAIT_CALLBACK)(PTP_CALLBACK_INSTANCE Instance, PVOID Context, PTP_WAIT Wait, TP_WAIT_RESULT WaitResult);
typedef struct _TP_IO TP_IO, *PTP_IO;
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void TpInitializeCallbackEnviron(PTP_CALLBACK_ENVIRON cbe)
{
cbe->Pool = ((void *)0);
cbe->CleanupGroup = ((void *)0);
cbe->CleanupGroupCancelCallback = ((void *)0);
cbe->RaceDll = ((void *)0);
cbe->ActivationContext = ((void *)0);
cbe->FinalizationCallback = ((void *)0);
cbe->u.Flags = 0;
cbe->Version = 3;
cbe->CallbackPriority = TP_CALLBACK_PRIORITY_NORMAL;
cbe->Size = sizeof(TP_CALLBACK_ENVIRON);
}
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void TpSetCallbackThreadpool(PTP_CALLBACK_ENVIRON cbe, PTP_POOL pool) { cbe->Pool = pool; }
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void TpSetCallbackCleanupGroup(PTP_CALLBACK_ENVIRON cbe, PTP_CLEANUP_GROUP cleanup_group, PTP_CLEANUP_GROUP_CANCEL_CALLBACK cleanup_group_cb)
{
cbe->CleanupGroup = cleanup_group;
cbe->CleanupGroupCancelCallback = cleanup_group_cb;
}
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void TpSetCallbackActivationContext(PTP_CALLBACK_ENVIRON cbe, struct _ACTIVATION_CONTEXT *actx) { cbe->ActivationContext = actx; }
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void TpSetCallbackNoActivationContext(PTP_CALLBACK_ENVIRON cbe) { cbe->ActivationContext = (struct _ACTIVATION_CONTEXT *)(LONG_PTR)-1; }
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void TpSetCallbackLongFunction(PTP_CALLBACK_ENVIRON cbe) { cbe->u.s.LongFunction = 1; }
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void TpSetCallbackRaceWithDll(PTP_CALLBACK_ENVIRON cbe, PVOID h) { cbe->RaceDll = h; }
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void TpSetCallbackFinalizationCallback(PTP_CALLBACK_ENVIRON cbe, PTP_SIMPLE_CALLBACK fini_cb) { cbe->FinalizationCallback = fini_cb; }
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void TpSetCallbackPriority(PTP_CALLBACK_ENVIRON cbe, TP_CALLBACK_PRIORITY prio) { cbe->CallbackPriority = prio; }
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void TpSetCallbackPersistent(PTP_CALLBACK_ENVIRON cbe) { cbe->u.s.Persistent = 1; }
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void TpDestroyCallbackEnviron(PTP_CALLBACK_ENVIRON cbe)
{
{
(cbe) = (cbe);
};
}
struct _TEB *NtCurrentTeb(void);
PVOID GetCurrentFiber(void);
PVOID GetFiberData(void);
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) struct _TEB *NtCurrentTeb(void) { return (struct _TEB *)__readgsqword(((LONG) __builtin_offsetof(NT_TIB, Self))); }
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) PVOID GetCurrentFiber(void) { return (PVOID)__readgsqword(((LONG) __builtin_offsetof(NT_TIB, FiberData))); }
extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) PVOID GetFiberData(void)
{
return *(PVOID *)GetCurrentFiber();
}
typedef GUID CRM_PROTOCOL_ID, *PCRM_PROTOCOL_ID;
typedef ULONG NOTIFICATION_MASK;
typedef struct _TRANSACTION_NOTIFICATION
{
PVOID TransactionKey;
ULONG TransactionNotification;
LARGE_INTEGER TmVirtualClock;
ULONG ArgumentLength;
} TRANSACTION_NOTIFICATION, *PTRANSACTION_NOTIFICATION;
typedef struct _TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT
{
GUID EnlistmentId;
GUID UOW;
} TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT, *PTRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT;
typedef struct _TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT
{
GUID TmIdentity;
ULONG Flags;
} TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT, *PTRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT;
typedef ULONG SAVEPOINT_ID, *PSAVEPOINT_ID;
typedef struct _TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT
{
SAVEPOINT_ID SavepointId;
} TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT, *PTRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT;
typedef struct _TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT
{
ULONG PropagationCookie;
GUID UOW;
GUID TmIdentity;
ULONG BufferLength;
} TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT, *PTRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT;
typedef struct _TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT
{
ULONG MarshalCookie;
GUID UOW;
} TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT, *PTRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT;
typedef TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT TRANSACTION_NOTIFICATION_PROMOTE_ARGUMENT, *PTRANSACTION_NOTIFICATION_PROMOTE_ARGUMENT;
typedef struct _KCRM_MARSHAL_HEADER
{
ULONG VersionMajor;
ULONG VersionMinor;
ULONG NumProtocols;
ULONG Unused;
} KCRM_MARSHAL_HEADER, *PKCRM_MARSHAL_HEADER, *PRKCRM_MARSHAL_HEADER;
typedef struct _KCRM_TRANSACTION_BLOB
{
GUID UOW;
GUID TmIdentity;
ULONG IsolationLevel;
ULONG IsolationFlags;
ULONG Timeout;
WCHAR Description[64];
} KCRM_TRANSACTION_BLOB, *PKCRM_TRANSACTION_BLOB, *PRKCRM_TRANSACTION_BLOB;
typedef struct _KCRM_PROTOCOL_BLOB
{
CRM_PROTOCOL_ID ProtocolId;
ULONG StaticInfoLength;
ULONG TransactionIdInfoLength;
ULONG Unused1;
ULONG Unused2;
} KCRM_PROTOCOL_BLOB, *PKCRM_PROTOCOL_BLOB, *PRKCRM_PROTOCOL_BLOB;
typedef enum _TRANSACTION_OUTCOME
{
TransactionOutcomeUndetermined = 1,
TransactionOutcomeCommitted,
TransactionOutcomeAborted,
} TRANSACTION_OUTCOME;
typedef enum _TRANSACTION_STATE
{
TransactionStateNormal = 1,
TransactionStateIndoubt,
TransactionStateCommittedNotify,
} TRANSACTION_STATE;
typedef struct _TRANSACTION_BASIC_INFORMATION
{
GUID TransactionId;
DWORD State;
DWORD Outcome;
} TRANSACTION_BASIC_INFORMATION, *PTRANSACTION_BASIC_INFORMATION;
typedef struct _TRANSACTIONMANAGER_BASIC_INFORMATION
{
GUID TmIdentity;
LARGE_INTEGER VirtualClock;
} TRANSACTIONMANAGER_BASIC_INFORMATION, *PTRANSACTIONMANAGER_BASIC_INFORMATION;
typedef struct _TRANSACTIONMANAGER_LOG_INFORMATION
{
GUID LogIdentity;
} TRANSACTIONMANAGER_LOG_INFORMATION, *PTRANSACTIONMANAGER_LOG_INFORMATION;
typedef struct _TRANSACTIONMANAGER_LOGPATH_INFORMATION
{
DWORD LogPathLength;
WCHAR LogPath[1];
} TRANSACTIONMANAGER_LOGPATH_INFORMATION, *PTRANSACTIONMANAGER_LOGPATH_INFORMATION;
typedef struct _TRANSACTIONMANAGER_RECOVERY_INFORMATION
{
ULONGLONG LastRecoveredLsn;
} TRANSACTIONMANAGER_RECOVERY_INFORMATION, *PTRANSACTIONMANAGER_RECOVERY_INFORMATION;
typedef struct _TRANSACTIONMANAGER_OLDEST_INFORMATION
{
GUID OldestTransactionGuid;
} TRANSACTIONMANAGER_OLDEST_INFORMATION, *PTRANSACTIONMANAGER_OLDEST_INFORMATION;
typedef struct _TRANSACTION_PROPERTIES_INFORMATION
{
DWORD IsolationLevel;
DWORD IsolationFlags;
LARGE_INTEGER Timeout;
DWORD Outcome;
DWORD DescriptionLength;
WCHAR Description[1];
} TRANSACTION_PROPERTIES_INFORMATION, *PTRANSACTION_PROPERTIES_INFORMATION;
typedef struct _TRANSACTION_BIND_INFORMATION
{
HANDLE TmHandle;
} TRANSACTION_BIND_INFORMATION, *PTRANSACTION_BIND_INFORMATION;
typedef struct _TRANSACTION_ENLISTMENT_PAIR
{
GUID EnlistmentId;
GUID ResourceManagerId;
} TRANSACTION_ENLISTMENT_PAIR, *PTRANSACTION_ENLISTMENT_PAIR;
typedef struct _TRANSACTION_ENLISTMENTS_INFORMATION
{
DWORD NumberOfEnlistments;
TRANSACTION_ENLISTMENT_PAIR EnlistmentPair[1];
} TRANSACTION_ENLISTMENTS_INFORMATION, *PTRANSACTION_ENLISTMENTS_INFORMATION;
typedef struct _TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION
{
TRANSACTION_ENLISTMENT_PAIR SuperiorEnlistmentPair;
} TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION, *PTRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION;
typedef struct _RESOURCEMANAGER_BASIC_INFORMATION
{
GUID ResourceManagerId;
DWORD DescriptionLength;
WCHAR Description[1];
} RESOURCEMANAGER_BASIC_INFORMATION, *PRESOURCEMANAGER_BASIC_INFORMATION;
typedef struct _RESOURCEMANAGER_COMPLETION_INFORMATION
{
HANDLE IoCompletionPortHandle;
ULONG_PTR CompletionKey;
} RESOURCEMANAGER_COMPLETION_INFORMATION, *PRESOURCEMANAGER_COMPLETION_INFORMATION;
typedef enum _TRANSACTION_INFORMATION_CLASS
{
TransactionBasicInformation,
TransactionPropertiesInformation,
TransactionEnlistmentInformation,
TransactionSuperiorEnlistmentInformation,
TransactionBindInformation,
TransactionDTCPrivateInformation
} TRANSACTION_INFORMATION_CLASS;
typedef enum _TRANSACTIONMANAGER_INFORMATION_CLASS
{
TransactionManagerBasicInformation,
TransactionManagerLogInformation,
TransactionManagerLogPathInformation,
TransactionManagerOnlineProbeInformation = 3,
TransactionManagerRecoveryInformation = 4,
TransactionManagerOldestTransactionInformation = 5
} TRANSACTIONMANAGER_INFORMATION_CLASS;
typedef enum _RESOURCEMANAGER_INFORMATION_CLASS
{
ResourceManagerBasicInformation,
ResourceManagerCompletionInformation
} RESOURCEMANAGER_INFORMATION_CLASS;
typedef struct _ENLISTMENT_BASIC_INFORMATION
{
GUID EnlistmentId;
GUID TransactionId;
GUID ResourceManagerId;
} ENLISTMENT_BASIC_INFORMATION, *PENLISTMENT_BASIC_INFORMATION;
typedef struct _ENLISTMENT_CRM_INFORMATION
{
GUID CrmTransactionManagerId;
GUID CrmResourceManagerId;
GUID CrmEnlistmentId;
} ENLISTMENT_CRM_INFORMATION, *PENLISTMENT_CRM_INFORMATION;
typedef enum _ENLISTMENT_INFORMATION_CLASS
{
EnlistmentBasicInformation,
EnlistmentRecoveryInformation,
EnlistmentCrmInformation
} ENLISTMENT_INFORMATION_CLASS;
typedef struct _TRANSACTION_LIST_ENTRY
{
GUID UOW;
} TRANSACTION_LIST_ENTRY, *PTRANSACTION_LIST_ENTRY;
typedef struct _TRANSACTION_LIST_INFORMATION
{
DWORD NumberOfTransactions;
TRANSACTION_LIST_ENTRY TransactionInformation[1];
} TRANSACTION_LIST_INFORMATION, *PTRANSACTION_LIST_INFORMATION;
typedef enum _KTMOBJECT_TYPE
{
KTMOBJECT_TRANSACTION,
KTMOBJECT_TRANSACTION_MANAGER,
KTMOBJECT_RESOURCE_MANAGER,
KTMOBJECT_ENLISTMENT,
KTMOBJECT_INVALID
} KTMOBJECT_TYPE,
*PKTMOBJECT_TYPE;
typedef struct _KTMOBJECT_CURSOR
{
GUID LastQuery;
DWORD ObjectIdCount;
GUID ObjectIds[1];
} KTMOBJECT_CURSOR, *PKTMOBJECT_CURSOR;
typedef struct _WOW64_FLOATING_SAVE_AREA
{
DWORD ControlWord;
DWORD StatusWord;
DWORD TagWord;
DWORD ErrorOffset;
DWORD ErrorSelector;
DWORD DataOffset;
DWORD DataSelector;
BYTE RegisterArea[80];
DWORD Cr0NpxState;
} WOW64_FLOATING_SAVE_AREA, *PWOW64_FLOATING_SAVE_AREA;
typedef struct _WOW64_CONTEXT
{
DWORD ContextFlags;
DWORD Dr0;
DWORD Dr1;
DWORD Dr2;
DWORD Dr3;
DWORD Dr6;
DWORD Dr7;
WOW64_FLOATING_SAVE_AREA FloatSave;
DWORD 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;
BYTE ExtendedRegisters[512];
} WOW64_CONTEXT, *PWOW64_CONTEXT;
typedef struct _WOW64_LDT_ENTRY
{
WORD LimitLow;
WORD BaseLow;
__extension__ union {
struct
{
BYTE BaseMid;
BYTE Flags1;
BYTE Flags2;
BYTE BaseHi;
} Bytes;
struct
{
DWORD BaseMid : 8;
DWORD Type : 5;
DWORD Dpl : 2;
DWORD Pres : 1;
DWORD LimitHi : 4;
DWORD Sys : 1;
DWORD Reserved_0 : 1;
DWORD Default_Big : 1;
DWORD Granularity : 1;
DWORD BaseHi : 8;
} Bits;
} HighWord;
} WOW64_LDT_ENTRY, *PWOW64_LDT_ENTRY;
typedef struct _WOW64_DESCRIPTOR_TABLE_ENTRY
{
DWORD Selector;
WOW64_LDT_ENTRY Descriptor;
} WOW64_DESCRIPTOR_TABLE_ENTRY, *PWOW64_DESCRIPTOR_TABLE_ENTRY;
typedef struct _PROCESSOR_NUMBER
{
WORD Group;
BYTE Number;
BYTE Reserved;
} PROCESSOR_NUMBER, *PPROCESSOR_NUMBER;
typedef UINT_PTR WPARAM;
typedef LONG_PTR LPARAM;
typedef LONG_PTR LRESULT;
typedef HANDLE *SPHANDLE;
typedef HANDLE *LPHANDLE;
typedef HANDLE HGLOBAL;
typedef HANDLE HLOCAL;
typedef HANDLE GLOBALHANDLE;
typedef HANDLE LOCALHANDLE;
typedef INT_PTR (*FARPROC)();
typedef INT_PTR (*NEARPROC)();
typedef INT_PTR (*PROC)();
typedef WORD ATOM;
typedef int HFILE;
struct HINSTANCE__
{
int unused;
};
typedef struct HINSTANCE__ *HINSTANCE;
struct HKEY__
{
int unused;
};
typedef struct HKEY__ *HKEY;
typedef HKEY *PHKEY;
struct HKL__
{
int unused;
};
typedef struct HKL__ *HKL;
struct HLSURF__
{
int unused;
};
typedef struct HLSURF__ *HLSURF;
struct HMETAFILE__
{
int unused;
};
typedef struct HMETAFILE__ *HMETAFILE;
typedef HINSTANCE HMODULE;
struct HRGN__
{
int unused;
};
typedef struct HRGN__ *HRGN;
struct HRSRC__
{
int unused;
};
typedef struct HRSRC__ *HRSRC;
struct HSPRITE__
{
int unused;
};
typedef struct HSPRITE__ *HSPRITE;
struct HSTR__
{
int unused;
};
typedef struct HSTR__ *HSTR;
struct HTASK__
{
int unused;
};
typedef struct HTASK__ *HTASK;
struct HWINSTA__
{
int unused;
};
typedef struct HWINSTA__ *HWINSTA;
typedef struct _FILETIME
{
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME, *PFILETIME, *LPFILETIME;
struct HWND__
{
int unused;
};
typedef struct HWND__ *HWND;
struct HHOOK__
{
int unused;
};
typedef struct HHOOK__ *HHOOK;
typedef void *HGDIOBJ;
struct HACCEL__
{
int unused;
};
typedef struct HACCEL__ *HACCEL;
struct HBITMAP__
{
int unused;
};
typedef struct HBITMAP__ *HBITMAP;
struct HBRUSH__
{
int unused;
};
typedef struct HBRUSH__ *HBRUSH;
struct HCOLORSPACE__
{
int unused;
};
typedef struct HCOLORSPACE__ *HCOLORSPACE;
struct HDC__
{
int unused;
};
typedef struct HDC__ *HDC;
struct HGLRC__
{
int unused;
};
typedef struct HGLRC__ *HGLRC;
struct HDESK__
{
int unused;
};
typedef struct HDESK__ *HDESK;
struct HENHMETAFILE__
{
int unused;
};
typedef struct HENHMETAFILE__ *HENHMETAFILE;
struct HFONT__
{
int unused;
};
typedef struct HFONT__ *HFONT;
struct HICON__
{
int unused;
};
typedef struct HICON__ *HICON;
struct HMENU__
{
int unused;
};
typedef struct HMENU__ *HMENU;
struct HPALETTE__
{
int unused;
};
typedef struct HPALETTE__ *HPALETTE;
struct HPEN__
{
int unused;
};
typedef struct HPEN__ *HPEN;
struct HMONITOR__
{
int unused;
};
typedef struct HMONITOR__ *HMONITOR;
struct HWINEVENTHOOK__
{
int unused;
};
typedef struct HWINEVENTHOOK__ *HWINEVENTHOOK;
typedef HICON HCURSOR;
typedef DWORD COLORREF;
struct HUMPD__
{
int unused;
};
typedef struct HUMPD__ *HUMPD;
typedef DWORD *LPCOLORREF;
typedef struct tagRECT
{
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT, *PRECT, *NPRECT, *LPRECT;
typedef const RECT *LPCRECT;
typedef struct _RECTL
{
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECTL, *PRECTL, *LPRECTL;
typedef const RECTL *LPCRECTL;
typedef struct tagPOINT
{
LONG x;
LONG y;
} POINT, *PPOINT, *NPPOINT, *LPPOINT;
typedef struct _POINTL
{
LONG x;
LONG y;
} POINTL, *PPOINTL;
typedef struct tagSIZE
{
LONG cx;
LONG cy;
} SIZE, *PSIZE, *LPSIZE;
typedef SIZE SIZEL;
typedef SIZE *PSIZEL, *LPSIZEL;
typedef struct tagPOINTS
{
SHORT x;
SHORT y;
} POINTS, *PPOINTS, *LPPOINTS;
typedef struct _SECURITY_ATTRIBUTES
{
DWORD nLength;
LPVOID lpSecurityDescriptor;
WINBOOL bInheritHandle;
} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
typedef struct _OVERLAPPED
{
ULONG_PTR Internal;
ULONG_PTR InternalHigh;
__extension__ union {
struct
{
DWORD Offset;
DWORD OffsetHigh;
};
PVOID Pointer;
};
HANDLE hEvent;
} OVERLAPPED, *LPOVERLAPPED;
typedef struct _OVERLAPPED_ENTRY
{
ULONG_PTR lpCompletionKey;
LPOVERLAPPED lpOverlapped;
ULONG_PTR Internal;
DWORD dwNumberOfBytesTransferred;
} OVERLAPPED_ENTRY, *LPOVERLAPPED_ENTRY;
typedef struct _SYSTEMTIME
{
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
typedef struct _WIN32_FIND_DATAA
{
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
CHAR cFileName[260];
CHAR cAlternateFileName[14];
} WIN32_FIND_DATAA, *PWIN32_FIND_DATAA, *LPWIN32_FIND_DATAA;
typedef struct _WIN32_FIND_DATAW
{
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
WCHAR cFileName[260];
WCHAR cAlternateFileName[14];
} WIN32_FIND_DATAW, *PWIN32_FIND_DATAW, *LPWIN32_FIND_DATAW;
typedef WIN32_FIND_DATAW WIN32_FIND_DATA;
typedef PWIN32_FIND_DATAW PWIN32_FIND_DATA;
typedef LPWIN32_FIND_DATAW LPWIN32_FIND_DATA;
typedef enum _FINDEX_INFO_LEVELS
{
FindExInfoStandard,
FindExInfoBasic,
FindExInfoMaxInfoLevel
} FINDEX_INFO_LEVELS;
typedef enum _FINDEX_SEARCH_OPS
{
FindExSearchNameMatch,
FindExSearchLimitToDirectories,
FindExSearchLimitToDevices,
FindExSearchMaxSearchOp
} FINDEX_SEARCH_OPS;
typedef enum _GET_FILEEX_INFO_LEVELS
{
GetFileExInfoStandard,
GetFileExMaxInfoLevel
} GET_FILEEX_INFO_LEVELS;
typedef enum _FILE_INFO_BY_HANDLE_CLASS
{
FileBasicInfo,
FileStandardInfo,
FileNameInfo,
FileRenameInfo,
FileDispositionInfo,
FileAllocationInfo,
FileEndOfFileInfo,
FileStreamInfo,
FileCompressionInfo,
FileAttributeTagInfo,
FileIdBothDirectoryInfo,
FileIdBothDirectoryRestartInfo,
FileIoPriorityHintInfo,
FileRemoteProtocolInfo,
FileFullDirectoryInfo,
FileFullDirectoryRestartInfo,
FileCaseSensitiveInfo,
FileNormalizedNameInfo,
MaximumFileInfoByHandleClass
} FILE_INFO_BY_HANDLE_CLASS,
*PFILE_INFO_BY_HANDLE_CLASS;
typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION;
typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;
typedef RTL_CRITICAL_SECTION_DEBUG CRITICAL_SECTION_DEBUG;
typedef PRTL_CRITICAL_SECTION_DEBUG PCRITICAL_SECTION_DEBUG;
typedef PRTL_CRITICAL_SECTION_DEBUG LPCRITICAL_SECTION_DEBUG;
typedef void (*LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD dwErrorCode, DWORD dwNumberOfBytesTransfered, LPOVERLAPPED lpOverlapped);
typedef struct _PROCESS_HEAP_ENTRY
{
PVOID lpData;
DWORD cbData;
BYTE cbOverhead;
BYTE iRegionIndex;
WORD wFlags;
__extension__ union {
struct
{
HANDLE hMem;
DWORD dwReserved[3];
} Block;
struct
{
DWORD dwCommittedSize;
DWORD dwUnCommittedSize;
LPVOID lpFirstBlock;
LPVOID lpLastBlock;
} Region;
};
} PROCESS_HEAP_ENTRY, *LPPROCESS_HEAP_ENTRY, *PPROCESS_HEAP_ENTRY;
typedef struct _REASON_CONTEXT
{
ULONG Version;
DWORD Flags;
union {
struct
{
HMODULE LocalizedReasonModule;
ULONG LocalizedReasonId;
ULONG ReasonStringCount;
LPWSTR *ReasonStrings;
} Detailed;
LPWSTR SimpleReasonString;
} Reason;
} REASON_CONTEXT, *PREASON_CONTEXT;
typedef DWORD (*PTHREAD_START_ROUTINE)(LPVOID lpThreadParameter);
typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
typedef LPVOID (*PENCLAVE_ROUTINE)(LPVOID lpThreadParameter);
typedef PENCLAVE_ROUTINE LPENCLAVE_ROUTINE;
typedef struct _EXCEPTION_DEBUG_INFO
{
EXCEPTION_RECORD ExceptionRecord;
DWORD dwFirstChance;
} EXCEPTION_DEBUG_INFO, *LPEXCEPTION_DEBUG_INFO;
typedef struct _CREATE_THREAD_DEBUG_INFO
{
HANDLE hThread;
LPVOID lpThreadLocalBase;
LPTHREAD_START_ROUTINE lpStartAddress;
} CREATE_THREAD_DEBUG_INFO, *LPCREATE_THREAD_DEBUG_INFO;
typedef struct _CREATE_PROCESS_DEBUG_INFO
{
HANDLE hFile;
HANDLE hProcess;
HANDLE hThread;
LPVOID lpBaseOfImage;
DWORD dwDebugInfoFileOffset;
DWORD nDebugInfoSize;
LPVOID lpThreadLocalBase;
LPTHREAD_START_ROUTINE lpStartAddress;
LPVOID lpImageName;
WORD fUnicode;
} CREATE_PROCESS_DEBUG_INFO, *LPCREATE_PROCESS_DEBUG_INFO;
typedef struct _EXIT_THREAD_DEBUG_INFO
{
DWORD dwExitCode;
} EXIT_THREAD_DEBUG_INFO, *LPEXIT_THREAD_DEBUG_INFO;
typedef struct _EXIT_PROCESS_DEBUG_INFO
{
DWORD dwExitCode;
} EXIT_PROCESS_DEBUG_INFO, *LPEXIT_PROCESS_DEBUG_INFO;
typedef struct _LOAD_DLL_DEBUG_INFO
{
HANDLE hFile;
LPVOID lpBaseOfDll;
DWORD dwDebugInfoFileOffset;
DWORD nDebugInfoSize;
LPVOID lpImageName;
WORD fUnicode;
} LOAD_DLL_DEBUG_INFO, *LPLOAD_DLL_DEBUG_INFO;
typedef struct _UNLOAD_DLL_DEBUG_INFO
{
LPVOID lpBaseOfDll;
} UNLOAD_DLL_DEBUG_INFO, *LPUNLOAD_DLL_DEBUG_INFO;
typedef struct _OUTPUT_DEBUG_STRING_INFO
{
LPSTR lpDebugStringData;
WORD fUnicode;
WORD nDebugStringLength;
} OUTPUT_DEBUG_STRING_INFO, *LPOUTPUT_DEBUG_STRING_INFO;
typedef struct _RIP_INFO
{
DWORD dwError;
DWORD dwType;
} RIP_INFO, *LPRIP_INFO;
typedef struct _DEBUG_EVENT
{
DWORD dwDebugEventCode;
DWORD dwProcessId;
DWORD dwThreadId;
union {
EXCEPTION_DEBUG_INFO Exception;
CREATE_THREAD_DEBUG_INFO CreateThread;
CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
EXIT_THREAD_DEBUG_INFO ExitThread;
EXIT_PROCESS_DEBUG_INFO ExitProcess;
LOAD_DLL_DEBUG_INFO LoadDll;
UNLOAD_DLL_DEBUG_INFO UnloadDll;
OUTPUT_DEBUG_STRING_INFO DebugString;
RIP_INFO RipInfo;
} u;
} DEBUG_EVENT, *LPDEBUG_EVENT;
typedef PCONTEXT LPCONTEXT;
typedef struct _CONTRACT_DESCRIPTION CONTRACT_DESCRIPTION;
typedef struct _BEM_REFERENCE BEM_REFERENCE;
typedef void (*BEM_FREE_INTERFACE_CALLBACK)(void *interfaceInstance);
HRESULT BemCreateReference(const GUID *const iid, void *interfaceInstance, BEM_FREE_INTERFACE_CALLBACK freeCallback, BEM_REFERENCE **reference);
HRESULT BemCreateContractFrom(LPCWSTR dllPath, const GUID *const extensionId, const CONTRACT_DESCRIPTION *contractDescription, void *hostContract, void **contract);
HRESULT BemCopyReference(BEM_REFERENCE *reference, BEM_REFERENCE **copiedReference);
void BemFreeReference(BEM_REFERENCE *reference);
void BemFreeContract(void *contract);
__attribute__((dllimport)) WINBOOL IsDebuggerPresent(void);
__attribute__((dllimport)) void OutputDebugStringA(LPCSTR lpOutputString);
__attribute__((dllimport)) void OutputDebugStringW(LPCWSTR lpOutputString);
__attribute__((dllimport)) void DebugBreak(void);
__attribute__((dllimport)) WINBOOL ContinueDebugEvent(DWORD dwProcessId, DWORD dwThreadId, DWORD dwContinueStatus);
__attribute__((dllimport)) WINBOOL WaitForDebugEvent(LPDEBUG_EVENT lpDebugEvent, DWORD dwMilliseconds);
__attribute__((dllimport)) WINBOOL DebugActiveProcess(DWORD dwProcessId);
__attribute__((dllimport)) WINBOOL DebugActiveProcessStop(DWORD dwProcessId);
__attribute__((dllimport)) WINBOOL CheckRemoteDebuggerPresent(HANDLE hProcess, PBOOL pbDebuggerPresent);
typedef LONG (*PTOP_LEVEL_EXCEPTION_FILTER)(struct _EXCEPTION_POINTERS *ExceptionInfo);
typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
__attribute__((dllimport)) UINT SetErrorMode(UINT uMode);
__attribute__((dllimport)) LPTOP_LEVEL_EXCEPTION_FILTER SetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter);
__attribute__((dllimport)) LONG UnhandledExceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo);
__attribute__((dllimport)) PVOID AddVectoredExceptionHandler(ULONG First, PVECTORED_EXCEPTION_HANDLER Handler);
__attribute__((dllimport)) ULONG RemoveVectoredExceptionHandler(PVOID Handle);
__attribute__((dllimport)) PVOID AddVectoredContinueHandler(ULONG First, PVECTORED_EXCEPTION_HANDLER Handler);
__attribute__((dllimport)) ULONG RemoveVectoredContinueHandler(PVOID Handle);
__attribute__((dllimport)) UINT GetErrorMode(void);
__attribute__((dllimport)) void RaiseException(DWORD dwExceptionCode, DWORD dwExceptionFlags, DWORD nNumberOfArguments, const ULONG_PTR *lpArguments);
__attribute__((dllimport)) DWORD GetLastError(void);
__attribute__((dllimport)) void SetLastError(DWORD dwErrCode);
__attribute__((dllimport)) DWORD FlsAlloc(PFLS_CALLBACK_FUNCTION lpCallback);
__attribute__((dllimport)) PVOID FlsGetValue(DWORD dwFlsIndex);
__attribute__((dllimport)) WINBOOL FlsSetValue(DWORD dwFlsIndex, PVOID lpFlsData);
__attribute__((dllimport)) WINBOOL FlsFree(DWORD dwFlsIndex);
__attribute__((dllimport)) WINBOOL IsThreadAFiber(void);
__attribute__((dllimport)) HANDLE CreateFileW(LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
__attribute__((dllimport)) DWORD GetFileAttributesW(LPCWSTR lpFileName);
__attribute__((dllimport)) DWORD GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh);
__attribute__((dllimport)) DWORD SetFilePointer(HANDLE hFile, LONG lDistanceToMove, PLONG lpDistanceToMoveHigh, DWORD dwMoveMethod);
typedef struct _BY_HANDLE_FILE_INFORMATION
{
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD dwVolumeSerialNumber;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD nNumberOfLinks;
DWORD nFileIndexHigh;
DWORD nFileIndexLow;
} BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION,
*LPBY_HANDLE_FILE_INFORMATION;
__attribute__((dllimport)) HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
__attribute__((dllimport)) WINBOOL DefineDosDeviceW(DWORD dwFlags, LPCWSTR lpDeviceName, LPCWSTR lpTargetPath);
__attribute__((dllimport)) WINBOOL FindCloseChangeNotification(HANDLE hChangeHandle);
__attribute__((dllimport)) HANDLE FindFirstChangeNotificationA(LPCSTR lpPathName, WINBOOL bWatchSubtree, DWORD dwNotifyFilter);
__attribute__((dllimport)) HANDLE FindFirstChangeNotificationW(LPCWSTR lpPathName, WINBOOL bWatchSubtree, DWORD dwNotifyFilter);
__attribute__((dllimport)) HANDLE FindFirstVolumeW(LPWSTR lpszVolumeName, DWORD cchBufferLength);
__attribute__((dllimport)) WINBOOL FindNextChangeNotification(HANDLE hChangeHandle);
__attribute__((dllimport)) WINBOOL FindNextVolumeW(HANDLE hFindVolume, LPWSTR lpszVolumeName, DWORD cchBufferLength);
__attribute__((dllimport)) WINBOOL FindVolumeClose(HANDLE hFindVolume);
__attribute__((dllimport)) WINBOOL GetFileInformationByHandle(HANDLE hFile, LPBY_HANDLE_FILE_INFORMATION lpFileInformation);
__attribute__((dllimport)) LONG CompareFileTime(const FILETIME *lpFileTime1, const FILETIME *lpFileTime2);
__attribute__((dllimport)) WINBOOL DeleteVolumeMountPointW(LPCWSTR lpszVolumeMountPoint);
__attribute__((dllimport)) WINBOOL FileTimeToLocalFileTime(const FILETIME *lpFileTime, LPFILETIME lpLocalFileTime);
__attribute__((dllimport)) HANDLE FindFirstFileA(LPCSTR lpFileName, LPWIN32_FIND_DATAA lpFindFileData);
__attribute__((dllimport)) HANDLE FindFirstFileW(LPCWSTR lpFileName, LPWIN32_FIND_DATAW lpFindFileData);
__attribute__((dllimport)) WINBOOL GetDiskFreeSpaceA(LPCSTR lpRootPathName, LPDWORD lpSectorsPerCluster, LPDWORD lpBytesPerSector, LPDWORD lpNumberOfFreeClusters, LPDWORD lpTotalNumberOfClusters);
__attribute__((dllimport)) WINBOOL GetDiskFreeSpaceW(LPCWSTR lpRootPathName, LPDWORD lpSectorsPerCluster, LPDWORD lpBytesPerSector, LPDWORD lpNumberOfFreeClusters, LPDWORD lpTotalNumberOfClusters);
__attribute__((dllimport)) UINT GetDriveTypeA(LPCSTR lpRootPathName);
__attribute__((dllimport)) UINT GetDriveTypeW(LPCWSTR lpRootPathName);
__attribute__((dllimport)) DWORD GetFileAttributesA(LPCSTR lpFileName);
__attribute__((dllimport)) WINBOOL GetFileSizeEx(HANDLE hFile, PLARGE_INTEGER lpFileSize);
__attribute__((dllimport)) WINBOOL GetFileTime(HANDLE hFile, LPFILETIME lpCreationTime, LPFILETIME lpLastAccessTime, LPFILETIME lpLastWriteTime);
__attribute__((dllimport)) DWORD GetFileType(HANDLE hFile);
__attribute__((dllimport)) DWORD GetFullPathNameA(LPCSTR lpFileName, DWORD nBufferLength, LPSTR lpBuffer, LPSTR *lpFilePart);
__attribute__((dllimport)) DWORD GetFullPathNameW(LPCWSTR lpFileName, DWORD nBufferLength, LPWSTR lpBuffer, LPWSTR *lpFilePart);
__attribute__((dllimport)) DWORD GetLogicalDrives(void);
__attribute__((dllimport)) DWORD GetLogicalDriveStringsW(DWORD nBufferLength, LPWSTR lpBuffer);
__attribute__((dllimport)) DWORD GetLongPathNameA(LPCSTR lpszShortPath, LPSTR lpszLongPath, DWORD cchBuffer);
__attribute__((dllimport)) DWORD GetLongPathNameW(LPCWSTR lpszShortPath, LPWSTR lpszLongPath, DWORD cchBuffer);
__attribute__((dllimport)) DWORD GetShortPathNameW(LPCWSTR lpszLongPath, LPWSTR lpszShortPath, DWORD cchBuffer);
__attribute__((dllimport)) UINT GetTempFileNameA(LPCSTR lpPathName, LPCSTR lpPrefixString, UINT uUnique, LPSTR lpTempFileName);
__attribute__((dllimport)) UINT GetTempFileNameW(LPCWSTR lpPathName, LPCWSTR lpPrefixString, UINT uUnique, LPWSTR lpTempFileName);
__attribute__((dllimport)) WINBOOL GetVolumeInformationW(LPCWSTR lpRootPathName, LPWSTR lpVolumeNameBuffer, DWORD nVolumeNameSize, LPDWORD lpVolumeSerialNumber, LPDWORD lpMaximumComponentLength, LPDWORD lpFileSystemFlags, LPWSTR lpFileSystemNameBuffer, DWORD nFileSystemNameSize);
__attribute__((dllimport)) WINBOOL GetVolumePathNameW(LPCWSTR lpszFileName, LPWSTR lpszVolumePathName, DWORD cchBufferLength);
__attribute__((dllimport)) WINBOOL LocalFileTimeToFileTime(const FILETIME *lpLocalFileTime, LPFILETIME lpFileTime);
__attribute__((dllimport)) WINBOOL LockFile(HANDLE hFile, DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh, DWORD nNumberOfBytesToLockLow, DWORD nNumberOfBytesToLockHigh);
__attribute__((dllimport)) DWORD QueryDosDeviceW(LPCWSTR lpDeviceName, LPWSTR lpTargetPath, DWORD ucchMax);
__attribute__((dllimport)) WINBOOL ReadFileEx(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPOVERLAPPED lpOverlapped, LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
__attribute__((dllimport)) WINBOOL ReadFileScatter(HANDLE hFile, FILE_SEGMENT_ELEMENT aSegmentArray[], DWORD nNumberOfBytesToRead, LPDWORD lpReserved, LPOVERLAPPED lpOverlapped);
__attribute__((dllimport)) WINBOOL SetFileTime(HANDLE hFile, const FILETIME *lpCreationTime, const FILETIME *lpLastAccessTime, const FILETIME *lpLastWriteTime);
__attribute__((dllimport)) WINBOOL SetFileValidData(HANDLE hFile, LONGLONG ValidDataLength);
__attribute__((dllimport)) WINBOOL UnlockFile(HANDLE hFile, DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh, DWORD nNumberOfBytesToUnlockLow, DWORD nNumberOfBytesToUnlockHigh);
__attribute__((dllimport)) WINBOOL WriteFileEx(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, LPOVERLAPPED lpOverlapped, LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
__attribute__((dllimport)) WINBOOL WriteFileGather(HANDLE hFile, FILE_SEGMENT_ELEMENT aSegmentArray[], DWORD nNumberOfBytesToWrite, LPDWORD lpReserved, LPOVERLAPPED lpOverlapped);
__attribute__((dllimport)) WINBOOL GetVolumeNameForVolumeMountPointW(LPCWSTR lpszVolumeMountPoint, LPWSTR lpszVolumeName, DWORD cchBufferLength);
__attribute__((dllimport)) WINBOOL GetVolumePathNamesForVolumeNameW(LPCWSTR lpszVolumeName, LPWCH lpszVolumePathNames, DWORD cchBufferLength, PDWORD lpcchReturnLength);
__attribute__((dllimport)) DWORD GetFinalPathNameByHandleA(HANDLE hFile, LPSTR lpszFilePath, DWORD cchFilePath, DWORD dwFlags);
__attribute__((dllimport)) DWORD GetFinalPathNameByHandleW(HANDLE hFile, LPWSTR lpszFilePath, DWORD cchFilePath, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL GetVolumeInformationByHandleW(HANDLE hFile, LPWSTR lpVolumeNameBuffer, DWORD nVolumeNameSize, LPDWORD lpVolumeSerialNumber, LPDWORD lpMaximumComponentLength, LPDWORD lpFileSystemFlags, LPWSTR lpFileSystemNameBuffer, DWORD nFileSystemNameSize);
typedef struct _WIN32_FILE_ATTRIBUTE_DATA
{
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
} WIN32_FILE_ATTRIBUTE_DATA, *LPWIN32_FILE_ATTRIBUTE_DATA;
__attribute__((dllimport)) WINBOOL CreateDirectoryA(LPCSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
__attribute__((dllimport)) WINBOOL CreateDirectoryW(LPCWSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
__attribute__((dllimport)) WINBOOL DeleteFileA(LPCSTR lpFileName);
__attribute__((dllimport)) WINBOOL DeleteFileW(LPCWSTR lpFileName);
__attribute__((dllimport)) WINBOOL FindClose(HANDLE hFindFile);
__attribute__((dllimport)) HANDLE FindFirstFileExA(LPCSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData, FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags);
__attribute__((dllimport)) HANDLE FindFirstFileExW(LPCWSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData, FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags);
__attribute__((dllimport)) WINBOOL FindNextFileA(HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData);
__attribute__((dllimport)) WINBOOL FindNextFileW(HANDLE hFindFile, LPWIN32_FIND_DATAW lpFindFileData);
__attribute__((dllimport)) WINBOOL FlushFileBuffers(HANDLE hFile);
__attribute__((dllimport)) WINBOOL GetDiskFreeSpaceExA(LPCSTR lpDirectoryName, PULARGE_INTEGER lpFreeBytesAvailableToCaller, PULARGE_INTEGER lpTotalNumberOfBytes, PULARGE_INTEGER lpTotalNumberOfFreeBytes);
__attribute__((dllimport)) WINBOOL GetDiskFreeSpaceExW(LPCWSTR lpDirectoryName, PULARGE_INTEGER lpFreeBytesAvailableToCaller, PULARGE_INTEGER lpTotalNumberOfBytes, PULARGE_INTEGER lpTotalNumberOfFreeBytes);
__attribute__((dllimport)) WINBOOL GetFileAttributesExA(LPCSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, LPVOID lpFileInformation);
__attribute__((dllimport)) WINBOOL GetFileAttributesExW(LPCWSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, LPVOID lpFileInformation);
__attribute__((dllimport)) WINBOOL LockFileEx(HANDLE hFile, DWORD dwFlags, DWORD dwReserved, DWORD nNumberOfBytesToLockLow, DWORD nNumberOfBytesToLockHigh, LPOVERLAPPED lpOverlapped);
__attribute__((dllimport)) WINBOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped);
__attribute__((dllimport)) WINBOOL RemoveDirectoryA(LPCSTR lpPathName);
__attribute__((dllimport)) WINBOOL RemoveDirectoryW(LPCWSTR lpPathName);
__attribute__((dllimport)) WINBOOL SetEndOfFile(HANDLE hFile);
__attribute__((dllimport)) WINBOOL SetFileAttributesA(LPCSTR lpFileName, DWORD dwFileAttributes);
__attribute__((dllimport)) WINBOOL SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes);
__attribute__((dllimport)) WINBOOL SetFilePointerEx(HANDLE hFile, LARGE_INTEGER liDistanceToMove, PLARGE_INTEGER lpNewFilePointer, DWORD dwMoveMethod);
__attribute__((dllimport)) WINBOOL UnlockFileEx(HANDLE hFile, DWORD dwReserved, DWORD nNumberOfBytesToUnlockLow, DWORD nNumberOfBytesToUnlockHigh, LPOVERLAPPED lpOverlapped);
__attribute__((dllimport)) WINBOOL WriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped);
__attribute__((dllimport)) DWORD GetTempPathA(DWORD nBufferLength, LPSTR lpBuffer);
__attribute__((dllimport)) DWORD GetTempPathW(DWORD nBufferLength, LPWSTR lpBuffer);
__attribute__((dllimport)) WINBOOL SetFileInformationByHandle(HANDLE hFile, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, LPVOID lpFileInformation, DWORD dwBufferSize);
__attribute__((dllimport)) WINBOOL CloseHandle(HANDLE hObject);
__attribute__((dllimport)) WINBOOL DuplicateHandle(HANDLE hSourceProcessHandle, HANDLE hSourceHandle, HANDLE hTargetProcessHandle, LPHANDLE lpTargetHandle, DWORD dwDesiredAccess, WINBOOL bInheritHandle, DWORD dwOptions);
__attribute__((dllimport)) WINBOOL GetHandleInformation(HANDLE hObject, LPDWORD lpdwFlags);
__attribute__((dllimport)) WINBOOL SetHandleInformation(HANDLE hObject, DWORD dwMask, DWORD dwFlags);
typedef struct _HEAP_SUMMARY
{
DWORD cb;
SIZE_T cbAllocated;
SIZE_T cbCommitted;
SIZE_T cbReserved;
SIZE_T cbMaxReserve;
} HEAP_SUMMARY, *PHEAP_SUMMARY;
typedef PHEAP_SUMMARY LPHEAP_SUMMARY;
__attribute__((dllimport)) HANDLE HeapCreate(DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaximumSize);
__attribute__((dllimport)) WINBOOL HeapDestroy(HANDLE hHeap);
__attribute__((dllimport)) WINBOOL HeapValidate(HANDLE hHeap, DWORD dwFlags, LPCVOID lpMem);
__attribute__((dllimport)) SIZE_T HeapCompact(HANDLE hHeap, DWORD dwFlags);
WINBOOL HeapSummary(HANDLE hHeap, DWORD dwFlags, LPHEAP_SUMMARY lpSummary);
__attribute__((dllimport)) DWORD GetProcessHeaps(DWORD NumberOfHeaps, PHANDLE ProcessHeaps);
__attribute__((dllimport)) WINBOOL HeapLock(HANDLE hHeap);
__attribute__((dllimport)) WINBOOL HeapUnlock(HANDLE hHeap);
__attribute__((dllimport)) WINBOOL HeapWalk(HANDLE hHeap, LPPROCESS_HEAP_ENTRY lpEntry);
__attribute__((dllimport)) WINBOOL HeapSetInformation(HANDLE HeapHandle, HEAP_INFORMATION_CLASS HeapInformationClass, PVOID HeapInformation, SIZE_T HeapInformationLength);
__attribute__((dllimport)) WINBOOL HeapQueryInformation(HANDLE HeapHandle, HEAP_INFORMATION_CLASS HeapInformationClass, PVOID HeapInformation, SIZE_T HeapInformationLength, PSIZE_T ReturnLength);
__attribute__((dllimport)) LPVOID HeapAlloc(HANDLE hHeap, DWORD dwFlags, SIZE_T dwBytes);
__attribute__((dllimport)) LPVOID HeapReAlloc(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem, SIZE_T dwBytes);
__attribute__((dllimport)) WINBOOL HeapFree(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem);
__attribute__((dllimport)) SIZE_T HeapSize(HANDLE hHeap, DWORD dwFlags, LPCVOID lpMem);
__attribute__((dllimport)) HANDLE GetProcessHeap(void);
__attribute__((dllimport)) WINBOOL GetOverlappedResult(HANDLE hFile, LPOVERLAPPED lpOverlapped, LPDWORD lpNumberOfBytesTransferred, WINBOOL bWait);
__attribute__((dllimport)) HANDLE CreateIoCompletionPort(HANDLE FileHandle, HANDLE ExistingCompletionPort, ULONG_PTR CompletionKey, DWORD NumberOfConcurrentThreads);
__attribute__((dllimport)) WINBOOL GetQueuedCompletionStatus(HANDLE CompletionPort, LPDWORD lpNumberOfBytesTransferred, PULONG_PTR lpCompletionKey, LPOVERLAPPED *lpOverlapped, DWORD dwMilliseconds);
__attribute__((dllimport)) WINBOOL PostQueuedCompletionStatus(HANDLE CompletionPort, DWORD dwNumberOfBytesTransferred, ULONG_PTR dwCompletionKey, LPOVERLAPPED lpOverlapped);
__attribute__((dllimport)) WINBOOL DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped);
__attribute__((dllimport)) WINBOOL CancelIo(HANDLE hFile);
__attribute__((dllimport)) WINBOOL GetOverlappedResultEx(HANDLE hFile, LPOVERLAPPED lpOverlapped, LPDWORD lpNumberOfBytesTransferred, DWORD dwMilliseconds, WINBOOL bAlertable);
__attribute__((dllimport)) WINBOOL GetQueuedCompletionStatusEx(HANDLE CompletionPort, LPOVERLAPPED_ENTRY lpCompletionPortEntries, ULONG ulCount, PULONG ulNumEntriesRemoved, DWORD dwMilliseconds, WINBOOL fAlertable);
__attribute__((dllimport)) WINBOOL CancelIoEx(HANDLE hFile, LPOVERLAPPED lpOverlapped);
__attribute__((dllimport)) WINBOOL CancelSynchronousIo(HANDLE hThread);
__attribute__((dllimport)) void InitializeSListHead(PSLIST_HEADER ListHead);
__attribute__((dllimport)) PSLIST_ENTRY InterlockedPopEntrySList(PSLIST_HEADER ListHead);
__attribute__((dllimport)) PSLIST_ENTRY InterlockedPushEntrySList(PSLIST_HEADER ListHead, PSLIST_ENTRY ListEntry);
__attribute__((dllimport)) PSLIST_ENTRY InterlockedFlushSList(PSLIST_HEADER ListHead);
__attribute__((dllimport)) USHORT QueryDepthSList(PSLIST_HEADER ListHead);
__attribute__((dllimport)) WINBOOL IsProcessInJob(HANDLE ProcessHandle, HANDLE JobHandle, PBOOL Result);
typedef struct tagENUMUILANG
{
ULONG NumOfEnumUILang;
ULONG SizeOfEnumUIBuffer;
LANGID *pEnumUIBuffer;
} ENUMUILANG, *PENUMUILANG;
typedef WINBOOL (*ENUMRESLANGPROCA)(HMODULE hModule, LPCSTR lpType, LPCSTR lpName, WORD wLanguage, LONG_PTR lParam);
typedef WINBOOL (*ENUMRESLANGPROCW)(HMODULE hModule, LPCWSTR lpType, LPCWSTR lpName, WORD wLanguage, LONG_PTR lParam);
typedef WINBOOL (*ENUMRESNAMEPROCA)(HMODULE hModule, LPCSTR lpType, LPSTR lpName, LONG_PTR lParam);
typedef WINBOOL (*ENUMRESNAMEPROCW)(HMODULE hModule, LPCWSTR lpType, LPWSTR lpName, LONG_PTR lParam);
typedef WINBOOL (*ENUMRESTYPEPROCA)(HMODULE hModule, LPSTR lpType, LONG_PTR lParam);
typedef WINBOOL (*ENUMRESTYPEPROCW)(HMODULE hModule, LPWSTR lpType, LONG_PTR lParam);
typedef WINBOOL (*PGET_MODULE_HANDLE_EXA)(DWORD dwFlags, LPCSTR lpModuleName, HMODULE *phModule);
typedef WINBOOL (*PGET_MODULE_HANDLE_EXW)(DWORD dwFlags, LPCWSTR lpModuleName, HMODULE *phModule);
typedef PVOID DLL_DIRECTORY_COOKIE, *PDLL_DIRECTORY_COOKIE;
__attribute__((dllimport)) WINBOOL EnumResourceNamesW(HMODULE hModule, LPCWSTR lpType, ENUMRESNAMEPROCW lpEnumFunc, LONG_PTR lParam);
__attribute__((dllimport)) HRSRC FindResourceW(HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType);
__attribute__((dllimport)) HRSRC FindResourceExW(HMODULE hModule, LPCWSTR lpType, LPCWSTR lpName, WORD wLanguage);
__attribute__((dllimport)) __attribute__((noreturn)) void FreeLibraryAndExitThread(HMODULE hLibModule, DWORD dwExitCode);
__attribute__((dllimport)) WINBOOL FreeResource(HGLOBAL hResData);
__attribute__((dllimport)) HMODULE GetModuleHandleA(LPCSTR lpModuleName);
__attribute__((dllimport)) HMODULE GetModuleHandleW(LPCWSTR lpModuleName);
__attribute__((dllimport)) HMODULE LoadLibraryA(LPCSTR lpLibFileName);
__attribute__((dllimport)) HMODULE LoadLibraryW(LPCWSTR lpLibFileName);
__attribute__((dllimport)) HMODULE LoadLibraryExA(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags);
__attribute__((dllimport)) HMODULE LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags);
__attribute__((dllimport)) HGLOBAL LoadResource(HMODULE hModule, HRSRC hResInfo);
__attribute__((dllimport)) int LoadStringA(HINSTANCE hInstance, UINT uID, LPSTR lpBuffer, int cchBufferMax);
__attribute__((dllimport)) int LoadStringW(HINSTANCE hInstance, UINT uID, LPWSTR lpBuffer, int cchBufferMax);
__attribute__((dllimport)) LPVOID LockResource(HGLOBAL hResData);
__attribute__((dllimport)) DWORD SizeofResource(HMODULE hModule, HRSRC hResInfo);
__attribute__((dllimport)) DLL_DIRECTORY_COOKIE AddDllDirectory(PCWSTR NewDirectory);
__attribute__((dllimport)) WINBOOL RemoveDllDirectory(DLL_DIRECTORY_COOKIE Cookie);
__attribute__((dllimport)) WINBOOL SetDefaultDllDirectories(DWORD DirectoryFlags);
__attribute__((dllimport)) WINBOOL GetModuleHandleExA(DWORD dwFlags, LPCSTR lpModuleName, HMODULE *phModule);
__attribute__((dllimport)) WINBOOL GetModuleHandleExW(DWORD dwFlags, LPCWSTR lpModuleName, HMODULE *phModule);
__attribute__((dllimport)) WINBOOL EnumResourceLanguagesA(HMODULE hModule, LPCSTR lpType, LPCSTR lpName, ENUMRESLANGPROCA lpEnumFunc, LONG_PTR lParam);
__attribute__((dllimport)) WINBOOL EnumResourceLanguagesW(HMODULE hModule, LPCWSTR lpType, LPCWSTR lpName, ENUMRESLANGPROCW lpEnumFunc, LONG_PTR lParam);
__attribute__((dllimport)) WINBOOL EnumResourceLanguagesExA(HMODULE hModule, LPCSTR lpType, LPCSTR lpName, ENUMRESLANGPROCA lpEnumFunc, LONG_PTR lParam, DWORD dwFlags, LANGID LangId);
__attribute__((dllimport)) WINBOOL EnumResourceLanguagesExW(HMODULE hModule, LPCWSTR lpType, LPCWSTR lpName, ENUMRESLANGPROCW lpEnumFunc, LONG_PTR lParam, DWORD dwFlags, LANGID LangId);
__attribute__((dllimport)) WINBOOL EnumResourceNamesExA(HMODULE hModule, LPCSTR lpType, ENUMRESNAMEPROCA lpEnumFunc, LONG_PTR lParam, DWORD dwFlags, LANGID LangId);
__attribute__((dllimport)) WINBOOL EnumResourceNamesExW(HMODULE hModule, LPCWSTR lpType, ENUMRESNAMEPROCW lpEnumFunc, LONG_PTR lParam, DWORD dwFlags, LANGID LangId);
__attribute__((dllimport)) WINBOOL EnumResourceTypesExA(HMODULE hModule, ENUMRESTYPEPROCA lpEnumFunc, LONG_PTR lParam, DWORD dwFlags, LANGID LangId);
__attribute__((dllimport)) WINBOOL EnumResourceTypesExW(HMODULE hModule, ENUMRESTYPEPROCW lpEnumFunc, LONG_PTR lParam, DWORD dwFlags, LANGID LangId);
__attribute__((dllimport)) WINBOOL QueryOptionalDelayLoadedAPI(HMODULE CallerModule, LPCSTR lpDllName, LPCSTR lpProcName, DWORD Reserved);
__attribute__((dllimport)) WINBOOL DisableThreadLibraryCalls(HMODULE hLibModule);
__attribute__((dllimport)) WINBOOL FreeLibrary(HMODULE hLibModule);
__attribute__((dllimport)) FARPROC GetProcAddress(HMODULE hModule, LPCSTR lpProcName);
__attribute__((dllimport)) DWORD GetModuleFileNameA(HMODULE hModule, LPSTR lpFilename, DWORD nSize);
__attribute__((dllimport)) DWORD GetModuleFileNameW(HMODULE hModule, LPWSTR lpFilename, DWORD nSize);
typedef struct _REDIRECTION_FUNCTION_DESCRIPTOR
{
PCSTR DllName;
PCSTR FunctionName;
PVOID RedirectionTarget;
} REDIRECTION_FUNCTION_DESCRIPTOR, *PREDIRECTION_FUNCTION_DESCRIPTOR;
typedef const REDIRECTION_FUNCTION_DESCRIPTOR *PCREDIRECTION_FUNCTION_DESCRIPTOR;
typedef struct _REDIRECTION_DESCRIPTOR
{
ULONG Version;
ULONG FunctionCount;
PCREDIRECTION_FUNCTION_DESCRIPTOR Redirections;
} REDIRECTION_DESCRIPTOR, *PREDIRECTION_DESCRIPTOR;
typedef const REDIRECTION_DESCRIPTOR *PCREDIRECTION_DESCRIPTOR;
__attribute__((dllimport)) int FindStringOrdinal(DWORD dwFindStringOrdinalFlags, LPCWSTR lpStringSource, int cchSource, LPCWSTR lpStringValue, int cchValue, WINBOOL bIgnoreCase);
typedef enum _MEMORY_RESOURCE_NOTIFICATION_TYPE
{
LowMemoryResourceNotification,
HighMemoryResourceNotification
} MEMORY_RESOURCE_NOTIFICATION_TYPE;
__attribute__((dllimport)) WINBOOL VirtualFree(LPVOID lpAddress, SIZE_T dwSize, DWORD dwFreeType);
__attribute__((dllimport)) SIZE_T VirtualQuery(LPCVOID lpAddress, PMEMORY_BASIC_INFORMATION lpBuffer, SIZE_T dwLength);
__attribute__((dllimport)) WINBOOL FlushViewOfFile(LPCVOID lpBaseAddress, SIZE_T dwNumberOfBytesToFlush);
__attribute__((dllimport)) WINBOOL UnmapViewOfFile(LPCVOID lpBaseAddress);
__attribute__((dllimport)) HANDLE CreateFileMappingFromApp(HANDLE hFile, PSECURITY_ATTRIBUTES SecurityAttributes, ULONG PageProtection, ULONG64 MaximumSize, PCWSTR Name);
__attribute__((dllimport)) PVOID MapViewOfFileFromApp(HANDLE hFileMappingObject, ULONG DesiredAccess, ULONG64 FileOffset, SIZE_T NumberOfBytesToMap);
__attribute__((dllimport)) WINBOOL VirtualProtect(LPVOID lpAddress, SIZE_T dwSize, DWORD flNewProtect, PDWORD lpflOldProtect);
__attribute__((dllimport)) LPVOID VirtualAlloc(LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect);
__attribute__((dllimport)) LPVOID VirtualAllocEx(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect);
__attribute__((dllimport)) WINBOOL VirtualFreeEx(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, DWORD dwFreeType);
__attribute__((dllimport)) WINBOOL VirtualProtectEx(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, DWORD flNewProtect, PDWORD lpflOldProtect);
__attribute__((dllimport)) SIZE_T VirtualQueryEx(HANDLE hProcess, LPCVOID lpAddress, PMEMORY_BASIC_INFORMATION lpBuffer, SIZE_T dwLength);
__attribute__((dllimport)) WINBOOL ReadProcessMemory(HANDLE hProcess, LPCVOID lpBaseAddress, LPVOID lpBuffer, SIZE_T nSize, SIZE_T *lpNumberOfBytesRead);
__attribute__((dllimport)) WINBOOL WriteProcessMemory(HANDLE hProcess, LPVOID lpBaseAddress, LPCVOID lpBuffer, SIZE_T nSize, SIZE_T *lpNumberOfBytesWritten);
__attribute__((dllimport)) HANDLE CreateFileMappingW(HANDLE hFile, LPSECURITY_ATTRIBUTES lpFileMappingAttributes, DWORD flProtect, DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCWSTR lpName);
__attribute__((dllimport)) HANDLE OpenFileMappingW(DWORD dwDesiredAccess, WINBOOL bInheritHandle, LPCWSTR lpName);
__attribute__((dllimport)) LPVOID MapViewOfFile(HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOffsetHigh, DWORD dwFileOffsetLow, SIZE_T dwNumberOfBytesToMap);
__attribute__((dllimport)) LPVOID MapViewOfFileEx(HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOffsetHigh, DWORD dwFileOffsetLow, SIZE_T dwNumberOfBytesToMap, LPVOID lpBaseAddress);
__attribute__((dllimport)) SIZE_T GetLargePageMinimum(void);
__attribute__((dllimport)) WINBOOL GetProcessWorkingSetSizeEx(HANDLE hProcess, PSIZE_T lpMinimumWorkingSetSize, PSIZE_T lpMaximumWorkingSetSize, PDWORD Flags);
__attribute__((dllimport)) WINBOOL SetProcessWorkingSetSizeEx(HANDLE hProcess, SIZE_T dwMinimumWorkingSetSize, SIZE_T dwMaximumWorkingSetSize, DWORD Flags);
__attribute__((dllimport)) WINBOOL VirtualLock(LPVOID lpAddress, SIZE_T dwSize);
__attribute__((dllimport)) WINBOOL VirtualUnlock(LPVOID lpAddress, SIZE_T dwSize);
__attribute__((dllimport)) UINT GetWriteWatch(DWORD dwFlags, PVOID lpBaseAddress, SIZE_T dwRegionSize, PVOID *lpAddresses, ULONG_PTR *lpdwCount, LPDWORD lpdwGranularity);
__attribute__((dllimport)) UINT ResetWriteWatch(LPVOID lpBaseAddress, SIZE_T dwRegionSize);
__attribute__((dllimport)) HANDLE CreateMemoryResourceNotification(MEMORY_RESOURCE_NOTIFICATION_TYPE NotificationType);
__attribute__((dllimport)) WINBOOL QueryMemoryResourceNotification(HANDLE ResourceNotificationHandle, PBOOL ResourceState);
__attribute__((dllimport)) WINBOOL GetSystemFileCacheSize(PSIZE_T lpMinimumFileCacheSize, PSIZE_T lpMaximumFileCacheSize, PDWORD lpFlags);
__attribute__((dllimport)) WINBOOL SetSystemFileCacheSize(SIZE_T MinimumFileCacheSize, SIZE_T MaximumFileCacheSize, DWORD Flags);
__attribute__((dllimport)) HANDLE CreateFileMappingNumaW(HANDLE hFile, LPSECURITY_ATTRIBUTES lpFileMappingAttributes, DWORD flProtect, DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCWSTR lpName, DWORD nndPreferred);
__attribute__((dllimport)) WINBOOL ImpersonateNamedPipeClient(HANDLE hNamedPipe);
__attribute__((dllimport)) WINBOOL CreatePipe(PHANDLE hReadPipe, PHANDLE hWritePipe, LPSECURITY_ATTRIBUTES lpPipeAttributes, DWORD nSize);
__attribute__((dllimport)) WINBOOL ConnectNamedPipe(HANDLE hNamedPipe, LPOVERLAPPED lpOverlapped);
__attribute__((dllimport)) WINBOOL DisconnectNamedPipe(HANDLE hNamedPipe);
__attribute__((dllimport)) WINBOOL SetNamedPipeHandleState(HANDLE hNamedPipe, LPDWORD lpMode, LPDWORD lpMaxCollectionCount, LPDWORD lpCollectDataTimeout);
__attribute__((dllimport)) WINBOOL PeekNamedPipe(HANDLE hNamedPipe, LPVOID lpBuffer, DWORD nBufferSize, LPDWORD lpBytesRead, LPDWORD lpTotalBytesAvail, LPDWORD lpBytesLeftThisMessage);
__attribute__((dllimport)) WINBOOL TransactNamedPipe(HANDLE hNamedPipe, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesRead, LPOVERLAPPED lpOverlapped);
__attribute__((dllimport)) HANDLE CreateNamedPipeW(LPCWSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
__attribute__((dllimport)) WINBOOL WaitNamedPipeW(LPCWSTR lpNamedPipeName, DWORD nTimeOut);
__attribute__((dllimport)) WINBOOL GetNamedPipeClientComputerNameW(HANDLE Pipe, LPWSTR ClientComputerName, ULONG ClientComputerNameLength);
__attribute__((dllimport)) HANDLE CreatePrivateNamespaceW(LPSECURITY_ATTRIBUTES lpPrivateNamespaceAttributes, LPVOID lpBoundaryDescriptor, LPCWSTR lpAliasPrefix);
__attribute__((dllimport)) HANDLE OpenPrivateNamespaceW(LPVOID lpBoundaryDescriptor, LPCWSTR lpAliasPrefix);
__attribute__((dllimport)) BOOLEAN ClosePrivateNamespace(HANDLE Handle, ULONG Flags);
__attribute__((dllimport)) HANDLE CreateBoundaryDescriptorW(LPCWSTR Name, ULONG Flags);
__attribute__((dllimport)) WINBOOL AddSIDToBoundaryDescriptor(HANDLE *BoundaryDescriptor, PSID RequiredSid);
__attribute__((dllimport)) void DeleteBoundaryDescriptor(HANDLE BoundaryDescriptor);
__attribute__((dllimport)) WINBOOL SetEnvironmentStringsW(LPWCH NewEnvironment);
__attribute__((dllimport)) LPSTR GetCommandLineA(void);
__attribute__((dllimport)) LPWSTR GetCommandLineW(void);
__attribute__((dllimport)) WINBOOL SetCurrentDirectoryA(LPCSTR lpPathName);
__attribute__((dllimport)) WINBOOL SetCurrentDirectoryW(LPCWSTR lpPathName);
__attribute__((dllimport)) DWORD GetCurrentDirectoryA(DWORD nBufferLength, LPSTR lpBuffer);
__attribute__((dllimport)) DWORD GetCurrentDirectoryW(DWORD nBufferLength, LPWSTR lpBuffer);
__attribute__((dllimport)) DWORD SearchPathW(LPCWSTR lpPath, LPCWSTR lpFileName, LPCWSTR lpExtension, DWORD nBufferLength, LPWSTR lpBuffer, LPWSTR *lpFilePart);
__attribute__((dllimport)) DWORD SearchPathA(LPCSTR lpPath, LPCSTR lpFileName, LPCSTR lpExtension, DWORD nBufferLength, LPSTR lpBuffer, LPSTR *lpFilePart);
__attribute__((dllimport)) WINBOOL NeedCurrentDirectoryForExePathA(LPCSTR ExeName);
__attribute__((dllimport)) WINBOOL NeedCurrentDirectoryForExePathW(LPCWSTR ExeName);
__attribute__((dllimport)) LPCH GetEnvironmentStrings(void);
__attribute__((dllimport)) LPWCH GetEnvironmentStringsW(void);
__attribute__((dllimport)) HANDLE GetStdHandle(DWORD nStdHandle);
__attribute__((dllimport)) DWORD ExpandEnvironmentStringsA(LPCSTR lpSrc, LPSTR lpDst, DWORD nSize);
__attribute__((dllimport)) DWORD ExpandEnvironmentStringsW(LPCWSTR lpSrc, LPWSTR lpDst, DWORD nSize);
__attribute__((dllimport)) WINBOOL FreeEnvironmentStringsA(LPCH penv);
__attribute__((dllimport)) WINBOOL FreeEnvironmentStringsW(LPWCH penv);
__attribute__((dllimport)) DWORD GetEnvironmentVariableA(LPCSTR lpName, LPSTR lpBuffer, DWORD nSize);
__attribute__((dllimport)) DWORD GetEnvironmentVariableW(LPCWSTR lpName, LPWSTR lpBuffer, DWORD nSize);
__attribute__((dllimport)) WINBOOL SetEnvironmentVariableA(LPCSTR lpName, LPCSTR lpValue);
__attribute__((dllimport)) WINBOOL SetEnvironmentVariableW(LPCWSTR lpName, LPCWSTR lpValue);
__attribute__((dllimport)) WINBOOL SetStdHandle(DWORD nStdHandle, HANDLE hHandle);
__attribute__((dllimport)) WINBOOL SetStdHandleEx(DWORD nStdHandle, HANDLE hHandle, PHANDLE phPrevValue);
__attribute__((dllimport)) WINBOOL TerminateProcess(HANDLE hProcess, UINT uExitCode);
__attribute__((dllimport)) HANDLE OpenProcess(DWORD dwDesiredAccess, WINBOOL bInheritHandle, DWORD dwProcessId);
__attribute__((dllimport)) DWORD QueueUserAPC(PAPCFUNC pfnAPC, HANDLE hThread, ULONG_PTR dwData);
__attribute__((dllimport)) WINBOOL GetProcessTimes(HANDLE hProcess, LPFILETIME lpCreationTime, LPFILETIME lpExitTime, LPFILETIME lpKernelTime, LPFILETIME lpUserTime);
__attribute__((dllimport)) __attribute__((noreturn)) void ExitProcess(UINT uExitCode);
__attribute__((dllimport)) WINBOOL GetExitCodeProcess(HANDLE hProcess, LPDWORD lpExitCode);
__attribute__((dllimport)) WINBOOL SwitchToThread(void);
__attribute__((dllimport)) HANDLE OpenThread(DWORD dwDesiredAccess, WINBOOL bInheritHandle, DWORD dwThreadId);
__attribute__((dllimport)) WINBOOL SetThreadPriorityBoost(HANDLE hThread, WINBOOL bDisablePriorityBoost);
__attribute__((dllimport)) WINBOOL GetThreadPriorityBoost(HANDLE hThread, PBOOL pDisablePriorityBoost);
__attribute__((dllimport)) WINBOOL SetThreadToken(PHANDLE Thread, HANDLE Token);
__attribute__((dllimport)) WINBOOL OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle);
__attribute__((dllimport)) WINBOOL OpenThreadToken(HANDLE ThreadHandle, DWORD DesiredAccess, WINBOOL OpenAsSelf, PHANDLE TokenHandle);
__attribute__((dllimport)) WINBOOL SetPriorityClass(HANDLE hProcess, DWORD dwPriorityClass);
__attribute__((dllimport)) DWORD GetPriorityClass(HANDLE hProcess);
__attribute__((dllimport)) DWORD GetProcessId(HANDLE Process);
__attribute__((dllimport)) DWORD GetThreadId(HANDLE Thread);
__attribute__((dllimport)) WINBOOL GetThreadContext(HANDLE hThread, LPCONTEXT lpContext);
__attribute__((dllimport)) WINBOOL FlushInstructionCache(HANDLE hProcess, LPCVOID lpBaseAddress, SIZE_T dwSize);
__attribute__((dllimport)) WINBOOL GetThreadTimes(HANDLE hThread, LPFILETIME lpCreationTime, LPFILETIME lpExitTime, LPFILETIME lpKernelTime, LPFILETIME lpUserTime);
__attribute__((dllimport)) DWORD GetCurrentProcessorNumber(void);
typedef struct _PROCESS_INFORMATION
{
HANDLE hProcess;
HANDLE hThread;
DWORD dwProcessId;
DWORD dwThreadId;
} PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
typedef struct _PROC_THREAD_ATTRIBUTE_LIST *PPROC_THREAD_ATTRIBUTE_LIST, *LPPROC_THREAD_ATTRIBUTE_LIST;
typedef struct _STARTUPINFOA
{
DWORD cb;
LPSTR lpReserved;
LPSTR lpDesktop;
LPSTR lpTitle;
DWORD dwX;
DWORD dwY;
DWORD dwXSize;
DWORD dwYSize;
DWORD dwXCountChars;
DWORD dwYCountChars;
DWORD dwFillAttribute;
DWORD dwFlags;
WORD wShowWindow;
WORD cbReserved2;
LPBYTE lpReserved2;
HANDLE hStdInput;
HANDLE hStdOutput;
HANDLE hStdError;
} STARTUPINFOA, *LPSTARTUPINFOA;
typedef struct _STARTUPINFOW
{
DWORD cb;
LPWSTR lpReserved;
LPWSTR lpDesktop;
LPWSTR lpTitle;
DWORD dwX;
DWORD dwY;
DWORD dwXSize;
DWORD dwYSize;
DWORD dwXCountChars;
DWORD dwYCountChars;
DWORD dwFillAttribute;
DWORD dwFlags;
WORD wShowWindow;
WORD cbReserved2;
LPBYTE lpReserved2;
HANDLE hStdInput;
HANDLE hStdOutput;
HANDLE hStdError;
} STARTUPINFOW, *LPSTARTUPINFOW;
typedef STARTUPINFOW STARTUPINFO;
typedef LPSTARTUPINFOW LPSTARTUPINFO;
__attribute__((dllimport)) HANDLE CreateRemoteThread(HANDLE hProcess, LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId);
__attribute__((dllimport)) WINBOOL TerminateThread(HANDLE hThread, DWORD dwExitCode);
__attribute__((dllimport)) WINBOOL SetProcessShutdownParameters(DWORD dwLevel, DWORD dwFlags);
__attribute__((dllimport)) DWORD GetProcessVersion(DWORD ProcessId);
__attribute__((dllimport)) void GetStartupInfoW(LPSTARTUPINFOW lpStartupInfo);
__attribute__((dllimport)) WINBOOL SetThreadStackGuarantee(PULONG StackSizeInBytes);
__attribute__((dllimport)) WINBOOL ProcessIdToSessionId(DWORD dwProcessId, DWORD *pSessionId);
__attribute__((dllimport)) HANDLE CreateRemoteThreadEx(HANDLE hProcess, LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList, LPDWORD lpThreadId);
__attribute__((dllimport)) WINBOOL SetThreadContext(HANDLE hThread, const CONTEXT *lpContext);
__attribute__((dllimport)) WINBOOL GetProcessHandleCount(HANDLE hProcess, PDWORD pdwHandleCount);
__attribute__((dllimport)) WINBOOL CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, WINBOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation);
__attribute__((dllimport)) WINBOOL CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, WINBOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation);
__attribute__((dllimport)) WINBOOL CreateProcessAsUserW(HANDLE hToken, LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, WINBOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation);
__attribute__((dllimport)) DWORD GetProcessIdOfThread(HANDLE Thread);
__attribute__((dllimport)) WINBOOL InitializeProcThreadAttributeList(LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList, DWORD dwAttributeCount, DWORD dwFlags, PSIZE_T lpSize);
__attribute__((dllimport)) void DeleteProcThreadAttributeList(LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList);
__attribute__((dllimport)) WINBOOL SetProcessAffinityUpdateMode(HANDLE hProcess, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL QueryProcessAffinityUpdateMode(HANDLE hProcess, LPDWORD lpdwFlags);
__attribute__((dllimport)) WINBOOL UpdateProcThreadAttribute(LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList, DWORD dwFlags, DWORD_PTR Attribute, PVOID lpValue, SIZE_T cbSize, PVOID lpPreviousValue, PSIZE_T lpReturnSize);
__attribute__((dllimport)) WINBOOL GetThreadIdealProcessorEx(HANDLE hThread, PPROCESSOR_NUMBER lpIdealProcessor);
__attribute__((dllimport)) void GetCurrentProcessorNumberEx(PPROCESSOR_NUMBER ProcNumber);
__attribute__((dllimport)) HANDLE GetCurrentProcess(void);
__attribute__((dllimport)) DWORD GetCurrentProcessId(void);
__attribute__((dllimport)) HANDLE GetCurrentThread(void);
__attribute__((dllimport)) DWORD GetCurrentThreadId(void);
WINBOOL IsProcessorFeaturePresent(DWORD ProcessorFeature);
__attribute__((dllimport)) void FlushProcessWriteBuffers(void);
__attribute__((dllimport)) HANDLE CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId);
__attribute__((dllimport)) WINBOOL SetThreadPriority(HANDLE hThread, int nPriority);
__attribute__((dllimport)) int GetThreadPriority(HANDLE hThread);
__attribute__((dllimport)) __attribute__((noreturn)) void ExitThread(DWORD dwExitCode);
__attribute__((dllimport)) WINBOOL GetExitCodeThread(HANDLE hThread, LPDWORD lpExitCode);
__attribute__((dllimport)) DWORD SuspendThread(HANDLE hThread);
__attribute__((dllimport)) DWORD ResumeThread(HANDLE hThread);
__attribute__((dllimport)) DWORD TlsAlloc(void);
__attribute__((dllimport)) LPVOID TlsGetValue(DWORD dwTlsIndex);
__attribute__((dllimport)) WINBOOL TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue);
__attribute__((dllimport)) WINBOOL TlsFree(DWORD dwTlsIndex);
__attribute__((dllimport)) WINBOOL SetThreadIdealProcessorEx(HANDLE hThread, PPROCESSOR_NUMBER lpIdealProcessor, PPROCESSOR_NUMBER lpPreviousIdealProcessor);
__attribute__((dllimport)) WINBOOL GetProcessGroupAffinity(HANDLE hProcess, PUSHORT GroupCount, PUSHORT GroupArray);
__attribute__((dllimport)) WINBOOL SetProcessGroupAffinity(HANDLE hProcess, const GROUP_AFFINITY *GroupAffinity, PGROUP_AFFINITY PreviousGroupAffinity);
__attribute__((dllimport)) WINBOOL GetThreadGroupAffinity(HANDLE hThread, PGROUP_AFFINITY GroupAffinity);
__attribute__((dllimport)) WINBOOL SetThreadGroupAffinity(HANDLE hThread, const GROUP_AFFINITY *GroupAffinity, PGROUP_AFFINITY PreviousGroupAffinity);
__attribute__((dllimport)) WINBOOL QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount);
__attribute__((dllimport)) WINBOOL QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency);
__attribute__((dllimport)) WINBOOL QueryThreadCycleTime(HANDLE ThreadHandle, PULONG64 CycleTime);
__attribute__((dllimport)) WINBOOL QueryProcessCycleTime(HANDLE ProcessHandle, PULONG64 CycleTime);
__attribute__((dllimport)) WINBOOL QueryIdleProcessorCycleTime(PULONG BufferLength, PULONG64 ProcessorIdleCycleTime);
__attribute__((dllimport)) WINBOOL QueryIdleProcessorCycleTimeEx(USHORT Group, PULONG BufferLength, PULONG64 ProcessorIdleCycleTime);
__attribute__((dllimport)) WINBOOL QueryUnbiasedInterruptTime(PULONGLONG UnbiasedTime);
__attribute__((dllimport)) WINBOOL AccessCheck(PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE ClientToken, DWORD DesiredAccess, PGENERIC_MAPPING GenericMapping, PPRIVILEGE_SET PrivilegeSet, LPDWORD PrivilegeSetLength, LPDWORD GrantedAccess, LPBOOL AccessStatus);
__attribute__((dllimport)) WINBOOL AccessCheckAndAuditAlarmW(LPCWSTR SubsystemName, LPVOID HandleId, LPWSTR ObjectTypeName, LPWSTR ObjectName, PSECURITY_DESCRIPTOR SecurityDescriptor, DWORD DesiredAccess, PGENERIC_MAPPING GenericMapping, WINBOOL ObjectCreation, LPDWORD GrantedAccess, LPBOOL AccessStatus, LPBOOL pfGenerateOnClose);
__attribute__((dllimport)) WINBOOL AccessCheckByType(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID PrincipalSelfSid, HANDLE ClientToken, DWORD DesiredAccess, POBJECT_TYPE_LIST ObjectTypeList, DWORD ObjectTypeListLength, PGENERIC_MAPPING GenericMapping, PPRIVILEGE_SET PrivilegeSet, LPDWORD PrivilegeSetLength, LPDWORD GrantedAccess, LPBOOL AccessStatus);
__attribute__((dllimport)) WINBOOL AccessCheckByTypeResultList(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID PrincipalSelfSid, HANDLE ClientToken, DWORD DesiredAccess, POBJECT_TYPE_LIST ObjectTypeList, DWORD ObjectTypeListLength, PGENERIC_MAPPING GenericMapping, PPRIVILEGE_SET PrivilegeSet, LPDWORD PrivilegeSetLength, LPDWORD GrantedAccessList, LPDWORD AccessStatusList);
__attribute__((dllimport)) WINBOOL AccessCheckByTypeAndAuditAlarmW(LPCWSTR SubsystemName, LPVOID HandleId, LPCWSTR ObjectTypeName, LPCWSTR ObjectName, PSECURITY_DESCRIPTOR SecurityDescriptor, PSID PrincipalSelfSid, DWORD DesiredAccess, AUDIT_EVENT_TYPE AuditType, DWORD Flags, POBJECT_TYPE_LIST ObjectTypeList, DWORD ObjectTypeListLength, PGENERIC_MAPPING GenericMapping, WINBOOL ObjectCreation, LPDWORD GrantedAccess, LPBOOL AccessStatus, LPBOOL pfGenerateOnClose);
__attribute__((dllimport)) WINBOOL AccessCheckByTypeResultListAndAuditAlarmW(LPCWSTR SubsystemName, LPVOID HandleId, LPCWSTR ObjectTypeName, LPCWSTR ObjectName, PSECURITY_DESCRIPTOR SecurityDescriptor, PSID PrincipalSelfSid, DWORD DesiredAccess, AUDIT_EVENT_TYPE AuditType, DWORD Flags, POBJECT_TYPE_LIST ObjectTypeList, DWORD ObjectTypeListLength, PGENERIC_MAPPING GenericMapping, WINBOOL ObjectCreation, LPDWORD GrantedAccessList, LPDWORD AccessStatusList, LPBOOL pfGenerateOnClose);
__attribute__((dllimport)) WINBOOL AccessCheckByTypeResultListAndAuditAlarmByHandleW(LPCWSTR SubsystemName, LPVOID HandleId, HANDLE ClientToken, LPCWSTR ObjectTypeName, LPCWSTR ObjectName, PSECURITY_DESCRIPTOR SecurityDescriptor, PSID PrincipalSelfSid, DWORD DesiredAccess, AUDIT_EVENT_TYPE AuditType, DWORD Flags, POBJECT_TYPE_LIST ObjectTypeList, DWORD ObjectTypeListLength, PGENERIC_MAPPING GenericMapping, WINBOOL ObjectCreation, LPDWORD GrantedAccessList, LPDWORD AccessStatusList, LPBOOL pfGenerateOnClose);
__attribute__((dllimport)) WINBOOL AddAccessAllowedAce(PACL pAcl, DWORD dwAceRevision, DWORD AccessMask, PSID pSid);
__attribute__((dllimport)) WINBOOL AddAccessAllowedAceEx(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD AccessMask, PSID pSid);
__attribute__((dllimport)) WINBOOL AddAccessAllowedObjectAce(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD AccessMask, GUID *ObjectTypeGuid, GUID *InheritedObjectTypeGuid, PSID pSid);
__attribute__((dllimport)) WINBOOL AddAccessDeniedAce(PACL pAcl, DWORD dwAceRevision, DWORD AccessMask, PSID pSid);
__attribute__((dllimport)) WINBOOL AddAccessDeniedAceEx(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD AccessMask, PSID pSid);
__attribute__((dllimport)) WINBOOL AddAccessDeniedObjectAce(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD AccessMask, GUID *ObjectTypeGuid, GUID *InheritedObjectTypeGuid, PSID pSid);
__attribute__((dllimport)) WINBOOL AddAce(PACL pAcl, DWORD dwAceRevision, DWORD dwStartingAceIndex, LPVOID pAceList, DWORD nAceListLength);
__attribute__((dllimport)) WINBOOL AddAuditAccessAce(PACL pAcl, DWORD dwAceRevision, DWORD dwAccessMask, PSID pSid, WINBOOL bAuditSuccess, WINBOOL bAuditFailure);
__attribute__((dllimport)) WINBOOL AddAuditAccessAceEx(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD dwAccessMask, PSID pSid, WINBOOL bAuditSuccess, WINBOOL bAuditFailure);
__attribute__((dllimport)) WINBOOL AddAuditAccessObjectAce(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD AccessMask, GUID *ObjectTypeGuid, GUID *InheritedObjectTypeGuid, PSID pSid, WINBOOL bAuditSuccess, WINBOOL bAuditFailure);
__attribute__((dllimport)) WINBOOL AddMandatoryAce(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD MandatoryPolicy, PSID pLabelSid);
__attribute__((dllimport)) WINBOOL AdjustTokenGroups(HANDLE TokenHandle, WINBOOL ResetToDefault, PTOKEN_GROUPS NewState, DWORD BufferLength, PTOKEN_GROUPS PreviousState, PDWORD ReturnLength);
__attribute__((dllimport)) WINBOOL AdjustTokenPrivileges(HANDLE TokenHandle, WINBOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength);
__attribute__((dllimport)) WINBOOL AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid);
__attribute__((dllimport)) WINBOOL AllocateLocallyUniqueId(PLUID Luid);
__attribute__((dllimport)) WINBOOL AreAllAccessesGranted(DWORD GrantedAccess, DWORD DesiredAccess);
__attribute__((dllimport)) WINBOOL AreAnyAccessesGranted(DWORD GrantedAccess, DWORD DesiredAccess);
__attribute__((dllimport)) WINBOOL CheckTokenMembership(HANDLE TokenHandle, PSID SidToCheck, PBOOL IsMember);
__attribute__((dllimport)) WINBOOL ConvertToAutoInheritPrivateObjectSecurity(PSECURITY_DESCRIPTOR ParentDescriptor, PSECURITY_DESCRIPTOR CurrentSecurityDescriptor, PSECURITY_DESCRIPTOR *NewSecurityDescriptor, GUID *ObjectType, BOOLEAN IsDirectoryObject, PGENERIC_MAPPING GenericMapping);
__attribute__((dllimport)) WINBOOL CopySid(DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid);
__attribute__((dllimport)) WINBOOL CreatePrivateObjectSecurity(PSECURITY_DESCRIPTOR ParentDescriptor, PSECURITY_DESCRIPTOR CreatorDescriptor, PSECURITY_DESCRIPTOR *NewDescriptor, WINBOOL IsDirectoryObject, HANDLE Token, PGENERIC_MAPPING GenericMapping);
__attribute__((dllimport)) WINBOOL CreatePrivateObjectSecurityEx(PSECURITY_DESCRIPTOR ParentDescriptor, PSECURITY_DESCRIPTOR CreatorDescriptor, PSECURITY_DESCRIPTOR *NewDescriptor, GUID *ObjectType, WINBOOL IsContainerObject, ULONG AutoInheritFlags, HANDLE Token, PGENERIC_MAPPING GenericMapping);
__attribute__((dllimport)) WINBOOL CreatePrivateObjectSecurityWithMultipleInheritance(PSECURITY_DESCRIPTOR ParentDescriptor, PSECURITY_DESCRIPTOR CreatorDescriptor, PSECURITY_DESCRIPTOR *NewDescriptor, GUID **ObjectTypes, ULONG GuidCount, WINBOOL IsContainerObject, ULONG AutoInheritFlags, HANDLE Token, PGENERIC_MAPPING GenericMapping);
__attribute__((dllimport)) WINBOOL CreateRestrictedToken(HANDLE ExistingTokenHandle, DWORD Flags, DWORD DisableSidCount, PSID_AND_ATTRIBUTES SidsToDisable, DWORD DeletePrivilegeCount, PLUID_AND_ATTRIBUTES PrivilegesToDelete, DWORD RestrictedSidCount, PSID_AND_ATTRIBUTES SidsToRestrict, PHANDLE NewTokenHandle);
__attribute__((dllimport)) WINBOOL CreateWellKnownSid(WELL_KNOWN_SID_TYPE WellKnownSidType, PSID DomainSid, PSID pSid, DWORD *cbSid);
__attribute__((dllimport)) WINBOOL EqualDomainSid(PSID pSid1, PSID pSid2, WINBOOL *pfEqual);
__attribute__((dllimport)) WINBOOL DeleteAce(PACL pAcl, DWORD dwAceIndex);
__attribute__((dllimport)) WINBOOL DestroyPrivateObjectSecurity(PSECURITY_DESCRIPTOR *ObjectDescriptor);
__attribute__((dllimport)) WINBOOL DuplicateToken(HANDLE ExistingTokenHandle, SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, PHANDLE DuplicateTokenHandle);
__attribute__((dllimport)) WINBOOL DuplicateTokenEx(HANDLE hExistingToken, DWORD dwDesiredAccess, LPSECURITY_ATTRIBUTES lpTokenAttributes, SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, TOKEN_TYPE TokenType, PHANDLE phNewToken);
__attribute__((dllimport)) WINBOOL EqualPrefixSid(PSID pSid1, PSID pSid2);
__attribute__((dllimport)) WINBOOL EqualSid(PSID pSid1, PSID pSid2);
__attribute__((dllimport)) WINBOOL FindFirstFreeAce(PACL pAcl, LPVOID *pAce);
__attribute__((dllimport)) PVOID FreeSid(PSID pSid);
__attribute__((dllimport)) WINBOOL GetAce(PACL pAcl, DWORD dwAceIndex, LPVOID *pAce);
__attribute__((dllimport)) WINBOOL GetAclInformation(PACL pAcl, LPVOID pAclInformation, DWORD nAclInformationLength, ACL_INFORMATION_CLASS dwAclInformationClass);
__attribute__((dllimport)) WINBOOL GetFileSecurityW(LPCWSTR lpFileName, SECURITY_INFORMATION RequestedInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD nLength, LPDWORD lpnLengthNeeded);
__attribute__((dllimport)) WINBOOL GetKernelObjectSecurity(HANDLE Handle, SECURITY_INFORMATION RequestedInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD nLength, LPDWORD lpnLengthNeeded);
__attribute__((dllimport)) DWORD GetLengthSid(PSID pSid);
__attribute__((dllimport)) WINBOOL GetPrivateObjectSecurity(PSECURITY_DESCRIPTOR ObjectDescriptor, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR ResultantDescriptor, DWORD DescriptorLength, PDWORD ReturnLength);
__attribute__((dllimport)) WINBOOL GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSECURITY_DESCRIPTOR_CONTROL pControl, LPDWORD lpdwRevision);
__attribute__((dllimport)) WINBOOL GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, LPBOOL lpbDaclPresent, PACL *pDacl, LPBOOL lpbDaclDefaulted);
__attribute__((dllimport)) WINBOOL GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID *pGroup, LPBOOL lpbGroupDefaulted);
__attribute__((dllimport)) DWORD GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR pSecurityDescriptor);
__attribute__((dllimport)) WINBOOL GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID *pOwner, LPBOOL lpbOwnerDefaulted);
__attribute__((dllimport)) DWORD GetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor, PUCHAR RMControl);
__attribute__((dllimport)) WINBOOL GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, LPBOOL lpbSaclPresent, PACL *pSacl, LPBOOL lpbSaclDefaulted);
__attribute__((dllimport)) PSID_IDENTIFIER_AUTHORITY GetSidIdentifierAuthority(PSID pSid);
__attribute__((dllimport)) DWORD GetSidLengthRequired(UCHAR nSubAuthorityCount);
__attribute__((dllimport)) PDWORD GetSidSubAuthority(PSID pSid, DWORD nSubAuthority);
__attribute__((dllimport)) PUCHAR GetSidSubAuthorityCount(PSID pSid);
__attribute__((dllimport)) WINBOOL GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength);
__attribute__((dllimport)) WINBOOL GetWindowsAccountDomainSid(PSID pSid, PSID pDomainSid, DWORD *cbDomainSid);
__attribute__((dllimport)) WINBOOL ImpersonateAnonymousToken(HANDLE ThreadHandle);
__attribute__((dllimport)) WINBOOL ImpersonateLoggedOnUser(HANDLE hToken);
__attribute__((dllimport)) WINBOOL ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel);
__attribute__((dllimport)) WINBOOL InitializeAcl(PACL pAcl, DWORD nAclLength, DWORD dwAclRevision);
__attribute__((dllimport)) WINBOOL InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision);
__attribute__((dllimport)) WINBOOL InitializeSid(PSID Sid, PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount);
__attribute__((dllimport)) WINBOOL IsTokenRestricted(HANDLE TokenHandle);
__attribute__((dllimport)) WINBOOL IsValidAcl(PACL pAcl);
__attribute__((dllimport)) WINBOOL IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor);
__attribute__((dllimport)) WINBOOL IsValidSid(PSID pSid);
__attribute__((dllimport)) WINBOOL IsWellKnownSid(PSID pSid, WELL_KNOWN_SID_TYPE WellKnownSidType);
__attribute__((dllimport)) WINBOOL MakeAbsoluteSD(PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor, PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor, LPDWORD lpdwAbsoluteSecurityDescriptorSize, PACL pDacl, LPDWORD lpdwDaclSize, PACL pSacl, LPDWORD lpdwSaclSize, PSID pOwner, LPDWORD lpdwOwnerSize, PSID pPrimaryGroup, LPDWORD lpdwPrimaryGroupSize);
__attribute__((dllimport)) WINBOOL MakeSelfRelativeSD(PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor, PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor, LPDWORD lpdwBufferLength);
__attribute__((dllimport)) void MapGenericMask(PDWORD AccessMask, PGENERIC_MAPPING GenericMapping);
__attribute__((dllimport)) WINBOOL ObjectCloseAuditAlarmW(LPCWSTR SubsystemName, LPVOID HandleId, WINBOOL GenerateOnClose);
__attribute__((dllimport)) WINBOOL ObjectDeleteAuditAlarmW(LPCWSTR SubsystemName, LPVOID HandleId, WINBOOL GenerateOnClose);
__attribute__((dllimport)) WINBOOL ObjectOpenAuditAlarmW(LPCWSTR SubsystemName, LPVOID HandleId, LPWSTR ObjectTypeName, LPWSTR ObjectName, PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE ClientToken, DWORD DesiredAccess, DWORD GrantedAccess, PPRIVILEGE_SET Privileges, WINBOOL ObjectCreation, WINBOOL AccessGranted, LPBOOL GenerateOnClose);
__attribute__((dllimport)) WINBOOL ObjectPrivilegeAuditAlarmW(LPCWSTR SubsystemName, LPVOID HandleId, HANDLE ClientToken, DWORD DesiredAccess, PPRIVILEGE_SET Privileges, WINBOOL AccessGranted);
__attribute__((dllimport)) WINBOOL PrivilegeCheck(HANDLE ClientToken, PPRIVILEGE_SET RequiredPrivileges, LPBOOL pfResult);
__attribute__((dllimport)) WINBOOL PrivilegedServiceAuditAlarmW(LPCWSTR SubsystemName, LPCWSTR ServiceName, HANDLE ClientToken, PPRIVILEGE_SET Privileges, WINBOOL AccessGranted);
__attribute__((dllimport)) void QuerySecurityAccessMask(SECURITY_INFORMATION SecurityInformation, LPDWORD DesiredAccess);
__attribute__((dllimport)) WINBOOL RevertToSelf(void);
__attribute__((dllimport)) WINBOOL SetAclInformation(PACL pAcl, LPVOID pAclInformation, DWORD nAclInformationLength, ACL_INFORMATION_CLASS dwAclInformationClass);
__attribute__((dllimport)) WINBOOL SetFileSecurityW(LPCWSTR lpFileName, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor);
__attribute__((dllimport)) WINBOOL SetKernelObjectSecurity(HANDLE Handle, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR SecurityDescriptor);
__attribute__((dllimport)) WINBOOL SetPrivateObjectSecurity(SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR ModificationDescriptor, PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, PGENERIC_MAPPING GenericMapping, HANDLE Token);
__attribute__((dllimport)) WINBOOL SetPrivateObjectSecurityEx(SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR ModificationDescriptor, PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, ULONG AutoInheritFlags, PGENERIC_MAPPING GenericMapping, HANDLE Token);
__attribute__((dllimport)) void SetSecurityAccessMask(SECURITY_INFORMATION SecurityInformation, LPDWORD DesiredAccess);
__attribute__((dllimport)) WINBOOL SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor, SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest, SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet);
__attribute__((dllimport)) WINBOOL SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, WINBOOL bDaclPresent, PACL pDacl, WINBOOL bDaclDefaulted);
__attribute__((dllimport)) WINBOOL SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID pGroup, WINBOOL bGroupDefaulted);
__attribute__((dllimport)) WINBOOL SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID pOwner, WINBOOL bOwnerDefaulted);
__attribute__((dllimport)) DWORD SetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor, PUCHAR RMControl);
__attribute__((dllimport)) WINBOOL SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, WINBOOL bSaclPresent, PACL pSacl, WINBOOL bSaclDefaulted);
__attribute__((dllimport)) WINBOOL SetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength);
typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK;
typedef RTL_RUN_ONCE INIT_ONCE;
typedef PRTL_RUN_ONCE PINIT_ONCE;
typedef PRTL_RUN_ONCE LPINIT_ONCE;
typedef WINBOOL (*PINIT_ONCE_FN)(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context);
typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE;
__attribute__((dllimport)) void EnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
__attribute__((dllimport)) void LeaveCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
__attribute__((dllimport)) WINBOOL TryEnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
__attribute__((dllimport)) void DeleteCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
__attribute__((dllimport)) WINBOOL SetEvent(HANDLE hEvent);
__attribute__((dllimport)) WINBOOL ResetEvent(HANDLE hEvent);
__attribute__((dllimport)) WINBOOL ReleaseSemaphore(HANDLE hSemaphore, LONG lReleaseCount, LPLONG lpPreviousCount);
__attribute__((dllimport)) WINBOOL ReleaseMutex(HANDLE hMutex);
__attribute__((dllimport)) DWORD WaitForSingleObjectEx(HANDLE hHandle, DWORD dwMilliseconds, WINBOOL bAlertable);
__attribute__((dllimport)) DWORD WaitForMultipleObjectsEx(DWORD nCount, const HANDLE *lpHandles, WINBOOL bWaitAll, DWORD dwMilliseconds, WINBOOL bAlertable);
__attribute__((dllimport)) HANDLE OpenMutexW(DWORD dwDesiredAccess, WINBOOL bInheritHandle, LPCWSTR lpName);
__attribute__((dllimport)) HANDLE OpenEventA(DWORD dwDesiredAccess, WINBOOL bInheritHandle, LPCSTR lpName);
__attribute__((dllimport)) HANDLE OpenEventW(DWORD dwDesiredAccess, WINBOOL bInheritHandle, LPCWSTR lpName);
__attribute__((dllimport)) HANDLE OpenSemaphoreW(DWORD dwDesiredAccess, WINBOOL bInheritHandle, LPCWSTR lpName);
WINBOOL WaitOnAddress(volatile void *Address, PVOID CompareAddress, SIZE_T AddressSize, DWORD dwMilliseconds);
void WakeByAddressSingle(PVOID Address);
void WakeByAddressAll(PVOID Address);
__attribute__((dllimport)) void InitializeSRWLock(PSRWLOCK SRWLock);
void ReleaseSRWLockExclusive(PSRWLOCK SRWLock);
void ReleaseSRWLockShared(PSRWLOCK SRWLock);
void AcquireSRWLockExclusive(PSRWLOCK SRWLock);
void AcquireSRWLockShared(PSRWLOCK SRWLock);
__attribute__((dllimport)) BOOLEAN TryAcquireSRWLockExclusive(PSRWLOCK SRWLock);
__attribute__((dllimport)) BOOLEAN TryAcquireSRWLockShared(PSRWLOCK SRWLock);
__attribute__((dllimport)) WINBOOL InitializeCriticalSectionEx(LPCRITICAL_SECTION lpCriticalSection, DWORD dwSpinCount, DWORD Flags);
__attribute__((dllimport)) void InitOnceInitialize(PINIT_ONCE InitOnce);
__attribute__((dllimport)) WINBOOL InitOnceExecuteOnce(PINIT_ONCE InitOnce, PINIT_ONCE_FN InitFn, PVOID Parameter, LPVOID *Context);
__attribute__((dllimport)) WINBOOL InitOnceBeginInitialize(LPINIT_ONCE lpInitOnce, DWORD dwFlags, PBOOL fPending, LPVOID *lpContext);
__attribute__((dllimport)) WINBOOL InitOnceComplete(LPINIT_ONCE lpInitOnce, DWORD dwFlags, LPVOID lpContext);
__attribute__((dllimport)) void InitializeConditionVariable(PCONDITION_VARIABLE ConditionVariable);
__attribute__((dllimport)) void WakeConditionVariable(PCONDITION_VARIABLE ConditionVariable);
__attribute__((dllimport)) void WakeAllConditionVariable(PCONDITION_VARIABLE ConditionVariable);
__attribute__((dllimport)) WINBOOL SleepConditionVariableCS(PCONDITION_VARIABLE ConditionVariable, PCRITICAL_SECTION CriticalSection, DWORD dwMilliseconds);
__attribute__((dllimport)) WINBOOL SleepConditionVariableSRW(PCONDITION_VARIABLE ConditionVariable, PSRWLOCK SRWLock, DWORD dwMilliseconds, ULONG Flags);
__attribute__((dllimport)) HANDLE CreateMutexExA(LPSECURITY_ATTRIBUTES lpMutexAttributes, LPCSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess);
__attribute__((dllimport)) HANDLE CreateMutexExW(LPSECURITY_ATTRIBUTES lpMutexAttributes, LPCWSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess);
__attribute__((dllimport)) HANDLE CreateEventExA(LPSECURITY_ATTRIBUTES lpEventAttributes, LPCSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess);
__attribute__((dllimport)) HANDLE CreateEventExW(LPSECURITY_ATTRIBUTES lpEventAttributes, LPCWSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess);
__attribute__((dllimport)) HANDLE CreateSemaphoreExW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCWSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess);
typedef void (*PTIMERAPCROUTINE)(LPVOID lpArgToCompletionRoutine, DWORD dwTimerLowValue, DWORD dwTimerHighValue);
typedef RTL_BARRIER SYNCHRONIZATION_BARRIER;
typedef PRTL_BARRIER PSYNCHRONIZATION_BARRIER;
typedef PRTL_BARRIER LPSYNCHRONIZATION_BARRIER;
__attribute__((dllimport)) void InitializeCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
__attribute__((dllimport)) WINBOOL InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION lpCriticalSection, DWORD dwSpinCount);
__attribute__((dllimport)) DWORD SetCriticalSectionSpinCount(LPCRITICAL_SECTION lpCriticalSection, DWORD dwSpinCount);
__attribute__((dllimport)) DWORD WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds);
__attribute__((dllimport)) DWORD SleepEx(DWORD dwMilliseconds, WINBOOL bAlertable);
__attribute__((dllimport)) HANDLE CreateMutexA(LPSECURITY_ATTRIBUTES lpMutexAttributes, WINBOOL bInitialOwner, LPCSTR lpName);
__attribute__((dllimport)) HANDLE CreateMutexW(LPSECURITY_ATTRIBUTES lpMutexAttributes, WINBOOL bInitialOwner, LPCWSTR lpName);
__attribute__((dllimport)) HANDLE CreateEventA(LPSECURITY_ATTRIBUTES lpEventAttributes, WINBOOL bManualReset, WINBOOL bInitialState, LPCSTR lpName);
__attribute__((dllimport)) HANDLE CreateEventW(LPSECURITY_ATTRIBUTES lpEventAttributes, WINBOOL bManualReset, WINBOOL bInitialState, LPCWSTR lpName);
__attribute__((dllimport)) WINBOOL SetWaitableTimer(HANDLE hTimer, const LARGE_INTEGER *lpDueTime, LONG lPeriod, PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine, WINBOOL fResume);
__attribute__((dllimport)) WINBOOL CancelWaitableTimer(HANDLE hTimer);
__attribute__((dllimport)) HANDLE OpenWaitableTimerW(DWORD dwDesiredAccess, WINBOOL bInheritHandle, LPCWSTR lpTimerName);
WINBOOL EnterSynchronizationBarrier(LPSYNCHRONIZATION_BARRIER lpBarrier, DWORD dwFlags);
WINBOOL InitializeSynchronizationBarrier(LPSYNCHRONIZATION_BARRIER lpBarrier, LONG lTotalThreads, LONG lSpinCount);
WINBOOL DeleteSynchronizationBarrier(LPSYNCHRONIZATION_BARRIER lpBarrier);
__attribute__((dllimport)) void Sleep(DWORD dwMilliseconds);
__attribute__((dllimport)) DWORD SignalObjectAndWait(HANDLE hObjectToSignal, HANDLE hObjectToWaitOn, DWORD dwMilliseconds, WINBOOL bAlertable);
__attribute__((dllimport)) HANDLE CreateWaitableTimerExW(LPSECURITY_ATTRIBUTES lpTimerAttributes, LPCWSTR lpTimerName, DWORD dwFlags, DWORD dwDesiredAccess);
WINBOOL SetWaitableTimerEx(HANDLE hTimer, const LARGE_INTEGER *lpDueTime, LONG lPeriod, PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine, PREASON_CONTEXT WakeContext, ULONG TolerableDelay);
typedef struct _SYSTEM_INFO
{
__extension__ union {
DWORD dwOemId;
__extension__ struct
{
WORD wProcessorArchitecture;
WORD wReserved;
};
};
DWORD dwPageSize;
LPVOID lpMinimumApplicationAddress;
LPVOID lpMaximumApplicationAddress;
DWORD_PTR dwActiveProcessorMask;
DWORD dwNumberOfProcessors;
DWORD dwProcessorType;
DWORD dwAllocationGranularity;
WORD wProcessorLevel;
WORD wProcessorRevision;
} SYSTEM_INFO, *LPSYSTEM_INFO;
__attribute__((dllimport)) void GetSystemTime(LPSYSTEMTIME lpSystemTime);
__attribute__((dllimport)) void GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime);
__attribute__((dllimport)) void GetLocalTime(LPSYSTEMTIME lpSystemTime);
__attribute__((dllimport)) void GetNativeSystemInfo(LPSYSTEM_INFO lpSystemInfo);
__attribute__((dllimport)) ULONGLONG GetTickCount64(void);
typedef struct _MEMORYSTATUSEX
{
DWORD dwLength;
DWORD dwMemoryLoad;
DWORDLONG ullTotalPhys;
DWORDLONG ullAvailPhys;
DWORDLONG ullTotalPageFile;
DWORDLONG ullAvailPageFile;
DWORDLONG ullTotalVirtual;
DWORDLONG ullAvailVirtual;
DWORDLONG ullAvailExtendedVirtual;
} MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
__attribute__((dllimport)) void GetSystemInfo(LPSYSTEM_INFO lpSystemInfo);
__attribute__((dllimport)) WINBOOL GlobalMemoryStatusEx(LPMEMORYSTATUSEX lpBuffer);
__attribute__((dllimport)) DWORD GetTickCount(void);
__attribute__((dllimport)) void GetSystemTimePreciseAsFileTime(LPFILETIME lpSystemTimeAsFileTime);
__attribute__((dllimport)) WINBOOL GetVersionExA(LPOSVERSIONINFOA lpVersionInformation);
__attribute__((dllimport)) WINBOOL GetVersionExW(LPOSVERSIONINFOW lpVersionInformation);
typedef enum _COMPUTER_NAME_FORMAT
{
ComputerNameNetBIOS,
ComputerNameDnsHostname,
ComputerNameDnsDomain,
ComputerNameDnsFullyQualified,
ComputerNamePhysicalNetBIOS,
ComputerNamePhysicalDnsHostname,
ComputerNamePhysicalDnsDomain,
ComputerNamePhysicalDnsFullyQualified,
ComputerNameMax
} COMPUTER_NAME_FORMAT;
__attribute__((dllimport)) DWORD GetVersion(void);
__attribute__((dllimport)) WINBOOL SetLocalTime(const SYSTEMTIME *lpSystemTime);
__attribute__((dllimport)) WINBOOL GetSystemTimeAdjustment(PDWORD lpTimeAdjustment, PDWORD lpTimeIncrement, PBOOL lpTimeAdjustmentDisabled);
__attribute__((dllimport)) UINT GetSystemDirectoryA(LPSTR lpBuffer, UINT uSize);
__attribute__((dllimport)) UINT GetSystemDirectoryW(LPWSTR lpBuffer, UINT uSize);
__attribute__((dllimport)) UINT GetWindowsDirectoryA(LPSTR lpBuffer, UINT uSize);
__attribute__((dllimport)) UINT GetWindowsDirectoryW(LPWSTR lpBuffer, UINT uSize);
__attribute__((dllimport)) UINT GetSystemWindowsDirectoryA(LPSTR lpBuffer, UINT uSize);
__attribute__((dllimport)) UINT GetSystemWindowsDirectoryW(LPWSTR lpBuffer, UINT uSize);
__attribute__((dllimport)) WINBOOL GetComputerNameExA(COMPUTER_NAME_FORMAT NameType, LPSTR lpBuffer, LPDWORD nSize);
__attribute__((dllimport)) WINBOOL GetComputerNameExW(COMPUTER_NAME_FORMAT NameType, LPWSTR lpBuffer, LPDWORD nSize);
__attribute__((dllimport)) WINBOOL SetComputerNameExW(COMPUTER_NAME_FORMAT NameType, LPCWSTR lpBuffer);
__attribute__((dllimport)) WINBOOL SetSystemTime(const SYSTEMTIME *lpSystemTime);
__attribute__((dllimport)) WINBOOL GetLogicalProcessorInformation(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer, PDWORD ReturnedLength);
__attribute__((dllimport)) ULONGLONG VerSetConditionMask(ULONGLONG ConditionMask, ULONG TypeMask, UCHAR Condition);
__attribute__((dllimport)) UINT EnumSystemFirmwareTables(DWORD FirmwareTableProviderSignature, PVOID pFirmwareTableEnumBuffer, DWORD BufferSize);
__attribute__((dllimport)) UINT GetSystemFirmwareTable(DWORD FirmwareTableProviderSignature, DWORD FirmwareTableID, PVOID pFirmwareTableBuffer, DWORD BufferSize);
__attribute__((dllimport)) WINBOOL GetProductInfo(DWORD dwOSMajorVersion, DWORD dwOSMinorVersion, DWORD dwSpMajorVersion, DWORD dwSpMinorVersion, PDWORD pdwReturnedProductType);
__attribute__((dllimport)) WINBOOL GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP RelationshipType, PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX Buffer, PDWORD ReturnedLength);
__attribute__((dllimport)) WINBOOL GetOsSafeBootMode(PDWORD Flags);
__attribute__((dllimport)) WINBOOL GetNumaHighestNodeNumber(PULONG HighestNodeNumber);
__attribute__((dllimport)) WINBOOL GetNumaNodeProcessorMaskEx(USHORT Node, PGROUP_AFFINITY ProcessorMask);
typedef void (*PTP_WIN32_IO_CALLBACK)(PTP_CALLBACK_INSTANCE Instance, PVOID Context, PVOID Overlapped, ULONG IoResult, ULONG_PTR NumberOfBytesTransferred, PTP_IO Io);
__attribute__((dllimport)) PTP_POOL CreateThreadpool(PVOID reserved);
__attribute__((dllimport)) void SetThreadpoolThreadMaximum(PTP_POOL ptpp, DWORD cthrdMost);
__attribute__((dllimport)) WINBOOL SetThreadpoolThreadMinimum(PTP_POOL ptpp, DWORD cthrdMic);
__attribute__((dllimport)) WINBOOL SetThreadpoolStackInformation(PTP_POOL ptpp, PTP_POOL_STACK_INFORMATION ptpsi);
__attribute__((dllimport)) WINBOOL QueryThreadpoolStackInformation(PTP_POOL ptpp, PTP_POOL_STACK_INFORMATION ptpsi);
__attribute__((dllimport)) void CloseThreadpool(PTP_POOL ptpp);
__attribute__((dllimport)) PTP_CLEANUP_GROUP CreateThreadpoolCleanupGroup(void);
__attribute__((dllimport)) void CloseThreadpoolCleanupGroupMembers(PTP_CLEANUP_GROUP ptpcg, WINBOOL fCancelPendingCallbacks, PVOID pvCleanupContext);
__attribute__((dllimport)) void CloseThreadpoolCleanupGroup(PTP_CLEANUP_GROUP ptpcg);
__attribute__((dllimport)) void SetEventWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HANDLE evt);
__attribute__((dllimport)) void ReleaseSemaphoreWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HANDLE sem, DWORD crel);
__attribute__((dllimport)) void ReleaseMutexWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HANDLE mut);
__attribute__((dllimport)) void LeaveCriticalSectionWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, PCRITICAL_SECTION pcs);
__attribute__((dllimport)) void FreeLibraryWhenCallbackReturns(PTP_CALLBACK_INSTANCE pci, HMODULE mod);
__attribute__((dllimport)) WINBOOL CallbackMayRunLong(PTP_CALLBACK_INSTANCE pci);
__attribute__((dllimport)) void DisassociateCurrentThreadFromCallback(PTP_CALLBACK_INSTANCE pci);
__attribute__((dllimport)) WINBOOL TrySubmitThreadpoolCallback(PTP_SIMPLE_CALLBACK pfns, PVOID pv, PTP_CALLBACK_ENVIRON pcbe);
__attribute__((dllimport)) PTP_WORK CreateThreadpoolWork(PTP_WORK_CALLBACK pfnwk, PVOID pv, PTP_CALLBACK_ENVIRON pcbe);
__attribute__((dllimport)) void SubmitThreadpoolWork(PTP_WORK pwk);
__attribute__((dllimport)) void WaitForThreadpoolWorkCallbacks(PTP_WORK pwk, WINBOOL fCancelPendingCallbacks);
__attribute__((dllimport)) void CloseThreadpoolWork(PTP_WORK pwk);
__attribute__((dllimport)) PTP_TIMER CreateThreadpoolTimer(PTP_TIMER_CALLBACK pfnti, PVOID pv, PTP_CALLBACK_ENVIRON pcbe);
__attribute__((dllimport)) void SetThreadpoolTimer(PTP_TIMER pti, PFILETIME pftDueTime, DWORD msPeriod, DWORD msWindowLength);
__attribute__((dllimport)) WINBOOL IsThreadpoolTimerSet(PTP_TIMER pti);
__attribute__((dllimport)) void WaitForThreadpoolTimerCallbacks(PTP_TIMER pti, WINBOOL fCancelPendingCallbacks);
__attribute__((dllimport)) void CloseThreadpoolTimer(PTP_TIMER pti);
__attribute__((dllimport)) PTP_WAIT CreateThreadpoolWait(PTP_WAIT_CALLBACK pfnwa, PVOID pv, PTP_CALLBACK_ENVIRON pcbe);
__attribute__((dllimport)) void SetThreadpoolWait(PTP_WAIT pwa, HANDLE h, PFILETIME pftTimeout);
__attribute__((dllimport)) void WaitForThreadpoolWaitCallbacks(PTP_WAIT pwa, WINBOOL fCancelPendingCallbacks);
__attribute__((dllimport)) void CloseThreadpoolWait(PTP_WAIT pwa);
__attribute__((dllimport)) PTP_IO CreateThreadpoolIo(HANDLE fl, PTP_WIN32_IO_CALLBACK pfnio, PVOID pv, PTP_CALLBACK_ENVIRON pcbe);
__attribute__((dllimport)) void StartThreadpoolIo(PTP_IO pio);
__attribute__((dllimport)) void CancelThreadpoolIo(PTP_IO pio);
__attribute__((dllimport)) void WaitForThreadpoolIoCallbacks(PTP_IO pio, WINBOOL fCancelPendingCallbacks);
__attribute__((dllimport)) void CloseThreadpoolIo(PTP_IO pio);
__attribute__((dllimport)) WINBOOL SetThreadpoolTimerEx(PTP_TIMER pti, PFILETIME pftDueTime, DWORD msPeriod, DWORD msWindowLength);
__attribute__((dllimport)) WINBOOL SetThreadpoolWaitEx(PTP_WAIT pwa, HANDLE h, PFILETIME pftTimeout, PVOID Reserved);
__attribute__((dllimport)) WINBOOL CreateTimerQueueTimer(PHANDLE phNewTimer, HANDLE TimerQueue, WAITORTIMERCALLBACK Callback, PVOID Parameter, DWORD DueTime, DWORD Period, ULONG Flags);
__attribute__((dllimport)) WINBOOL DeleteTimerQueueTimer(HANDLE TimerQueue, HANDLE Timer, HANDLE CompletionEvent);
__attribute__((dllimport)) WINBOOL QueueUserWorkItem(LPTHREAD_START_ROUTINE Function, PVOID Context, ULONG Flags);
__attribute__((dllimport)) WINBOOL UnregisterWaitEx(HANDLE WaitHandle, HANDLE CompletionEvent);
__attribute__((dllimport)) HANDLE CreateTimerQueue(void);
__attribute__((dllimport)) WINBOOL ChangeTimerQueueTimer(HANDLE TimerQueue, HANDLE Timer, ULONG DueTime, ULONG Period);
__attribute__((dllimport)) WINBOOL DeleteTimerQueueEx(HANDLE TimerQueue, HANDLE CompletionEvent);
__attribute__((dllimport)) PVOID EncodePointer(PVOID Ptr);
__attribute__((dllimport)) PVOID DecodePointer(PVOID Ptr);
__attribute__((dllimport)) PVOID EncodeSystemPointer(PVOID Ptr);
__attribute__((dllimport)) PVOID DecodeSystemPointer(PVOID Ptr);
__attribute__((dllimport)) WINBOOL Beep(DWORD dwFreq, DWORD dwDuration);
__attribute__((dllimport)) WINBOOL Wow64DisableWow64FsRedirection(PVOID *OldValue);
__attribute__((dllimport)) WINBOOL Wow64RevertWow64FsRedirection(PVOID OlValue);
__attribute__((dllimport)) WINBOOL IsWow64Process(HANDLE hProcess, PBOOL Wow64Process);
typedef void (*PFIBER_START_ROUTINE)(LPVOID lpFiberParameter);
typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE;
typedef LPVOID LPLDT_ENTRY;
typedef struct _COMMPROP
{
WORD wPacketLength;
WORD wPacketVersion;
DWORD dwServiceMask;
DWORD dwReserved1;
DWORD dwMaxTxQueue;
DWORD dwMaxRxQueue;
DWORD dwMaxBaud;
DWORD dwProvSubType;
DWORD dwProvCapabilities;
DWORD dwSettableParams;
DWORD dwSettableBaud;
WORD wSettableData;
WORD wSettableStopParity;
DWORD dwCurrentTxQueue;
DWORD dwCurrentRxQueue;
DWORD dwProvSpec1;
DWORD dwProvSpec2;
WCHAR wcProvChar[1];
} COMMPROP, *LPCOMMPROP;
typedef struct _COMSTAT
{
DWORD fCtsHold : 1;
DWORD fDsrHold : 1;
DWORD fRlsdHold : 1;
DWORD fXoffHold : 1;
DWORD fXoffSent : 1;
DWORD fEof : 1;
DWORD fTxim : 1;
DWORD fReserved : 25;
DWORD cbInQue;
DWORD cbOutQue;
} COMSTAT, *LPCOMSTAT;
typedef struct _DCB
{
DWORD DCBlength;
DWORD BaudRate;
DWORD fBinary : 1;
DWORD fParity : 1;
DWORD fOutxCtsFlow : 1;
DWORD fOutxDsrFlow : 1;
DWORD fDtrControl : 2;
DWORD fDsrSensitivity : 1;
DWORD fTXContinueOnXoff : 1;
DWORD fOutX : 1;
DWORD fInX : 1;
DWORD fErrorChar : 1;
DWORD fNull : 1;
DWORD fRtsControl : 2;
DWORD fAbortOnError : 1;
DWORD fDummy2 : 17;
WORD wReserved;
WORD XonLim;
WORD XoffLim;
BYTE ByteSize;
BYTE Parity;
BYTE StopBits;
char XonChar;
char XoffChar;
char ErrorChar;
char EofChar;
char EvtChar;
WORD wReserved1;
} DCB, *LPDCB;
typedef struct _COMMTIMEOUTS
{
DWORD ReadIntervalTimeout;
DWORD ReadTotalTimeoutMultiplier;
DWORD ReadTotalTimeoutConstant;
DWORD WriteTotalTimeoutMultiplier;
DWORD WriteTotalTimeoutConstant;
} COMMTIMEOUTS, *LPCOMMTIMEOUTS;
typedef struct _COMMCONFIG
{
DWORD dwSize;
WORD wVersion;
WORD wReserved;
DCB dcb;
DWORD dwProviderSubType;
DWORD dwProviderOffset;
DWORD dwProviderSize;
WCHAR wcProviderData[1];
} COMMCONFIG, *LPCOMMCONFIG;
typedef struct _MEMORYSTATUS
{
DWORD dwLength;
DWORD dwMemoryLoad;
SIZE_T dwTotalPhys;
SIZE_T dwAvailPhys;
SIZE_T dwTotalPageFile;
SIZE_T dwAvailPageFile;
SIZE_T dwTotalVirtual;
SIZE_T dwAvailVirtual;
} MEMORYSTATUS, *LPMEMORYSTATUS;
typedef struct _JIT_DEBUG_INFO
{
DWORD dwSize;
DWORD dwProcessorArchitecture;
DWORD dwThreadID;
DWORD dwReserved0;
ULONG64 lpExceptionAddress;
ULONG64 lpExceptionRecord;
ULONG64 lpContextRecord;
} JIT_DEBUG_INFO, *LPJIT_DEBUG_INFO;
typedef JIT_DEBUG_INFO JIT_DEBUG_INFO32, *LPJIT_DEBUG_INFO32;
typedef JIT_DEBUG_INFO JIT_DEBUG_INFO64, *LPJIT_DEBUG_INFO64;
typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD;
typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS;
typedef struct _OFSTRUCT
{
BYTE cBytes;
BYTE fFixedDisk;
WORD nErrCode;
WORD Reserved1;
WORD Reserved2;
CHAR szPathName[128];
} OFSTRUCT, *LPOFSTRUCT, *POFSTRUCT;
LONG __attribute__((__cdecl__)) _InterlockedAnd(LONG volatile *Destination, LONG Value);
LONG __attribute__((__cdecl__)) _InterlockedOr(LONG volatile *Destination, LONG Value);
LONG __attribute__((__cdecl__)) _InterlockedXor(LONG volatile *Destination, LONG Value);
char __attribute__((__cdecl__)) _InterlockedAnd8(char volatile *Destination, char Value);
char __attribute__((__cdecl__)) _InterlockedOr8(char volatile *Destination, char Value);
char __attribute__((__cdecl__)) _InterlockedXor8(char volatile *Destination, char Value);
SHORT __attribute__((__cdecl__)) _InterlockedAnd16(SHORT volatile *Destination, SHORT Value);
SHORT __attribute__((__cdecl__)) _InterlockedOr16(SHORT volatile *Destination, SHORT Value);
SHORT __attribute__((__cdecl__)) _InterlockedXor16(SHORT volatile *Destination, SHORT Value);
__attribute__((dllimport)) HLOCAL LocalAlloc(UINT uFlags, SIZE_T uBytes);
__attribute__((dllimport)) HLOCAL LocalFree(HLOCAL hMem);
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);
int wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd);
__attribute__((dllimport)) HGLOBAL GlobalAlloc(UINT uFlags, SIZE_T dwBytes);
__attribute__((dllimport)) HGLOBAL GlobalReAlloc(HGLOBAL hMem, SIZE_T dwBytes, UINT uFlags);
__attribute__((dllimport)) SIZE_T GlobalSize(HGLOBAL hMem);
__attribute__((dllimport)) UINT GlobalFlags(HGLOBAL hMem);
__attribute__((dllimport)) LPVOID GlobalLock(HGLOBAL hMem);
__attribute__((dllimport)) HGLOBAL GlobalHandle(LPCVOID pMem);
__attribute__((dllimport)) WINBOOL GlobalUnlock(HGLOBAL hMem);
__attribute__((dllimport)) HGLOBAL GlobalFree(HGLOBAL hMem);
__attribute__((dllimport)) SIZE_T GlobalCompact(DWORD dwMinFree);
__attribute__((dllimport)) void GlobalFix(HGLOBAL hMem);
__attribute__((dllimport)) void GlobalUnfix(HGLOBAL hMem);
__attribute__((dllimport)) LPVOID GlobalWire(HGLOBAL hMem);
__attribute__((dllimport)) WINBOOL GlobalUnWire(HGLOBAL hMem);
__attribute__((dllimport)) void GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer);
__attribute__((dllimport)) HLOCAL LocalReAlloc(HLOCAL hMem, SIZE_T uBytes, UINT uFlags);
__attribute__((dllimport)) LPVOID LocalLock(HLOCAL hMem);
__attribute__((dllimport)) HLOCAL LocalHandle(LPCVOID pMem);
__attribute__((dllimport)) WINBOOL LocalUnlock(HLOCAL hMem);
__attribute__((dllimport)) SIZE_T LocalSize(HLOCAL hMem);
__attribute__((dllimport)) UINT LocalFlags(HLOCAL hMem);
__attribute__((dllimport)) SIZE_T LocalShrink(HLOCAL hMem, UINT cbNewSize);
__attribute__((dllimport)) SIZE_T LocalCompact(UINT uMinFree);
__attribute__((dllimport)) LPVOID VirtualAllocExNuma(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect, DWORD nndPreferred);
__attribute__((dllimport)) WINBOOL GetProcessorSystemCycleTime(USHORT Group, PSYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION Buffer, PDWORD ReturnedLength);
__attribute__((dllimport)) WINBOOL GetPhysicallyInstalledSystemMemory(PULONGLONG TotalMemoryInKilobytes);
__attribute__((dllimport)) WINBOOL GetBinaryTypeA(LPCSTR lpApplicationName, LPDWORD lpBinaryType);
__attribute__((dllimport)) WINBOOL GetBinaryTypeW(LPCWSTR lpApplicationName, LPDWORD lpBinaryType);
__attribute__((dllimport)) DWORD GetShortPathNameA(LPCSTR lpszLongPath, LPSTR lpszShortPath, DWORD cchBuffer);
__attribute__((dllimport)) DWORD GetLongPathNameTransactedA(LPCSTR lpszShortPath, LPSTR lpszLongPath, DWORD cchBuffer, HANDLE hTransaction);
__attribute__((dllimport)) DWORD GetLongPathNameTransactedW(LPCWSTR lpszShortPath, LPWSTR lpszLongPath, DWORD cchBuffer, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL GetProcessAffinityMask(HANDLE hProcess, PDWORD_PTR lpProcessAffinityMask, PDWORD_PTR lpSystemAffinityMask);
__attribute__((dllimport)) WINBOOL SetProcessAffinityMask(HANDLE hProcess, DWORD_PTR dwProcessAffinityMask);
__attribute__((dllimport)) WINBOOL GetProcessIoCounters(HANDLE hProcess, PIO_COUNTERS lpIoCounters);
__attribute__((dllimport)) WINBOOL GetProcessWorkingSetSize(HANDLE hProcess, PSIZE_T lpMinimumWorkingSetSize, PSIZE_T lpMaximumWorkingSetSize);
__attribute__((dllimport)) WINBOOL SetProcessWorkingSetSize(HANDLE hProcess, SIZE_T dwMinimumWorkingSetSize, SIZE_T dwMaximumWorkingSetSize);
__attribute__((dllimport)) void FatalExit(int ExitCode);
__attribute__((dllimport)) WINBOOL SetEnvironmentStringsA(LPCH NewEnvironment);
__attribute__((dllimport)) void RaiseFailFastException(PEXCEPTION_RECORD pExceptionRecord, PCONTEXT pContextRecord, DWORD dwFlags);
__attribute__((dllimport)) DWORD SetThreadIdealProcessor(HANDLE hThread, DWORD dwIdealProcessor);
__attribute__((dllimport)) LPVOID CreateFiber(SIZE_T dwStackSize, LPFIBER_START_ROUTINE lpStartAddress, LPVOID lpParameter);
__attribute__((dllimport)) LPVOID CreateFiberEx(SIZE_T dwStackCommitSize, SIZE_T dwStackReserveSize, DWORD dwFlags, LPFIBER_START_ROUTINE lpStartAddress, LPVOID lpParameter);
__attribute__((dllimport)) void DeleteFiber(LPVOID lpFiber);
__attribute__((dllimport)) LPVOID ConvertThreadToFiber(LPVOID lpParameter);
__attribute__((dllimport)) LPVOID ConvertThreadToFiberEx(LPVOID lpParameter, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL ConvertFiberToThread(void);
__attribute__((dllimport)) void SwitchToFiber(LPVOID lpFiber);
__attribute__((dllimport)) DWORD_PTR SetThreadAffinityMask(HANDLE hThread, DWORD_PTR dwThreadAffinityMask);
typedef enum _THREAD_INFORMATION_CLASS
{
ThreadMemoryPriority,
ThreadAbsoluteCpuPriority,
ThreadInformationClassMax
} THREAD_INFORMATION_CLASS;
typedef enum _PROCESS_INFORMATION_CLASS
{
ProcessMemoryPriority,
ProcessInformationClassMax
} PROCESS_INFORMATION_CLASS;
__attribute__((dllimport)) WINBOOL SetProcessDEPPolicy(DWORD dwFlags);
__attribute__((dllimport)) WINBOOL GetProcessDEPPolicy(HANDLE hProcess, LPDWORD lpFlags, PBOOL lpPermanent);
__attribute__((dllimport)) WINBOOL SetProcessPriorityBoost(HANDLE hProcess, WINBOOL bDisablePriorityBoost);
__attribute__((dllimport)) WINBOOL GetProcessPriorityBoost(HANDLE hProcess, PBOOL pDisablePriorityBoost);
__attribute__((dllimport)) WINBOOL RequestWakeupLatency(LATENCY_TIME latency);
__attribute__((dllimport)) WINBOOL IsSystemResumeAutomatic(void);
__attribute__((dllimport)) WINBOOL GetThreadIOPendingFlag(HANDLE hThread, PBOOL lpIOIsPending);
__attribute__((dllimport)) WINBOOL GetThreadSelectorEntry(HANDLE hThread, DWORD dwSelector, LPLDT_ENTRY lpSelectorEntry);
__attribute__((dllimport)) EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);
typedef REASON_CONTEXT POWER_REQUEST_CONTEXT, *PPOWER_REQUEST_CONTEXT, *LPPOWER_REQUEST_CONTEXT;
__attribute__((dllimport)) HANDLE PowerCreateRequest(PREASON_CONTEXT Context);
__attribute__((dllimport)) WINBOOL PowerSetRequest(HANDLE PowerRequest, POWER_REQUEST_TYPE RequestType);
__attribute__((dllimport)) WINBOOL PowerClearRequest(HANDLE PowerRequest, POWER_REQUEST_TYPE RequestType);
__attribute__((dllimport)) WINBOOL SetFileCompletionNotificationModes(HANDLE FileHandle, UCHAR Flags);
__attribute__((dllimport)) WINBOOL SetFileIoOverlappedRange(HANDLE FileHandle, PUCHAR OverlappedRangeStart, ULONG Length);
__attribute__((dllimport)) DWORD GetThreadErrorMode(void);
__attribute__((dllimport)) WINBOOL SetThreadErrorMode(DWORD dwNewMode, LPDWORD lpOldMode);
__attribute__((dllimport)) WINBOOL Wow64GetThreadContext(HANDLE hThread, PWOW64_CONTEXT lpContext);
__attribute__((dllimport)) WINBOOL Wow64SetThreadContext(HANDLE hThread, const WOW64_CONTEXT *lpContext);
__attribute__((dllimport)) WINBOOL Wow64GetThreadSelectorEntry(HANDLE hThread, DWORD dwSelector, PWOW64_LDT_ENTRY lpSelectorEntry);
__attribute__((dllimport)) DWORD Wow64SuspendThread(HANDLE hThread);
__attribute__((dllimport)) WINBOOL DebugSetProcessKillOnExit(WINBOOL KillOnExit);
__attribute__((dllimport)) WINBOOL DebugBreakProcess(HANDLE Process);
__attribute__((dllimport)) DWORD WaitForMultipleObjects(DWORD nCount, const HANDLE *lpHandles, WINBOOL bWaitAll, DWORD dwMilliseconds);
typedef enum _DEP_SYSTEM_POLICY_TYPE
{
DEPPolicyAlwaysOff = 0,
DEPPolicyAlwaysOn,
DEPPolicyOptIn,
DEPPolicyOptOut,
DEPTotalPolicyCount
} DEP_SYSTEM_POLICY_TYPE;
__attribute__((dllimport)) WINBOOL PulseEvent(HANDLE hEvent);
__attribute__((dllimport)) ATOM GlobalDeleteAtom(ATOM nAtom);
__attribute__((dllimport)) WINBOOL InitAtomTable(DWORD nSize);
__attribute__((dllimport)) ATOM DeleteAtom(ATOM nAtom);
__attribute__((dllimport)) UINT SetHandleCount(UINT uNumber);
__attribute__((dllimport)) WINBOOL RequestDeviceWakeup(HANDLE hDevice);
__attribute__((dllimport)) WINBOOL CancelDeviceWakeupRequest(HANDLE hDevice);
__attribute__((dllimport)) WINBOOL GetDevicePowerState(HANDLE hDevice, WINBOOL *pfOn);
__attribute__((dllimport)) WINBOOL SetMessageWaitingIndicator(HANDLE hMsgIndicator, ULONG ulMsgCount);
__attribute__((dllimport)) WINBOOL SetFileShortNameA(HANDLE hFile, LPCSTR lpShortName);
__attribute__((dllimport)) WINBOOL SetFileShortNameW(HANDLE hFile, LPCWSTR lpShortName);
__attribute__((dllimport)) DWORD LoadModule(LPCSTR lpModuleName, LPVOID lpParameterBlock);
__attribute__((dllimport)) UINT WinExec(LPCSTR lpCmdLine, UINT uCmdShow);
__attribute__((dllimport)) WINBOOL ClearCommBreak(HANDLE hFile);
__attribute__((dllimport)) WINBOOL ClearCommError(HANDLE hFile, LPDWORD lpErrors, LPCOMSTAT lpStat);
__attribute__((dllimport)) WINBOOL SetupComm(HANDLE hFile, DWORD dwInQueue, DWORD dwOutQueue);
__attribute__((dllimport)) WINBOOL EscapeCommFunction(HANDLE hFile, DWORD dwFunc);
__attribute__((dllimport)) WINBOOL GetCommConfig(HANDLE hCommDev, LPCOMMCONFIG lpCC, LPDWORD lpdwSize);
__attribute__((dllimport)) WINBOOL GetCommMask(HANDLE hFile, LPDWORD lpEvtMask);
__attribute__((dllimport)) WINBOOL GetCommProperties(HANDLE hFile, LPCOMMPROP lpCommProp);
__attribute__((dllimport)) WINBOOL GetCommModemStatus(HANDLE hFile, LPDWORD lpModemStat);
__attribute__((dllimport)) WINBOOL GetCommState(HANDLE hFile, LPDCB lpDCB);
__attribute__((dllimport)) WINBOOL GetCommTimeouts(HANDLE hFile, LPCOMMTIMEOUTS lpCommTimeouts);
__attribute__((dllimport)) WINBOOL PurgeComm(HANDLE hFile, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL SetCommBreak(HANDLE hFile);
__attribute__((dllimport)) WINBOOL SetCommConfig(HANDLE hCommDev, LPCOMMCONFIG lpCC, DWORD dwSize);
__attribute__((dllimport)) WINBOOL SetCommMask(HANDLE hFile, DWORD dwEvtMask);
__attribute__((dllimport)) WINBOOL SetCommState(HANDLE hFile, LPDCB lpDCB);
__attribute__((dllimport)) WINBOOL SetCommTimeouts(HANDLE hFile, LPCOMMTIMEOUTS lpCommTimeouts);
__attribute__((dllimport)) WINBOOL TransmitCommChar(HANDLE hFile, char cChar);
__attribute__((dllimport)) WINBOOL WaitCommEvent(HANDLE hFile, LPDWORD lpEvtMask, LPOVERLAPPED lpOverlapped);
__attribute__((dllimport)) DWORD SetTapePosition(HANDLE hDevice, DWORD dwPositionMethod, DWORD dwPartition, DWORD dwOffsetLow, DWORD dwOffsetHigh, WINBOOL bImmediate);
__attribute__((dllimport)) DWORD GetTapePosition(HANDLE hDevice, DWORD dwPositionType, LPDWORD lpdwPartition, LPDWORD lpdwOffsetLow, LPDWORD lpdwOffsetHigh);
__attribute__((dllimport)) DWORD PrepareTape(HANDLE hDevice, DWORD dwOperation, WINBOOL bImmediate);
__attribute__((dllimport)) DWORD EraseTape(HANDLE hDevice, DWORD dwEraseType, WINBOOL bImmediate);
__attribute__((dllimport)) DWORD CreateTapePartition(HANDLE hDevice, DWORD dwPartitionMethod, DWORD dwCount, DWORD dwSize);
__attribute__((dllimport)) DWORD WriteTapemark(HANDLE hDevice, DWORD dwTapemarkType, DWORD dwTapemarkCount, WINBOOL bImmediate);
__attribute__((dllimport)) DWORD GetTapeStatus(HANDLE hDevice);
__attribute__((dllimport)) DWORD GetTapeParameters(HANDLE hDevice, DWORD dwOperation, LPDWORD lpdwSize, LPVOID lpTapeInformation);
__attribute__((dllimport)) DWORD SetTapeParameters(HANDLE hDevice, DWORD dwOperation, LPVOID lpTapeInformation);
__attribute__((dllimport)) DEP_SYSTEM_POLICY_TYPE GetSystemDEPPolicy(void);
__attribute__((dllimport)) WINBOOL GetSystemRegistryQuota(PDWORD pdwQuotaAllowed, PDWORD pdwQuotaUsed);
WINBOOL GetSystemTimes(LPFILETIME lpIdleTime, LPFILETIME lpKernelTime, LPFILETIME lpUserTime);
__attribute__((dllimport)) WINBOOL FileTimeToDosDateTime(const FILETIME *lpFileTime, LPWORD lpFatDate, LPWORD lpFatTime);
__attribute__((dllimport)) WINBOOL DosDateTimeToFileTime(WORD wFatDate, WORD wFatTime, LPFILETIME lpFileTime);
__attribute__((dllimport)) WINBOOL SetSystemTimeAdjustment(DWORD dwTimeAdjustment, WINBOOL bTimeAdjustmentDisabled);
__attribute__((dllimport)) int MulDiv(int nNumber, int nNumerator, int nDenominator);
__attribute__((dllimport)) DWORD FormatMessageA(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPSTR lpBuffer, DWORD nSize, va_list *Arguments);
__attribute__((dllimport)) DWORD FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, va_list *Arguments);
typedef DWORD (*PFE_EXPORT_FUNC)(PBYTE pbData, PVOID pvCallbackContext, ULONG ulLength);
typedef DWORD (*PFE_IMPORT_FUNC)(PBYTE pbData, PVOID pvCallbackContext, PULONG ulLength);
__attribute__((dllimport)) WINBOOL GetNamedPipeInfo(HANDLE hNamedPipe, LPDWORD lpFlags, LPDWORD lpOutBufferSize, LPDWORD lpInBufferSize, LPDWORD lpMaxInstances);
__attribute__((dllimport)) HANDLE CreateMailslotA(LPCSTR lpName, DWORD nMaxMessageSize, DWORD lReadTimeout, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
__attribute__((dllimport)) HANDLE CreateMailslotW(LPCWSTR lpName, DWORD nMaxMessageSize, DWORD lReadTimeout, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
__attribute__((dllimport)) WINBOOL GetMailslotInfo(HANDLE hMailslot, LPDWORD lpMaxMessageSize, LPDWORD lpNextSize, LPDWORD lpMessageCount, LPDWORD lpReadTimeout);
__attribute__((dllimport)) WINBOOL SetMailslotInfo(HANDLE hMailslot, DWORD lReadTimeout);
__attribute__((dllimport)) WINBOOL EncryptFileA(LPCSTR lpFileName);
__attribute__((dllimport)) WINBOOL EncryptFileW(LPCWSTR lpFileName);
__attribute__((dllimport)) WINBOOL DecryptFileA(LPCSTR lpFileName, DWORD dwReserved);
__attribute__((dllimport)) WINBOOL DecryptFileW(LPCWSTR lpFileName, DWORD dwReserved);
__attribute__((dllimport)) WINBOOL FileEncryptionStatusA(LPCSTR lpFileName, LPDWORD lpStatus);
__attribute__((dllimport)) WINBOOL FileEncryptionStatusW(LPCWSTR lpFileName, LPDWORD lpStatus);
__attribute__((dllimport)) DWORD OpenEncryptedFileRawA(LPCSTR lpFileName, ULONG ulFlags, PVOID *pvContext);
__attribute__((dllimport)) DWORD OpenEncryptedFileRawW(LPCWSTR lpFileName, ULONG ulFlags, PVOID *pvContext);
__attribute__((dllimport)) DWORD ReadEncryptedFileRaw(PFE_EXPORT_FUNC pfExportCallback, PVOID pvCallbackContext, PVOID pvContext);
__attribute__((dllimport)) DWORD WriteEncryptedFileRaw(PFE_IMPORT_FUNC pfImportCallback, PVOID pvCallbackContext, PVOID pvContext);
__attribute__((dllimport)) void CloseEncryptedFileRaw(PVOID pvContext);
__attribute__((dllimport)) int lstrcmpA(LPCSTR lpString1, LPCSTR lpString2);
__attribute__((dllimport)) int lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2);
__attribute__((dllimport)) int lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2);
__attribute__((dllimport)) int lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2);
__attribute__((dllimport)) LPSTR lstrcpynA(LPSTR lpString1, LPCSTR lpString2, int iMaxLength);
__attribute__((dllimport)) LPWSTR lstrcpynW(LPWSTR lpString1, LPCWSTR lpString2, int iMaxLength);
__attribute__((dllimport)) LPSTR lstrcpyA(LPSTR lpString1, LPCSTR lpString2);
__attribute__((dllimport)) LPWSTR lstrcpyW(LPWSTR lpString1, LPCWSTR lpString2);
__attribute__((dllimport)) LPSTR lstrcatA(LPSTR lpString1, LPCSTR lpString2);
__attribute__((dllimport)) LPWSTR lstrcatW(LPWSTR lpString1, LPCWSTR lpString2);
__attribute__((dllimport)) int lstrlenA(LPCSTR lpString);
__attribute__((dllimport)) int lstrlenW(LPCWSTR lpString);
__attribute__((dllimport)) HFILE OpenFile(LPCSTR lpFileName, LPOFSTRUCT lpReOpenBuff, UINT uStyle);
__attribute__((dllimport)) HFILE _lopen(LPCSTR lpPathName, int iReadWrite);
__attribute__((dllimport)) HFILE _lcreat(LPCSTR lpPathName, int iAttribute);
__attribute__((dllimport)) UINT _lread(HFILE hFile, LPVOID lpBuffer, UINT uBytes);
__attribute__((dllimport)) UINT _lwrite(HFILE hFile, LPCCH lpBuffer, UINT uBytes);
__attribute__((dllimport)) long _hread(HFILE hFile, LPVOID lpBuffer, long lBytes);
__attribute__((dllimport)) long _hwrite(HFILE hFile, LPCCH lpBuffer, long lBytes);
__attribute__((dllimport)) HFILE _lclose(HFILE hFile);
__attribute__((dllimport)) LONG _llseek(HFILE hFile, LONG lOffset, int iOrigin);
__attribute__((dllimport)) WINBOOL IsTextUnicode(const void *lpv, int iSize, LPINT lpiResult);
__attribute__((dllimport)) DWORD SignalObjectAndWait(HANDLE hObjectToSignal, HANDLE hObjectToWaitOn, DWORD dwMilliseconds, WINBOOL bAlertable);
__attribute__((dllimport)) WINBOOL BackupRead(HANDLE hFile, LPBYTE lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, WINBOOL bAbort, WINBOOL bProcessSecurity, LPVOID *lpContext);
__attribute__((dllimport)) WINBOOL BackupSeek(HANDLE hFile, DWORD dwLowBytesToSeek, DWORD dwHighBytesToSeek, LPDWORD lpdwLowByteSeeked, LPDWORD lpdwHighByteSeeked, LPVOID *lpContext);
__attribute__((dllimport)) WINBOOL BackupWrite(HANDLE hFile, LPBYTE lpBuffer, DWORD nNumberOfBytesToWrite, LPDWORD lpNumberOfBytesWritten, WINBOOL bAbort, WINBOOL bProcessSecurity, LPVOID *lpContext);
typedef struct _WIN32_STREAM_ID
{
DWORD dwStreamId;
DWORD dwStreamAttributes;
LARGE_INTEGER Size;
DWORD dwStreamNameSize;
WCHAR cStreamName[1];
} WIN32_STREAM_ID, *LPWIN32_STREAM_ID;
typedef struct _STARTUPINFOEXA
{
STARTUPINFOA StartupInfo;
LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList;
} STARTUPINFOEXA, *LPSTARTUPINFOEXA;
typedef struct _STARTUPINFOEXW
{
STARTUPINFOW StartupInfo;
LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList;
} STARTUPINFOEXW, *LPSTARTUPINFOEXW;
typedef STARTUPINFOEXW STARTUPINFOEX;
typedef LPSTARTUPINFOEXW LPSTARTUPINFOEX;
__attribute__((dllimport)) HANDLE CreateSemaphoreW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCWSTR lpName);
__attribute__((dllimport)) HMODULE LoadLibraryW(LPCWSTR lpLibFileName);
__attribute__((dllimport)) HANDLE OpenMutexA(DWORD dwDesiredAccess, WINBOOL bInheritHandle, LPCSTR lpName);
__attribute__((dllimport)) HANDLE CreateSemaphoreA(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCSTR lpName);
__attribute__((dllimport)) HANDLE OpenSemaphoreA(DWORD dwDesiredAccess, WINBOOL bInheritHandle, LPCSTR lpName);
__attribute__((dllimport)) HANDLE CreateWaitableTimerA(LPSECURITY_ATTRIBUTES lpTimerAttributes, WINBOOL bManualReset, LPCSTR lpTimerName);
__attribute__((dllimport)) HANDLE CreateWaitableTimerW(LPSECURITY_ATTRIBUTES lpTimerAttributes, WINBOOL bManualReset, LPCWSTR lpTimerName);
__attribute__((dllimport)) HANDLE OpenWaitableTimerA(DWORD dwDesiredAccess, WINBOOL bInheritHandle, LPCSTR lpTimerName);
__attribute__((dllimport)) HANDLE CreateFileMappingA(HANDLE hFile, LPSECURITY_ATTRIBUTES lpFileMappingAttributes, DWORD flProtect, DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCSTR lpName);
__attribute__((dllimport)) HANDLE CreateSemaphoreExA(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCSTR lpName, DWORD dwFlags, DWORD dwDesiredAccess);
__attribute__((dllimport)) HANDLE CreateWaitableTimerExA(LPSECURITY_ATTRIBUTES lpTimerAttributes, LPCSTR lpTimerName, DWORD dwFlags, DWORD dwDesiredAccess);
__attribute__((dllimport)) HANDLE CreateFileMappingNumaA(HANDLE hFile, LPSECURITY_ATTRIBUTES lpFileMappingAttributes, DWORD flProtect, DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCSTR lpName, DWORD nndPreferred);
__attribute__((dllimport)) HANDLE OpenFileMappingA(DWORD dwDesiredAccess, WINBOOL bInheritHandle, LPCSTR lpName);
__attribute__((dllimport)) DWORD GetLogicalDriveStringsA(DWORD nBufferLength, LPSTR lpBuffer);
__attribute__((dllimport)) HMODULE LoadLibraryA(LPCSTR lpLibFileName);
__attribute__((dllimport)) WINBOOL QueryFullProcessImageNameA(HANDLE hProcess, DWORD dwFlags, LPSTR lpExeName, PDWORD lpdwSize);
__attribute__((dllimport)) WINBOOL QueryFullProcessImageNameW(HANDLE hProcess, DWORD dwFlags, LPWSTR lpExeName, PDWORD lpdwSize);
typedef enum _PROC_THREAD_ATTRIBUTE_NUM
{
ProcThreadAttributeParentProcess = 0,
ProcThreadAttributeHandleList = 2,
ProcThreadAttributeGroupAffinity = 3,
ProcThreadAttributePreferredNode = 4,
ProcThreadAttributeIdealProcessor = 5,
ProcThreadAttributeUmsThread = 6,
ProcThreadAttributeMitigationPolicy = 7,
ProcThreadAttributeProtectionLevel = 11
} PROC_THREAD_ATTRIBUTE_NUM;
__attribute__((dllimport)) WINBOOL GetProcessShutdownParameters(LPDWORD lpdwLevel, LPDWORD lpdwFlags);
__attribute__((dllimport)) void FatalAppExitA(UINT uAction, LPCSTR lpMessageText);
__attribute__((dllimport)) void FatalAppExitW(UINT uAction, LPCWSTR lpMessageText);
__attribute__((dllimport)) void GetStartupInfoA(LPSTARTUPINFOA lpStartupInfo);
__attribute__((dllimport)) DWORD GetFirmwareEnvironmentVariableA(LPCSTR lpName, LPCSTR lpGuid, PVOID pBuffer, DWORD nSize);
__attribute__((dllimport)) DWORD GetFirmwareEnvironmentVariableW(LPCWSTR lpName, LPCWSTR lpGuid, PVOID pBuffer, DWORD nSize);
__attribute__((dllimport)) WINBOOL SetFirmwareEnvironmentVariableA(LPCSTR lpName, LPCSTR lpGuid, PVOID pValue, DWORD nSize);
__attribute__((dllimport)) WINBOOL SetFirmwareEnvironmentVariableW(LPCWSTR lpName, LPCWSTR lpGuid, PVOID pValue, DWORD nSize);
__attribute__((dllimport)) HRSRC FindResourceA(HMODULE hModule, LPCSTR lpName, LPCSTR lpType);
__attribute__((dllimport)) HRSRC FindResourceW(HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType);
__attribute__((dllimport)) HRSRC FindResourceExA(HMODULE hModule, LPCSTR lpType, LPCSTR lpName, WORD wLanguage);
__attribute__((dllimport)) WINBOOL EnumResourceTypesA(HMODULE hModule, ENUMRESTYPEPROCA lpEnumFunc, LONG_PTR lParam);
__attribute__((dllimport)) WINBOOL EnumResourceTypesW(HMODULE hModule, ENUMRESTYPEPROCW lpEnumFunc, LONG_PTR lParam);
__attribute__((dllimport)) WINBOOL EnumResourceNamesA(HMODULE hModule, LPCSTR lpType, ENUMRESNAMEPROCA lpEnumFunc, LONG_PTR lParam);
__attribute__((dllimport)) WINBOOL EnumResourceNamesW(HMODULE hModule, LPCWSTR lpType, ENUMRESNAMEPROCW lpEnumFunc, LONG_PTR lParam);
__attribute__((dllimport)) WINBOOL EnumResourceLanguagesA(HMODULE hModule, LPCSTR lpType, LPCSTR lpName, ENUMRESLANGPROCA lpEnumFunc, LONG_PTR lParam);
__attribute__((dllimport)) WINBOOL EnumResourceLanguagesW(HMODULE hModule, LPCWSTR lpType, LPCWSTR lpName, ENUMRESLANGPROCW lpEnumFunc, LONG_PTR lParam);
__attribute__((dllimport)) HANDLE BeginUpdateResourceA(LPCSTR pFileName, WINBOOL bDeleteExistingResources);
__attribute__((dllimport)) HANDLE BeginUpdateResourceW(LPCWSTR pFileName, WINBOOL bDeleteExistingResources);
__attribute__((dllimport)) WINBOOL UpdateResourceA(HANDLE hUpdate, LPCSTR lpType, LPCSTR lpName, WORD wLanguage, LPVOID lpData, DWORD cb);
__attribute__((dllimport)) WINBOOL UpdateResourceW(HANDLE hUpdate, LPCWSTR lpType, LPCWSTR lpName, WORD wLanguage, LPVOID lpData, DWORD cb);
__attribute__((dllimport)) WINBOOL EndUpdateResourceA(HANDLE hUpdate, WINBOOL fDiscard);
__attribute__((dllimport)) WINBOOL EndUpdateResourceW(HANDLE hUpdate, WINBOOL fDiscard);
__attribute__((dllimport)) ATOM GlobalAddAtomA(LPCSTR lpString);
__attribute__((dllimport)) ATOM GlobalAddAtomW(LPCWSTR lpString);
__attribute__((dllimport)) ATOM GlobalAddAtomExA(LPCSTR lpString, DWORD Flags);
__attribute__((dllimport)) ATOM GlobalAddAtomExW(LPCWSTR lpString, DWORD Flags);
__attribute__((dllimport)) ATOM GlobalFindAtomA(LPCSTR lpString);
__attribute__((dllimport)) ATOM GlobalFindAtomW(LPCWSTR lpString);
__attribute__((dllimport)) UINT GlobalGetAtomNameA(ATOM nAtom, LPSTR lpBuffer, int nSize);
__attribute__((dllimport)) UINT GlobalGetAtomNameW(ATOM nAtom, LPWSTR lpBuffer, int nSize);
__attribute__((dllimport)) ATOM AddAtomA(LPCSTR lpString);
__attribute__((dllimport)) ATOM AddAtomW(LPCWSTR lpString);
__attribute__((dllimport)) ATOM FindAtomA(LPCSTR lpString);
__attribute__((dllimport)) ATOM FindAtomW(LPCWSTR lpString);
__attribute__((dllimport)) UINT GetAtomNameA(ATOM nAtom, LPSTR lpBuffer, int nSize);
__attribute__((dllimport)) UINT GetAtomNameW(ATOM nAtom, LPWSTR lpBuffer, int nSize);
__attribute__((dllimport)) UINT GetProfileIntA(LPCSTR lpAppName, LPCSTR lpKeyName, INT nDefault);
__attribute__((dllimport)) UINT GetProfileIntW(LPCWSTR lpAppName, LPCWSTR lpKeyName, INT nDefault);
__attribute__((dllimport)) DWORD GetProfileStringA(LPCSTR lpAppName, LPCSTR lpKeyName, LPCSTR lpDefault, LPSTR lpReturnedString, DWORD nSize);
__attribute__((dllimport)) DWORD GetProfileStringW(LPCWSTR lpAppName, LPCWSTR lpKeyName, LPCWSTR lpDefault, LPWSTR lpReturnedString, DWORD nSize);
__attribute__((dllimport)) WINBOOL WriteProfileStringA(LPCSTR lpAppName, LPCSTR lpKeyName, LPCSTR lpString);
__attribute__((dllimport)) WINBOOL WriteProfileStringW(LPCWSTR lpAppName, LPCWSTR lpKeyName, LPCWSTR lpString);
__attribute__((dllimport)) DWORD GetProfileSectionA(LPCSTR lpAppName, LPSTR lpReturnedString, DWORD nSize);
__attribute__((dllimport)) DWORD GetProfileSectionW(LPCWSTR lpAppName, LPWSTR lpReturnedString, DWORD nSize);
__attribute__((dllimport)) WINBOOL WriteProfileSectionA(LPCSTR lpAppName, LPCSTR lpString);
__attribute__((dllimport)) WINBOOL WriteProfileSectionW(LPCWSTR lpAppName, LPCWSTR lpString);
__attribute__((dllimport)) UINT GetPrivateProfileIntA(LPCSTR lpAppName, LPCSTR lpKeyName, INT nDefault, LPCSTR lpFileName);
__attribute__((dllimport)) UINT GetPrivateProfileIntW(LPCWSTR lpAppName, LPCWSTR lpKeyName, INT nDefault, LPCWSTR lpFileName);
__attribute__((dllimport)) DWORD GetPrivateProfileStringA(LPCSTR lpAppName, LPCSTR lpKeyName, LPCSTR lpDefault, LPSTR lpReturnedString, DWORD nSize, LPCSTR lpFileName);
__attribute__((dllimport)) DWORD GetPrivateProfileStringW(LPCWSTR lpAppName, LPCWSTR lpKeyName, LPCWSTR lpDefault, LPWSTR lpReturnedString, DWORD nSize, LPCWSTR lpFileName);
__attribute__((dllimport)) WINBOOL WritePrivateProfileStringA(LPCSTR lpAppName, LPCSTR lpKeyName, LPCSTR lpString, LPCSTR lpFileName);
__attribute__((dllimport)) WINBOOL WritePrivateProfileStringW(LPCWSTR lpAppName, LPCWSTR lpKeyName, LPCWSTR lpString, LPCWSTR lpFileName);
__attribute__((dllimport)) DWORD GetPrivateProfileSectionA(LPCSTR lpAppName, LPSTR lpReturnedString, DWORD nSize, LPCSTR lpFileName);
__attribute__((dllimport)) DWORD GetPrivateProfileSectionW(LPCWSTR lpAppName, LPWSTR lpReturnedString, DWORD nSize, LPCWSTR lpFileName);
__attribute__((dllimport)) WINBOOL WritePrivateProfileSectionA(LPCSTR lpAppName, LPCSTR lpString, LPCSTR lpFileName);
__attribute__((dllimport)) WINBOOL WritePrivateProfileSectionW(LPCWSTR lpAppName, LPCWSTR lpString, LPCWSTR lpFileName);
__attribute__((dllimport)) DWORD GetPrivateProfileSectionNamesA(LPSTR lpszReturnBuffer, DWORD nSize, LPCSTR lpFileName);
__attribute__((dllimport)) DWORD GetPrivateProfileSectionNamesW(LPWSTR lpszReturnBuffer, DWORD nSize, LPCWSTR lpFileName);
__attribute__((dllimport)) WINBOOL GetPrivateProfileStructA(LPCSTR lpszSection, LPCSTR lpszKey, LPVOID lpStruct, UINT uSizeStruct, LPCSTR szFile);
__attribute__((dllimport)) WINBOOL GetPrivateProfileStructW(LPCWSTR lpszSection, LPCWSTR lpszKey, LPVOID lpStruct, UINT uSizeStruct, LPCWSTR szFile);
__attribute__((dllimport)) WINBOOL WritePrivateProfileStructA(LPCSTR lpszSection, LPCSTR lpszKey, LPVOID lpStruct, UINT uSizeStruct, LPCSTR szFile);
__attribute__((dllimport)) WINBOOL WritePrivateProfileStructW(LPCWSTR lpszSection, LPCWSTR lpszKey, LPVOID lpStruct, UINT uSizeStruct, LPCWSTR szFile);
__attribute__((dllimport)) UINT GetSystemWow64DirectoryA(LPSTR lpBuffer, UINT uSize);
__attribute__((dllimport)) UINT GetSystemWow64DirectoryW(LPWSTR lpBuffer, UINT uSize);
__attribute__((dllimport)) BOOLEAN Wow64EnableWow64FsRedirection(BOOLEAN Wow64FsEnableRedirection);
typedef UINT (*PGET_SYSTEM_WOW64_DIRECTORY_A)(LPSTR lpBuffer, UINT uSize);
typedef UINT (*PGET_SYSTEM_WOW64_DIRECTORY_W)(LPWSTR lpBuffer, UINT uSize);
__attribute__((dllimport)) WINBOOL SetDllDirectoryA(LPCSTR lpPathName);
__attribute__((dllimport)) WINBOOL SetDllDirectoryW(LPCWSTR lpPathName);
__attribute__((dllimport)) DWORD GetDllDirectoryA(DWORD nBufferLength, LPSTR lpBuffer);
__attribute__((dllimport)) DWORD GetDllDirectoryW(DWORD nBufferLength, LPWSTR lpBuffer);
__attribute__((dllimport)) WINBOOL SetSearchPathMode(DWORD Flags);
__attribute__((dllimport)) WINBOOL CreateDirectoryExA(LPCSTR lpTemplateDirectory, LPCSTR lpNewDirectory, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
__attribute__((dllimport)) WINBOOL CreateDirectoryExW(LPCWSTR lpTemplateDirectory, LPCWSTR lpNewDirectory, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
__attribute__((dllimport)) WINBOOL CreateDirectoryTransactedA(LPCSTR lpTemplateDirectory, LPCSTR lpNewDirectory, LPSECURITY_ATTRIBUTES lpSecurityAttributes, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL CreateDirectoryTransactedW(LPCWSTR lpTemplateDirectory, LPCWSTR lpNewDirectory, LPSECURITY_ATTRIBUTES lpSecurityAttributes, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL RemoveDirectoryTransactedA(LPCSTR lpPathName, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL RemoveDirectoryTransactedW(LPCWSTR lpPathName, HANDLE hTransaction);
__attribute__((dllimport)) DWORD GetFullPathNameTransactedA(LPCSTR lpFileName, DWORD nBufferLength, LPSTR lpBuffer, LPSTR *lpFilePart, HANDLE hTransaction);
__attribute__((dllimport)) DWORD GetFullPathNameTransactedW(LPCWSTR lpFileName, DWORD nBufferLength, LPWSTR lpBuffer, LPWSTR *lpFilePart, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL DefineDosDeviceA(DWORD dwFlags, LPCSTR lpDeviceName, LPCSTR lpTargetPath);
__attribute__((dllimport)) DWORD QueryDosDeviceA(LPCSTR lpDeviceName, LPSTR lpTargetPath, DWORD ucchMax);
__attribute__((dllimport)) HANDLE CreateFileTransactedA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile, HANDLE hTransaction, PUSHORT pusMiniVersion, PVOID lpExtendedParameter);
__attribute__((dllimport)) HANDLE CreateFileTransactedW(LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile, HANDLE hTransaction, PUSHORT pusMiniVersion, PVOID lpExtendedParameter);
__attribute__((dllimport)) HANDLE ReOpenFile(HANDLE hOriginalFile, DWORD dwDesiredAccess, DWORD dwShareMode, DWORD dwFlagsAndAttributes);
__attribute__((dllimport)) WINBOOL SetFileAttributesTransactedA(LPCSTR lpFileName, DWORD dwFileAttributes, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL SetFileAttributesTransactedW(LPCWSTR lpFileName, DWORD dwFileAttributes, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL GetFileAttributesTransactedA(LPCSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, LPVOID lpFileInformation, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL GetFileAttributesTransactedW(LPCWSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, LPVOID lpFileInformation, HANDLE hTransaction);
__attribute__((dllimport)) DWORD GetCompressedFileSizeA(LPCSTR lpFileName, LPDWORD lpFileSizeHigh);
__attribute__((dllimport)) DWORD GetCompressedFileSizeW(LPCWSTR lpFileName, LPDWORD lpFileSizeHigh);
__attribute__((dllimport)) DWORD GetCompressedFileSizeTransactedA(LPCSTR lpFileName, LPDWORD lpFileSizeHigh, HANDLE hTransaction);
__attribute__((dllimport)) DWORD GetCompressedFileSizeTransactedW(LPCWSTR lpFileName, LPDWORD lpFileSizeHigh, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL DeleteFileTransactedA(LPCSTR lpFileName, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL DeleteFileTransactedW(LPCWSTR lpFileName, HANDLE hTransaction);
typedef DWORD (*LPPROGRESS_ROUTINE)(LARGE_INTEGER TotalFileSize, LARGE_INTEGER TotalBytesTransferred, LARGE_INTEGER StreamSize, LARGE_INTEGER StreamBytesTransferred, DWORD dwStreamNumber, DWORD dwCallbackReason, HANDLE hSourceFile, HANDLE hDestinationFile, LPVOID lpData);
__attribute__((dllimport)) WINBOOL CopyFileExA(LPCSTR lpExistingFileName, LPCSTR lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, LPBOOL pbCancel, DWORD dwCopyFlags);
__attribute__((dllimport)) WINBOOL CopyFileExW(LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, LPBOOL pbCancel, DWORD dwCopyFlags);
__attribute__((dllimport)) WINBOOL CheckNameLegalDOS8Dot3A(LPCSTR lpName, LPSTR lpOemName, DWORD OemNameSize, PBOOL pbNameContainsSpaces, PBOOL pbNameLegal);
__attribute__((dllimport)) WINBOOL CheckNameLegalDOS8Dot3W(LPCWSTR lpName, LPSTR lpOemName, DWORD OemNameSize, PBOOL pbNameContainsSpaces, PBOOL pbNameLegal);
__attribute__((dllimport)) WINBOOL CopyFileA(LPCSTR lpExistingFileName, LPCSTR lpNewFileName, WINBOOL bFailIfExists);
__attribute__((dllimport)) WINBOOL CopyFileW(LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName, WINBOOL bFailIfExists);
__attribute__((dllimport)) HANDLE FindFirstFileTransactedA(LPCSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData, FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags, HANDLE hTransaction);
__attribute__((dllimport)) HANDLE FindFirstFileTransactedW(LPCWSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData, FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL CopyFileTransactedA(LPCSTR lpExistingFileName, LPCSTR lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, LPBOOL pbCancel, DWORD dwCopyFlags, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL CopyFileTransactedW(LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, LPBOOL pbCancel, DWORD dwCopyFlags, HANDLE hTransaction);
typedef enum _COPYFILE2_MESSAGE_TYPE
{
COPYFILE2_CALLBACK_NONE = 0,
COPYFILE2_CALLBACK_CHUNK_STARTED,
COPYFILE2_CALLBACK_CHUNK_FINISHED,
COPYFILE2_CALLBACK_STREAM_STARTED,
COPYFILE2_CALLBACK_STREAM_FINISHED,
COPYFILE2_CALLBACK_POLL_CONTINUE,
COPYFILE2_CALLBACK_ERROR,
COPYFILE2_CALLBACK_MAX,
} COPYFILE2_MESSAGE_TYPE;
typedef enum _COPYFILE2_MESSAGE_ACTION
{
COPYFILE2_PROGRESS_CONTINUE = 0,
COPYFILE2_PROGRESS_CANCEL,
COPYFILE2_PROGRESS_STOP,
COPYFILE2_PROGRESS_QUIET,
COPYFILE2_PROGRESS_PAUSE,
} COPYFILE2_MESSAGE_ACTION;
typedef enum _COPYFILE2_COPY_PHASE
{
COPYFILE2_PHASE_NONE = 0,
COPYFILE2_PHASE_PREPARE_SOURCE,
COPYFILE2_PHASE_PREPARE_DEST,
COPYFILE2_PHASE_READ_SOURCE,
COPYFILE2_PHASE_WRITE_DESTINATION,
COPYFILE2_PHASE_SERVER_COPY,
COPYFILE2_PHASE_NAMEGRAFT_COPY,
COPYFILE2_PHASE_MAX,
} COPYFILE2_COPY_PHASE;
typedef struct COPYFILE2_MESSAGE
{
COPYFILE2_MESSAGE_TYPE Type;
DWORD dwPadding;
union {
struct
{
DWORD dwStreamNumber;
DWORD dwReserved;
HANDLE hSourceFile;
HANDLE hDestinationFile;
ULARGE_INTEGER uliChunkNumber;
ULARGE_INTEGER uliChunkSize;
ULARGE_INTEGER uliStreamSize;
ULARGE_INTEGER uliTotalFileSize;
} ChunkStarted;
struct
{
DWORD dwStreamNumber;
DWORD dwFlags;
HANDLE hSourceFile;
HANDLE hDestinationFile;
ULARGE_INTEGER uliChunkNumber;
ULARGE_INTEGER uliChunkSize;
ULARGE_INTEGER uliStreamSize;
ULARGE_INTEGER uliStreamBytesTransferred;
ULARGE_INTEGER uliTotalFileSize;
ULARGE_INTEGER uliTotalBytesTransferred;
} ChunkFinished;
struct
{
DWORD dwStreamNumber;
DWORD dwReserved;
HANDLE hSourceFile;
HANDLE hDestinationFile;
ULARGE_INTEGER uliStreamSize;
ULARGE_INTEGER uliTotalFileSize;
} StreamStarted;
struct
{
DWORD dwStreamNumber;
DWORD dwReserved;
HANDLE hSourceFile;
HANDLE hDestinationFile;
ULARGE_INTEGER uliStreamSize;
ULARGE_INTEGER uliStreamBytesTransferred;
ULARGE_INTEGER uliTotalFileSize;
ULARGE_INTEGER uliTotalBytesTransferred;
} StreamFinished;
struct
{
DWORD dwReserved;
} PollContinue;
struct
{
COPYFILE2_COPY_PHASE CopyPhase;
DWORD dwStreamNumber;
HRESULT hrFailure;
DWORD dwReserved;
ULARGE_INTEGER uliChunkNumber;
ULARGE_INTEGER uliStreamSize;
ULARGE_INTEGER uliStreamBytesTransferred;
ULARGE_INTEGER uliTotalFileSize;
ULARGE_INTEGER uliTotalBytesTransferred;
} Error;
} Info;
} COPYFILE2_MESSAGE;
typedef COPYFILE2_MESSAGE_ACTION (*PCOPYFILE2_PROGRESS_ROUTINE)(const COPYFILE2_MESSAGE *pMessage, PVOID pvCallbackContext);
typedef struct COPYFILE2_EXTENDED_PARAMETERS
{
DWORD dwSize;
DWORD dwCopyFlags;
WINBOOL *pfCancel;
PCOPYFILE2_PROGRESS_ROUTINE pProgressRoutine;
PVOID pvCallbackContext;
} COPYFILE2_EXTENDED_PARAMETERS;
__attribute__((dllimport)) HRESULT CopyFile2(PCWSTR pwszExistingFileName, PCWSTR pwszNewFileName, COPYFILE2_EXTENDED_PARAMETERS *pExtendedParameters);
__attribute__((dllimport)) WINBOOL MoveFileA(LPCSTR lpExistingFileName, LPCSTR lpNewFileName);
__attribute__((dllimport)) WINBOOL MoveFileW(LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName);
__attribute__((dllimport)) WINBOOL MoveFileExA(LPCSTR lpExistingFileName, LPCSTR lpNewFileName, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL MoveFileExW(LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL MoveFileWithProgressA(LPCSTR lpExistingFileName, LPCSTR lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL MoveFileWithProgressW(LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL MoveFileTransactedA(LPCSTR lpExistingFileName, LPCSTR lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, DWORD dwFlags, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL MoveFileTransactedW(LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, DWORD dwFlags, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL GetNamedPipeClientComputerNameA(HANDLE Pipe, LPSTR ClientComputerName, ULONG ClientComputerNameLength);
__attribute__((dllimport)) WINBOOL GetNamedPipeHandleStateA(HANDLE hNamedPipe, LPDWORD lpState, LPDWORD lpCurInstances, LPDWORD lpMaxCollectionCount, LPDWORD lpCollectDataTimeout, LPSTR lpUserName, DWORD nMaxUserNameSize);
__attribute__((dllimport)) WINBOOL WaitNamedPipeA(LPCSTR lpNamedPipeName, DWORD nTimeOut);
__attribute__((dllimport)) WINBOOL CallNamedPipeA(LPCSTR lpNamedPipeName, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesRead, DWORD nTimeOut);
__attribute__((dllimport)) WINBOOL CallNamedPipeW(LPCWSTR lpNamedPipeName, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesRead, DWORD nTimeOut);
__attribute__((dllimport)) HANDLE CreateNamedPipeA(LPCSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
__attribute__((dllimport)) WINBOOL ReplaceFileA(LPCSTR lpReplacedFileName, LPCSTR lpReplacementFileName, LPCSTR lpBackupFileName, DWORD dwReplaceFlags, LPVOID lpExclude, LPVOID lpReserved);
__attribute__((dllimport)) WINBOOL ReplaceFileW(LPCWSTR lpReplacedFileName, LPCWSTR lpReplacementFileName, LPCWSTR lpBackupFileName, DWORD dwReplaceFlags, LPVOID lpExclude, LPVOID lpReserved);
__attribute__((dllimport)) WINBOOL CreateHardLinkA(LPCSTR lpFileName, LPCSTR lpExistingFileName, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
__attribute__((dllimport)) WINBOOL CreateHardLinkW(LPCWSTR lpFileName, LPCWSTR lpExistingFileName, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
__attribute__((dllimport)) WINBOOL CreateHardLinkTransactedA(LPCSTR lpFileName, LPCSTR lpExistingFileName, LPSECURITY_ATTRIBUTES lpSecurityAttributes, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL CreateHardLinkTransactedW(LPCWSTR lpFileName, LPCWSTR lpExistingFileName, LPSECURITY_ATTRIBUTES lpSecurityAttributes, HANDLE hTransaction);
typedef enum _STREAM_INFO_LEVELS
{
FindStreamInfoStandard,
FindStreamInfoMaxInfoLevel
} STREAM_INFO_LEVELS;
typedef struct _WIN32_FIND_STREAM_DATA
{
LARGE_INTEGER StreamSize;
WCHAR cStreamName[260 + 36];
} WIN32_FIND_STREAM_DATA, *PWIN32_FIND_STREAM_DATA;
__attribute__((dllimport)) HANDLE FindFirstStreamW(LPCWSTR lpFileName, STREAM_INFO_LEVELS InfoLevel, LPVOID lpFindStreamData, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL FindNextStreamW(HANDLE hFindStream, LPVOID lpFindStreamData);
__attribute__((dllimport)) HANDLE FindFirstStreamTransactedW(LPCWSTR lpFileName, STREAM_INFO_LEVELS InfoLevel, LPVOID lpFindStreamData, DWORD dwFlags, HANDLE hTransaction);
__attribute__((dllimport)) HANDLE FindFirstFileNameW(LPCWSTR lpFileName, DWORD dwFlags, LPDWORD StringLength, PWSTR LinkName);
__attribute__((dllimport)) WINBOOL FindNextFileNameW(HANDLE hFindStream, LPDWORD StringLength, PWSTR LinkName);
__attribute__((dllimport)) HANDLE FindFirstFileNameTransactedW(LPCWSTR lpFileName, DWORD dwFlags, LPDWORD StringLength, PWSTR LinkName, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL GetNamedPipeClientProcessId(HANDLE Pipe, PULONG ClientProcessId);
__attribute__((dllimport)) WINBOOL GetNamedPipeClientSessionId(HANDLE Pipe, PULONG ClientSessionId);
__attribute__((dllimport)) WINBOOL GetNamedPipeServerProcessId(HANDLE Pipe, PULONG ServerProcessId);
__attribute__((dllimport)) WINBOOL GetNamedPipeServerSessionId(HANDLE Pipe, PULONG ServerSessionId);
__attribute__((dllimport)) WINBOOL SetFileBandwidthReservation(HANDLE hFile, DWORD nPeriodMilliseconds, DWORD nBytesPerPeriod, WINBOOL bDiscardable, LPDWORD lpTransferSize, LPDWORD lpNumOutstandingRequests);
__attribute__((dllimport)) WINBOOL GetFileBandwidthReservation(HANDLE hFile, LPDWORD lpPeriodMilliseconds, LPDWORD lpBytesPerPeriod, LPBOOL pDiscardable, LPDWORD lpTransferSize, LPDWORD lpNumOutstandingRequests);
__attribute__((dllimport)) WINBOOL GetNamedPipeHandleStateW(HANDLE hNamedPipe, LPDWORD lpState, LPDWORD lpCurInstances, LPDWORD lpMaxCollectionCount, LPDWORD lpCollectDataTimeout, LPWSTR lpUserName, DWORD nMaxUserNameSize);
__attribute__((dllimport)) WINBOOL SetVolumeLabelA(LPCSTR lpRootPathName, LPCSTR lpVolumeName);
__attribute__((dllimport)) WINBOOL SetVolumeLabelW(LPCWSTR lpRootPathName, LPCWSTR lpVolumeName);
__attribute__((dllimport)) void SetFileApisToOEM(void);
__attribute__((dllimport)) void SetFileApisToANSI(void);
__attribute__((dllimport)) WINBOOL AreFileApisANSI(void);
__attribute__((dllimport)) WINBOOL GetVolumeInformationA(LPCSTR lpRootPathName, LPSTR lpVolumeNameBuffer, DWORD nVolumeNameSize, LPDWORD lpVolumeSerialNumber, LPDWORD lpMaximumComponentLength, LPDWORD lpFileSystemFlags, LPSTR lpFileSystemNameBuffer, DWORD nFileSystemNameSize);
__attribute__((dllimport)) WINBOOL ClearEventLogA(HANDLE hEventLog, LPCSTR lpBackupFileName);
__attribute__((dllimport)) WINBOOL ClearEventLogW(HANDLE hEventLog, LPCWSTR lpBackupFileName);
__attribute__((dllimport)) WINBOOL BackupEventLogA(HANDLE hEventLog, LPCSTR lpBackupFileName);
__attribute__((dllimport)) WINBOOL BackupEventLogW(HANDLE hEventLog, LPCWSTR lpBackupFileName);
__attribute__((dllimport)) WINBOOL CloseEventLog(HANDLE hEventLog);
__attribute__((dllimport)) WINBOOL DeregisterEventSource(HANDLE hEventLog);
__attribute__((dllimport)) WINBOOL NotifyChangeEventLog(HANDLE hEventLog, HANDLE hEvent);
__attribute__((dllimport)) WINBOOL GetNumberOfEventLogRecords(HANDLE hEventLog, PDWORD NumberOfRecords);
__attribute__((dllimport)) WINBOOL GetOldestEventLogRecord(HANDLE hEventLog, PDWORD OldestRecord);
__attribute__((dllimport)) HANDLE OpenEventLogA(LPCSTR lpUNCServerName, LPCSTR lpSourceName);
__attribute__((dllimport)) HANDLE OpenEventLogW(LPCWSTR lpUNCServerName, LPCWSTR lpSourceName);
__attribute__((dllimport)) HANDLE RegisterEventSourceA(LPCSTR lpUNCServerName, LPCSTR lpSourceName);
__attribute__((dllimport)) HANDLE RegisterEventSourceW(LPCWSTR lpUNCServerName, LPCWSTR lpSourceName);
__attribute__((dllimport)) HANDLE OpenBackupEventLogA(LPCSTR lpUNCServerName, LPCSTR lpFileName);
__attribute__((dllimport)) HANDLE OpenBackupEventLogW(LPCWSTR lpUNCServerName, LPCWSTR lpFileName);
__attribute__((dllimport)) WINBOOL ReadEventLogA(HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded);
__attribute__((dllimport)) WINBOOL ReadEventLogW(HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded);
__attribute__((dllimport)) WINBOOL ReportEventA(HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID, PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData);
__attribute__((dllimport)) WINBOOL ReportEventW(HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID, PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCWSTR *lpStrings, LPVOID lpRawData);
typedef struct _EVENTLOG_FULL_INFORMATION
{
DWORD dwFull;
} EVENTLOG_FULL_INFORMATION, *LPEVENTLOG_FULL_INFORMATION;
__attribute__((dllimport)) WINBOOL GetEventLogInformation(HANDLE hEventLog, DWORD dwInfoLevel, LPVOID lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded);
__attribute__((dllimport)) WINBOOL ReadDirectoryChangesW(HANDLE hDirectory, LPVOID lpBuffer, DWORD nBufferLength, WINBOOL bWatchSubtree, DWORD dwNotifyFilter, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped, LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
__attribute__((dllimport)) WINBOOL AccessCheckAndAuditAlarmA(LPCSTR SubsystemName, LPVOID HandleId, LPSTR ObjectTypeName, LPSTR ObjectName, PSECURITY_DESCRIPTOR SecurityDescriptor, DWORD DesiredAccess, PGENERIC_MAPPING GenericMapping, WINBOOL ObjectCreation, LPDWORD GrantedAccess, LPBOOL AccessStatus, LPBOOL pfGenerateOnClose);
__attribute__((dllimport)) WINBOOL AccessCheckByTypeAndAuditAlarmA(LPCSTR SubsystemName, LPVOID HandleId, LPCSTR ObjectTypeName, LPCSTR ObjectName, PSECURITY_DESCRIPTOR SecurityDescriptor, PSID PrincipalSelfSid, DWORD DesiredAccess, AUDIT_EVENT_TYPE AuditType, DWORD Flags, POBJECT_TYPE_LIST ObjectTypeList, DWORD ObjectTypeListLength, PGENERIC_MAPPING GenericMapping, WINBOOL ObjectCreation, LPDWORD GrantedAccess, LPBOOL AccessStatus, LPBOOL pfGenerateOnClose);
__attribute__((dllimport)) WINBOOL AccessCheckByTypeResultListAndAuditAlarmA(LPCSTR SubsystemName, LPVOID HandleId, LPCSTR ObjectTypeName, LPCSTR ObjectName, PSECURITY_DESCRIPTOR SecurityDescriptor, PSID PrincipalSelfSid, DWORD DesiredAccess, AUDIT_EVENT_TYPE AuditType, DWORD Flags, POBJECT_TYPE_LIST ObjectTypeList, DWORD ObjectTypeListLength, PGENERIC_MAPPING GenericMapping, WINBOOL ObjectCreation, LPDWORD GrantedAccess, LPDWORD AccessStatusList, LPBOOL pfGenerateOnClose);
__attribute__((dllimport)) WINBOOL AccessCheckByTypeResultListAndAuditAlarmByHandleA(LPCSTR SubsystemName, LPVOID HandleId, HANDLE ClientToken, LPCSTR ObjectTypeName, LPCSTR ObjectName, PSECURITY_DESCRIPTOR SecurityDescriptor, PSID PrincipalSelfSid, DWORD DesiredAccess, AUDIT_EVENT_TYPE AuditType, DWORD Flags, POBJECT_TYPE_LIST ObjectTypeList, DWORD ObjectTypeListLength, PGENERIC_MAPPING GenericMapping, WINBOOL ObjectCreation, LPDWORD GrantedAccess, LPDWORD AccessStatusList, LPBOOL pfGenerateOnClose);
__attribute__((dllimport)) WINBOOL ObjectOpenAuditAlarmA(LPCSTR SubsystemName, LPVOID HandleId, LPSTR ObjectTypeName, LPSTR ObjectName, PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE ClientToken, DWORD DesiredAccess, DWORD GrantedAccess, PPRIVILEGE_SET Privileges, WINBOOL ObjectCreation, WINBOOL AccessGranted, LPBOOL GenerateOnClose);
__attribute__((dllimport)) WINBOOL ObjectPrivilegeAuditAlarmA(LPCSTR SubsystemName, LPVOID HandleId, HANDLE ClientToken, DWORD DesiredAccess, PPRIVILEGE_SET Privileges, WINBOOL AccessGranted);
__attribute__((dllimport)) WINBOOL ObjectCloseAuditAlarmA(LPCSTR SubsystemName, LPVOID HandleId, WINBOOL GenerateOnClose);
__attribute__((dllimport)) WINBOOL ObjectDeleteAuditAlarmA(LPCSTR SubsystemName, LPVOID HandleId, WINBOOL GenerateOnClose);
__attribute__((dllimport)) WINBOOL PrivilegedServiceAuditAlarmA(LPCSTR SubsystemName, LPCSTR ServiceName, HANDLE ClientToken, PPRIVILEGE_SET Privileges, WINBOOL AccessGranted);
__attribute__((dllimport)) WINBOOL SetFileSecurityA(LPCSTR lpFileName, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor);
__attribute__((dllimport)) WINBOOL GetFileSecurityA(LPCSTR lpFileName, SECURITY_INFORMATION RequestedInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD nLength, LPDWORD lpnLengthNeeded);
__attribute__((dllimport)) WINBOOL IsBadReadPtr(const void *lp, UINT_PTR ucb);
__attribute__((dllimport)) WINBOOL IsBadWritePtr(LPVOID lp, UINT_PTR ucb);
__attribute__((dllimport)) WINBOOL IsBadHugeReadPtr(const void *lp, UINT_PTR ucb);
__attribute__((dllimport)) WINBOOL IsBadHugeWritePtr(LPVOID lp, UINT_PTR ucb);
__attribute__((dllimport)) WINBOOL IsBadCodePtr(FARPROC lpfn);
__attribute__((dllimport)) WINBOOL IsBadStringPtrA(LPCSTR lpsz, UINT_PTR ucchMax);
__attribute__((dllimport)) WINBOOL IsBadStringPtrW(LPCWSTR lpsz, UINT_PTR ucchMax);
__attribute__((dllimport)) LPVOID MapViewOfFileExNuma(HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOffsetHigh, DWORD dwFileOffsetLow, SIZE_T dwNumberOfBytesToMap, LPVOID lpBaseAddress, DWORD nndPreferred);
__attribute__((dllimport)) WINBOOL AddConditionalAce(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, UCHAR AceType, DWORD AccessMask, PSID pSid, PWCHAR ConditionStr, DWORD *ReturnLength);
__attribute__((dllimport)) WINBOOL LookupAccountSidA(LPCSTR lpSystemName, PSID Sid, LPSTR Name, LPDWORD cchName, LPSTR ReferencedDomainName, LPDWORD cchReferencedDomainName, PSID_NAME_USE peUse);
__attribute__((dllimport)) WINBOOL LookupAccountSidW(LPCWSTR lpSystemName, PSID Sid, LPWSTR Name, LPDWORD cchName, LPWSTR ReferencedDomainName, LPDWORD cchReferencedDomainName, PSID_NAME_USE peUse);
__attribute__((dllimport)) WINBOOL LookupAccountNameA(LPCSTR lpSystemName, LPCSTR lpAccountName, PSID Sid, LPDWORD cbSid, LPSTR ReferencedDomainName, LPDWORD cchReferencedDomainName, PSID_NAME_USE peUse);
__attribute__((dllimport)) WINBOOL LookupAccountNameW(LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSID Sid, LPDWORD cbSid, LPWSTR ReferencedDomainName, LPDWORD cchReferencedDomainName, PSID_NAME_USE peUse);
__attribute__((dllimport)) WINBOOL LookupAccountNameLocalA(LPCSTR lpAccountName, PSID Sid, LPDWORD cbSid, LPSTR ReferencedDomainName, LPDWORD cchReferencedDomainName, PSID_NAME_USE peUse);
__attribute__((dllimport)) WINBOOL LookupAccountNameLocalW(LPCWSTR lpAccountName, PSID Sid, LPDWORD cbSid, LPWSTR ReferencedDomainName, LPDWORD cchReferencedDomainName, PSID_NAME_USE peUse);
__attribute__((dllimport)) WINBOOL LookupAccountSidLocalA(PSID Sid, LPSTR Name, LPDWORD cchName, LPSTR ReferencedDomainName, LPDWORD cchReferencedDomainName, PSID_NAME_USE peUse);
__attribute__((dllimport)) WINBOOL LookupAccountSidLocalW(PSID Sid, LPWSTR Name, LPDWORD cchName, LPWSTR ReferencedDomainName, LPDWORD cchReferencedDomainName, PSID_NAME_USE peUse);
__attribute__((dllimport)) WINBOOL LookupPrivilegeValueA(LPCSTR lpSystemName, LPCSTR lpName, PLUID lpLuid);
__attribute__((dllimport)) WINBOOL LookupPrivilegeValueW(LPCWSTR lpSystemName, LPCWSTR lpName, PLUID lpLuid);
__attribute__((dllimport)) WINBOOL LookupPrivilegeNameA(LPCSTR lpSystemName, PLUID lpLuid, LPSTR lpName, LPDWORD cchName);
__attribute__((dllimport)) WINBOOL LookupPrivilegeNameW(LPCWSTR lpSystemName, PLUID lpLuid, LPWSTR lpName, LPDWORD cchName);
__attribute__((dllimport)) WINBOOL LookupPrivilegeDisplayNameA(LPCSTR lpSystemName, LPCSTR lpName, LPSTR lpDisplayName, LPDWORD cchDisplayName, LPDWORD lpLanguageId);
__attribute__((dllimport)) WINBOOL LookupPrivilegeDisplayNameW(LPCWSTR lpSystemName, LPCWSTR lpName, LPWSTR lpDisplayName, LPDWORD cchDisplayName, LPDWORD lpLanguageId);
__attribute__((dllimport)) WINBOOL BuildCommDCBA(LPCSTR lpDef, LPDCB lpDCB);
__attribute__((dllimport)) WINBOOL BuildCommDCBW(LPCWSTR lpDef, LPDCB lpDCB);
__attribute__((dllimport)) WINBOOL BuildCommDCBAndTimeoutsA(LPCSTR lpDef, LPDCB lpDCB, LPCOMMTIMEOUTS lpCommTimeouts);
__attribute__((dllimport)) WINBOOL BuildCommDCBAndTimeoutsW(LPCWSTR lpDef, LPDCB lpDCB, LPCOMMTIMEOUTS lpCommTimeouts);
__attribute__((dllimport)) WINBOOL CommConfigDialogA(LPCSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC);
__attribute__((dllimport)) WINBOOL CommConfigDialogW(LPCWSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC);
__attribute__((dllimport)) WINBOOL GetDefaultCommConfigA(LPCSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize);
__attribute__((dllimport)) WINBOOL GetDefaultCommConfigW(LPCWSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize);
__attribute__((dllimport)) WINBOOL SetDefaultCommConfigA(LPCSTR lpszName, LPCOMMCONFIG lpCC, DWORD dwSize);
__attribute__((dllimport)) WINBOOL SetDefaultCommConfigW(LPCWSTR lpszName, LPCOMMCONFIG lpCC, DWORD dwSize);
__attribute__((dllimport)) WINBOOL GetComputerNameA(LPSTR lpBuffer, LPDWORD nSize);
__attribute__((dllimport)) WINBOOL GetComputerNameW(LPWSTR lpBuffer, LPDWORD nSize);
__attribute__((dllimport)) WINBOOL SetComputerNameA(LPCSTR lpComputerName);
__attribute__((dllimport)) WINBOOL SetComputerNameW(LPCWSTR lpComputerName);
__attribute__((dllimport)) WINBOOL SetComputerNameExA(COMPUTER_NAME_FORMAT NameType, LPCTSTR lpBuffer);
__attribute__((dllimport)) WINBOOL DnsHostnameToComputerNameA(LPCSTR Hostname, LPSTR ComputerName, LPDWORD nSize);
__attribute__((dllimport)) WINBOOL DnsHostnameToComputerNameW(LPCWSTR Hostname, LPWSTR ComputerName, LPDWORD nSize);
__attribute__((dllimport)) WINBOOL GetUserNameA(LPSTR lpBuffer, LPDWORD pcbBuffer);
__attribute__((dllimport)) WINBOOL GetUserNameW(LPWSTR lpBuffer, LPDWORD pcbBuffer);
__attribute__((dllimport)) WINBOOL LogonUserA(LPCSTR lpszUsername, LPCSTR lpszDomain, LPCSTR lpszPassword, DWORD dwLogonType, DWORD dwLogonProvider, PHANDLE phToken);
__attribute__((dllimport)) WINBOOL LogonUserW(LPCWSTR lpszUsername, LPCWSTR lpszDomain, LPCWSTR lpszPassword, DWORD dwLogonType, DWORD dwLogonProvider, PHANDLE phToken);
__attribute__((dllimport)) WINBOOL LogonUserExA(LPCSTR lpszUsername, LPCSTR lpszDomain, LPCSTR lpszPassword, DWORD dwLogonType, DWORD dwLogonProvider, PHANDLE phToken, PSID *ppLogonSid, PVOID *ppProfileBuffer, LPDWORD pdwProfileLength, PQUOTA_LIMITS pQuotaLimits);
__attribute__((dllimport)) WINBOOL LogonUserExW(LPCWSTR lpszUsername, LPCWSTR lpszDomain, LPCWSTR lpszPassword, DWORD dwLogonType, DWORD dwLogonProvider, PHANDLE phToken, PSID *ppLogonSid, PVOID *ppProfileBuffer, LPDWORD pdwProfileLength, PQUOTA_LIMITS pQuotaLimits);
__attribute__((dllimport)) WINBOOL CreateProcessAsUserA(HANDLE hToken, LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, WINBOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation);
__attribute__((dllimport)) WINBOOL CreateProcessWithLogonW(LPCWSTR lpUsername, LPCWSTR lpDomain, LPCWSTR lpPassword, DWORD dwLogonFlags, LPCWSTR lpApplicationName, LPWSTR lpCommandLine, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation);
__attribute__((dllimport)) WINBOOL CreateProcessWithTokenW(HANDLE hToken, DWORD dwLogonFlags, LPCWSTR lpApplicationName, LPWSTR lpCommandLine, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation);
__attribute__((dllimport)) WINBOOL IsTokenUntrusted(HANDLE TokenHandle);
__attribute__((dllimport)) WINBOOL RegisterWaitForSingleObject(PHANDLE phNewWaitObject, HANDLE hObject, WAITORTIMERCALLBACK Callback, PVOID Context, ULONG dwMilliseconds, ULONG dwFlags);
__attribute__((dllimport)) WINBOOL UnregisterWait(HANDLE WaitHandle);
__attribute__((dllimport)) WINBOOL BindIoCompletionCallback(HANDLE FileHandle, LPOVERLAPPED_COMPLETION_ROUTINE Function, ULONG Flags);
__attribute__((dllimport)) HANDLE SetTimerQueueTimer(HANDLE TimerQueue, WAITORTIMERCALLBACK Callback, PVOID Parameter, DWORD DueTime, DWORD Period, WINBOOL PreferIo);
__attribute__((dllimport)) WINBOOL CancelTimerQueueTimer(HANDLE TimerQueue, HANDLE Timer);
__attribute__((dllimport)) WINBOOL DeleteTimerQueue(HANDLE TimerQueue);
__attribute__((dllimport)) HANDLE CreatePrivateNamespaceA(LPSECURITY_ATTRIBUTES lpPrivateNamespaceAttributes, LPVOID lpBoundaryDescriptor, LPCSTR lpAliasPrefix);
__attribute__((dllimport)) HANDLE OpenPrivateNamespaceA(LPVOID lpBoundaryDescriptor, LPCSTR lpAliasPrefix);
__attribute__((dllimport)) HANDLE CreateBoundaryDescriptorA(LPCSTR Name, ULONG Flags);
__attribute__((dllimport)) WINBOOL AddIntegrityLabelToBoundaryDescriptor(HANDLE *BoundaryDescriptor, PSID IntegrityLabel);
typedef struct tagHW_PROFILE_INFOA
{
DWORD dwDockInfo;
CHAR szHwProfileGuid[39];
CHAR szHwProfileName[80];
} HW_PROFILE_INFOA, *LPHW_PROFILE_INFOA;
typedef struct tagHW_PROFILE_INFOW
{
DWORD dwDockInfo;
WCHAR szHwProfileGuid[39];
WCHAR szHwProfileName[80];
} HW_PROFILE_INFOW, *LPHW_PROFILE_INFOW;
typedef HW_PROFILE_INFOW HW_PROFILE_INFO;
typedef LPHW_PROFILE_INFOW LPHW_PROFILE_INFO;
__attribute__((dllimport)) WINBOOL GetCurrentHwProfileA(LPHW_PROFILE_INFOA lpHwProfileInfo);
__attribute__((dllimport)) WINBOOL GetCurrentHwProfileW(LPHW_PROFILE_INFOW lpHwProfileInfo);
__attribute__((dllimport)) WINBOOL VerifyVersionInfoA(LPOSVERSIONINFOEXA lpVersionInformation, DWORD dwTypeMask, DWORDLONG dwlConditionMask);
__attribute__((dllimport)) WINBOOL VerifyVersionInfoW(LPOSVERSIONINFOEXW lpVersionInformation, DWORD dwTypeMask, DWORDLONG dwlConditionMask);
typedef struct _TIME_ZONE_INFORMATION
{
LONG Bias;
WCHAR StandardName[32];
SYSTEMTIME StandardDate;
LONG StandardBias;
WCHAR DaylightName[32];
SYSTEMTIME DaylightDate;
LONG DaylightBias;
} TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
typedef struct _TIME_DYNAMIC_ZONE_INFORMATION
{
LONG Bias;
WCHAR StandardName[32];
SYSTEMTIME StandardDate;
LONG StandardBias;
WCHAR DaylightName[32];
SYSTEMTIME DaylightDate;
LONG DaylightBias;
WCHAR TimeZoneKeyName[128];
BOOLEAN DynamicDaylightTimeDisabled;
} DYNAMIC_TIME_ZONE_INFORMATION, *PDYNAMIC_TIME_ZONE_INFORMATION;
__attribute__((dllimport)) WINBOOL SystemTimeToTzSpecificLocalTime(const TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpUniversalTime, LPSYSTEMTIME lpLocalTime);
__attribute__((dllimport)) WINBOOL TzSpecificLocalTimeToSystemTime(const TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpLocalTime, LPSYSTEMTIME lpUniversalTime);
__attribute__((dllimport)) WINBOOL FileTimeToSystemTime(const FILETIME *lpFileTime, LPSYSTEMTIME lpSystemTime);
__attribute__((dllimport)) WINBOOL SystemTimeToFileTime(const SYSTEMTIME *lpSystemTime, LPFILETIME lpFileTime);
__attribute__((dllimport)) DWORD GetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZoneInformation);
__attribute__((dllimport)) DWORD GetDynamicTimeZoneInformation(PDYNAMIC_TIME_ZONE_INFORMATION pTimeZoneInformation);
WINBOOL GetTimeZoneInformationForYear(USHORT wYear, PDYNAMIC_TIME_ZONE_INFORMATION pdtzi, LPTIME_ZONE_INFORMATION ptzi);
__attribute__((dllimport)) WINBOOL SetTimeZoneInformation(const TIME_ZONE_INFORMATION *lpTimeZoneInformation);
__attribute__((dllimport)) WINBOOL SetDynamicTimeZoneInformation(const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation);
typedef struct _SYSTEM_POWER_STATUS
{
BYTE ACLineStatus;
BYTE BatteryFlag;
BYTE BatteryLifePercent;
BYTE Reserved1;
DWORD BatteryLifeTime;
DWORD BatteryFullLifeTime;
} SYSTEM_POWER_STATUS, *LPSYSTEM_POWER_STATUS;
__attribute__((dllimport)) WINBOOL GetSystemPowerStatus(LPSYSTEM_POWER_STATUS lpSystemPowerStatus);
__attribute__((dllimport)) WINBOOL SetSystemPowerState(WINBOOL fSuspend, WINBOOL fForce);
__attribute__((dllimport)) WINBOOL AllocateUserPhysicalPages(HANDLE hProcess, PULONG_PTR NumberOfPages, PULONG_PTR PageArray);
__attribute__((dllimport)) WINBOOL FreeUserPhysicalPages(HANDLE hProcess, PULONG_PTR NumberOfPages, PULONG_PTR PageArray);
__attribute__((dllimport)) WINBOOL MapUserPhysicalPages(PVOID VirtualAddress, ULONG_PTR NumberOfPages, PULONG_PTR PageArray);
__attribute__((dllimport)) WINBOOL MapUserPhysicalPagesScatter(PVOID *VirtualAddresses, ULONG_PTR NumberOfPages, PULONG_PTR PageArray);
__attribute__((dllimport)) HANDLE CreateJobObjectA(LPSECURITY_ATTRIBUTES lpJobAttributes, LPCSTR lpName);
__attribute__((dllimport)) HANDLE CreateJobObjectW(LPSECURITY_ATTRIBUTES lpJobAttributes, LPCWSTR lpName);
__attribute__((dllimport)) HANDLE OpenJobObjectA(DWORD dwDesiredAccess, WINBOOL bInheritHandle, LPCSTR lpName);
__attribute__((dllimport)) HANDLE OpenJobObjectW(DWORD dwDesiredAccess, WINBOOL bInheritHandle, LPCWSTR lpName);
__attribute__((dllimport)) WINBOOL AssignProcessToJobObject(HANDLE hJob, HANDLE hProcess);
__attribute__((dllimport)) WINBOOL TerminateJobObject(HANDLE hJob, UINT uExitCode);
__attribute__((dllimport)) WINBOOL QueryInformationJobObject(HANDLE hJob, JOBOBJECTINFOCLASS JobObjectInformationClass, LPVOID lpJobObjectInformation, DWORD cbJobObjectInformationLength, LPDWORD lpReturnLength);
__attribute__((dllimport)) WINBOOL SetInformationJobObject(HANDLE hJob, JOBOBJECTINFOCLASS JobObjectInformationClass, LPVOID lpJobObjectInformation, DWORD cbJobObjectInformationLength);
__attribute__((dllimport)) WINBOOL CreateJobSet(ULONG NumJob, PJOB_SET_ARRAY UserJobSet, ULONG Flags);
__attribute__((dllimport)) HANDLE FindFirstVolumeA(LPSTR lpszVolumeName, DWORD cchBufferLength);
__attribute__((dllimport)) WINBOOL FindNextVolumeA(HANDLE hFindVolume, LPSTR lpszVolumeName, DWORD cchBufferLength);
__attribute__((dllimport)) HANDLE FindFirstVolumeMountPointA(LPCSTR lpszRootPathName, LPSTR lpszVolumeMountPoint, DWORD cchBufferLength);
__attribute__((dllimport)) HANDLE FindFirstVolumeMountPointW(LPCWSTR lpszRootPathName, LPWSTR lpszVolumeMountPoint, DWORD cchBufferLength);
__attribute__((dllimport)) WINBOOL FindNextVolumeMountPointA(HANDLE hFindVolumeMountPoint, LPSTR lpszVolumeMountPoint, DWORD cchBufferLength);
__attribute__((dllimport)) WINBOOL FindNextVolumeMountPointW(HANDLE hFindVolumeMountPoint, LPWSTR lpszVolumeMountPoint, DWORD cchBufferLength);
__attribute__((dllimport)) WINBOOL FindVolumeMountPointClose(HANDLE hFindVolumeMountPoint);
__attribute__((dllimport)) WINBOOL SetVolumeMountPointA(LPCSTR lpszVolumeMountPoint, LPCSTR lpszVolumeName);
__attribute__((dllimport)) WINBOOL SetVolumeMountPointW(LPCWSTR lpszVolumeMountPoint, LPCWSTR lpszVolumeName);
__attribute__((dllimport)) WINBOOL DeleteVolumeMountPointA(LPCSTR lpszVolumeMountPoint);
__attribute__((dllimport)) WINBOOL GetVolumeNameForVolumeMountPointA(LPCSTR lpszVolumeMountPoint, LPSTR lpszVolumeName, DWORD cchBufferLength);
__attribute__((dllimport)) WINBOOL GetVolumePathNameA(LPCSTR lpszFileName, LPSTR lpszVolumePathName, DWORD cchBufferLength);
__attribute__((dllimport)) WINBOOL GetVolumePathNamesForVolumeNameA(LPCSTR lpszVolumeName, LPCH lpszVolumePathNames, DWORD cchBufferLength, PDWORD lpcchReturnLength);
__attribute__((dllimport)) WINBOOL AllocateUserPhysicalPagesNuma(HANDLE hProcess, PULONG_PTR NumberOfPages, PULONG_PTR PageArray, DWORD nndPreferred);
typedef struct tagACTCTXA
{
ULONG cbSize;
DWORD dwFlags;
LPCSTR lpSource;
USHORT wProcessorArchitecture;
LANGID wLangId;
LPCSTR lpAssemblyDirectory;
LPCSTR lpResourceName;
LPCSTR lpApplicationName;
HMODULE hModule;
} ACTCTXA, *PACTCTXA;
typedef struct tagACTCTXW
{
ULONG cbSize;
DWORD dwFlags;
LPCWSTR lpSource;
USHORT wProcessorArchitecture;
LANGID wLangId;
LPCWSTR lpAssemblyDirectory;
LPCWSTR lpResourceName;
LPCWSTR lpApplicationName;
HMODULE hModule;
} ACTCTXW, *PACTCTXW;
typedef ACTCTXW ACTCTX;
typedef PACTCTXW PACTCTX;
typedef const ACTCTXA *PCACTCTXA;
typedef const ACTCTXW *PCACTCTXW;
typedef PCACTCTXW PCACTCTX;
__attribute__((dllimport)) HANDLE CreateActCtxA(PCACTCTXA pActCtx);
__attribute__((dllimport)) HANDLE CreateActCtxW(PCACTCTXW pActCtx);
__attribute__((dllimport)) void AddRefActCtx(HANDLE hActCtx);
__attribute__((dllimport)) void ReleaseActCtx(HANDLE hActCtx);
__attribute__((dllimport)) WINBOOL ZombifyActCtx(HANDLE hActCtx);
__attribute__((dllimport)) WINBOOL ActivateActCtx(HANDLE hActCtx, ULONG_PTR *lpCookie);
__attribute__((dllimport)) WINBOOL DeactivateActCtx(DWORD dwFlags, ULONG_PTR ulCookie);
__attribute__((dllimport)) WINBOOL GetCurrentActCtx(HANDLE *lphActCtx);
typedef struct tagACTCTX_SECTION_KEYED_DATA_2600
{
ULONG cbSize;
ULONG ulDataFormatVersion;
PVOID lpData;
ULONG ulLength;
PVOID lpSectionGlobalData;
ULONG ulSectionGlobalDataLength;
PVOID lpSectionBase;
ULONG ulSectionTotalLength;
HANDLE hActCtx;
ULONG ulAssemblyRosterIndex;
} ACTCTX_SECTION_KEYED_DATA_2600, *PACTCTX_SECTION_KEYED_DATA_2600;
typedef const ACTCTX_SECTION_KEYED_DATA_2600 *PCACTCTX_SECTION_KEYED_DATA_2600;
typedef struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA
{
PVOID lpInformation;
PVOID lpSectionBase;
ULONG ulSectionLength;
PVOID lpSectionGlobalDataBase;
ULONG ulSectionGlobalDataLength;
} ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, *PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
typedef const ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA *PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
typedef struct tagACTCTX_SECTION_KEYED_DATA
{
ULONG cbSize;
ULONG ulDataFormatVersion;
PVOID lpData;
ULONG ulLength;
PVOID lpSectionGlobalData;
ULONG ulSectionGlobalDataLength;
PVOID lpSectionBase;
ULONG ulSectionTotalLength;
HANDLE hActCtx;
ULONG ulAssemblyRosterIndex;
ULONG ulFlags;
ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata;
} ACTCTX_SECTION_KEYED_DATA, *PACTCTX_SECTION_KEYED_DATA;
typedef const ACTCTX_SECTION_KEYED_DATA *PCACTCTX_SECTION_KEYED_DATA;
__attribute__((dllimport)) WINBOOL FindActCtxSectionStringA(DWORD dwFlags, const GUID *lpExtensionGuid, ULONG ulSectionId, LPCSTR lpStringToFind, PACTCTX_SECTION_KEYED_DATA ReturnedData);
__attribute__((dllimport)) WINBOOL FindActCtxSectionStringW(DWORD dwFlags, const GUID *lpExtensionGuid, ULONG ulSectionId, LPCWSTR lpStringToFind, PACTCTX_SECTION_KEYED_DATA ReturnedData);
__attribute__((dllimport)) WINBOOL FindActCtxSectionGuid(DWORD dwFlags, const GUID *lpExtensionGuid, ULONG ulSectionId, const GUID *lpGuidToFind, PACTCTX_SECTION_KEYED_DATA ReturnedData);
typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION
{
HANDLE hActCtx;
DWORD dwFlags;
} ACTIVATION_CONTEXT_BASIC_INFORMATION, *PACTIVATION_CONTEXT_BASIC_INFORMATION;
typedef const struct _ACTIVATION_CONTEXT_BASIC_INFORMATION *PCACTIVATION_CONTEXT_BASIC_INFORMATION;
__attribute__((dllimport)) WINBOOL QueryActCtxW(DWORD dwFlags, HANDLE hActCtx, PVOID pvSubInstance, ULONG ulInfoClass, PVOID pvBuffer, SIZE_T cbBuffer, SIZE_T *pcbWrittenOrRequired);
typedef WINBOOL (*PQUERYACTCTXW_FUNC)(DWORD dwFlags, HANDLE hActCtx, PVOID pvSubInstance, ULONG ulInfoClass, PVOID pvBuffer, SIZE_T cbBuffer, SIZE_T *pcbWrittenOrRequired);
__attribute__((dllimport)) DWORD WTSGetActiveConsoleSessionId(void);
__attribute__((dllimport)) WINBOOL GetNumaProcessorNode(UCHAR Processor, PUCHAR NodeNumber);
__attribute__((dllimport)) WINBOOL GetNumaNodeProcessorMask(UCHAR Node, PULONGLONG ProcessorMask);
__attribute__((dllimport)) WINBOOL GetNumaAvailableMemoryNode(UCHAR Node, PULONGLONG AvailableBytes);
__attribute__((dllimport)) WINBOOL GetNumaProximityNode(ULONG ProximityId, PUCHAR NodeNumber);
__attribute__((dllimport)) WORD GetActiveProcessorGroupCount(void);
__attribute__((dllimport)) WORD GetMaximumProcessorGroupCount(void);
__attribute__((dllimport)) DWORD GetActiveProcessorCount(WORD GroupNumber);
__attribute__((dllimport)) DWORD GetMaximumProcessorCount(WORD GroupNumber);
__attribute__((dllimport)) WINBOOL GetNumaNodeNumberFromHandle(HANDLE hFile, PUSHORT NodeNumber);
__attribute__((dllimport)) WINBOOL GetNumaProcessorNodeEx(PPROCESSOR_NUMBER Processor, PUSHORT NodeNumber);
__attribute__((dllimport)) WINBOOL GetNumaAvailableMemoryNodeEx(USHORT Node, PULONGLONG AvailableBytes);
__attribute__((dllimport)) WINBOOL GetNumaProximityNodeEx(ULONG ProximityId, PUSHORT NodeNumber);
typedef DWORD (*APPLICATION_RECOVERY_CALLBACK)(PVOID pvParameter);
__attribute__((dllimport)) HRESULT RegisterApplicationRecoveryCallback(APPLICATION_RECOVERY_CALLBACK pRecoveyCallback, PVOID pvParameter, DWORD dwPingInterval, DWORD dwFlags);
__attribute__((dllimport)) HRESULT UnregisterApplicationRecoveryCallback(void);
__attribute__((dllimport)) HRESULT RegisterApplicationRestart(PCWSTR pwzCommandline, DWORD dwFlags);
__attribute__((dllimport)) HRESULT UnregisterApplicationRestart(void);
__attribute__((dllimport)) HRESULT GetApplicationRecoveryCallback(HANDLE hProcess, APPLICATION_RECOVERY_CALLBACK *pRecoveryCallback, PVOID *ppvParameter, PDWORD pdwPingInterval, PDWORD pdwFlags);
__attribute__((dllimport)) HRESULT GetApplicationRestartSettings(HANDLE hProcess, PWSTR pwzCommandline, PDWORD pcchSize, PDWORD pdwFlags);
__attribute__((dllimport)) HRESULT ApplicationRecoveryInProgress(PBOOL pbCancelled);
__attribute__((dllimport)) void ApplicationRecoveryFinished(WINBOOL bSuccess);
typedef struct _FILE_BASIC_INFO
{
LARGE_INTEGER CreationTime;
LARGE_INTEGER LastAccessTime;
LARGE_INTEGER LastWriteTime;
LARGE_INTEGER ChangeTime;
DWORD FileAttributes;
} FILE_BASIC_INFO, *PFILE_BASIC_INFO;
typedef struct _FILE_STANDARD_INFO
{
LARGE_INTEGER AllocationSize;
LARGE_INTEGER EndOfFile;
DWORD NumberOfLinks;
BOOLEAN DeletePending;
BOOLEAN Directory;
} FILE_STANDARD_INFO, *PFILE_STANDARD_INFO;
typedef struct _FILE_NAME_INFO
{
DWORD FileNameLength;
WCHAR FileName[1];
} FILE_NAME_INFO, *PFILE_NAME_INFO;
typedef struct _FILE_RENAME_INFO
{
BOOLEAN ReplaceIfExists;
HANDLE RootDirectory;
DWORD FileNameLength;
WCHAR FileName[1];
} FILE_RENAME_INFO, *PFILE_RENAME_INFO;
typedef struct _FILE_ALLOCATION_INFO
{
LARGE_INTEGER AllocationSize;
} FILE_ALLOCATION_INFO, *PFILE_ALLOCATION_INFO;
typedef struct _FILE_END_OF_FILE_INFO
{
LARGE_INTEGER EndOfFile;
} FILE_END_OF_FILE_INFO, *PFILE_END_OF_FILE_INFO;
typedef struct _FILE_STREAM_INFO
{
DWORD NextEntryOffset;
DWORD StreamNameLength;
LARGE_INTEGER StreamSize;
LARGE_INTEGER StreamAllocationSize;
WCHAR StreamName[1];
} FILE_STREAM_INFO, *PFILE_STREAM_INFO;
typedef struct _FILE_COMPRESSION_INFO
{
LARGE_INTEGER CompressedFileSize;
WORD CompressionFormat;
UCHAR CompressionUnitShift;
UCHAR ChunkShift;
UCHAR ClusterShift;
UCHAR Reserved[3];
} FILE_COMPRESSION_INFO, *PFILE_COMPRESSION_INFO;
typedef struct _FILE_ATTRIBUTE_TAG_INFO
{
DWORD FileAttributes;
DWORD ReparseTag;
} FILE_ATTRIBUTE_TAG_INFO, *PFILE_ATTRIBUTE_TAG_INFO;
typedef struct _FILE_DISPOSITION_INFO
{
BOOLEAN DeleteFileW;
} FILE_DISPOSITION_INFO, *PFILE_DISPOSITION_INFO;
typedef struct _FILE_ID_BOTH_DIR_INFO
{
DWORD NextEntryOffset;
DWORD FileIndex;
LARGE_INTEGER CreationTime;
LARGE_INTEGER LastAccessTime;
LARGE_INTEGER LastWriteTime;
LARGE_INTEGER ChangeTime;
LARGE_INTEGER EndOfFile;
LARGE_INTEGER AllocationSize;
DWORD FileAttributes;
DWORD FileNameLength;
DWORD EaSize;
CCHAR ShortNameLength;
WCHAR ShortName[12];
LARGE_INTEGER FileId;
WCHAR FileName[1];
} FILE_ID_BOTH_DIR_INFO, *PFILE_ID_BOTH_DIR_INFO;
typedef struct _FILE_FULL_DIR_INFO
{
ULONG NextEntryOffset;
ULONG FileIndex;
LARGE_INTEGER CreationTime;
LARGE_INTEGER LastAccessTime;
LARGE_INTEGER LastWriteTime;
LARGE_INTEGER ChangeTime;
LARGE_INTEGER EndOfFile;
LARGE_INTEGER AllocationSize;
ULONG FileAttributes;
ULONG FileNameLength;
ULONG EaSize;
WCHAR FileName[1];
} FILE_FULL_DIR_INFO, *PFILE_FULL_DIR_INFO;
typedef enum _PRIORITY_HINT
{
IoPriorityHintVeryLow = 0,
IoPriorityHintLow,
IoPriorityHintNormal,
MaximumIoPriorityHintType
} PRIORITY_HINT;
typedef struct _FILE_IO_PRIORITY_HINT_INFO
{
PRIORITY_HINT PriorityHint;
} FILE_IO_PRIORITY_HINT_INFO, *PFILE_IO_PRIORITY_HINT_INFO;
typedef struct _FILE_REMOTE_PROTOCOL_INFO
{
USHORT StructureVersion;
USHORT StructureSize;
ULONG Protocol;
USHORT ProtocolMajorVersion;
USHORT ProtocolMinorVersion;
USHORT ProtocolRevision;
USHORT Reserved;
ULONG Flags;
struct
{
ULONG Reserved[8];
} GenericReserved;
struct
{
ULONG Reserved[16];
} ProtocolSpecificReserved;
} FILE_REMOTE_PROTOCOL_INFO, *PFILE_REMOTE_PROTOCOL_INFO;
__attribute__((dllimport)) WINBOOL GetFileInformationByHandleEx(HANDLE hFile, FILE_INFO_BY_HANDLE_CLASS FileInformationClass, LPVOID lpFileInformation, DWORD dwBufferSize);
typedef enum _FILE_ID_TYPE
{
FileIdType,
ObjectIdType,
ExtendedFileIdType,
MaximumFileIdType
} FILE_ID_TYPE,
*PFILE_ID_TYPE;
typedef struct FILE_ID_DESCRIPTOR
{
DWORD dwSize;
FILE_ID_TYPE Type;
__extension__ union {
LARGE_INTEGER FileId;
GUID ObjectId;
};
} FILE_ID_DESCRIPTOR, *LPFILE_ID_DESCRIPTOR;
__attribute__((dllimport)) HANDLE OpenFileById(HANDLE hVolumeHint, LPFILE_ID_DESCRIPTOR lpFileId, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwFlagsAndAttributes);
__attribute__((dllimport)) BOOLEAN CreateSymbolicLinkA(LPCSTR lpSymlinkFileName, LPCSTR lpTargetFileName, DWORD dwFlags);
__attribute__((dllimport)) BOOLEAN CreateSymbolicLinkW(LPCWSTR lpSymlinkFileName, LPCWSTR lpTargetFileName, DWORD dwFlags);
__attribute__((dllimport)) BOOLEAN CreateSymbolicLinkTransactedA(LPCSTR lpSymlinkFileName, LPCSTR lpTargetFileName, DWORD dwFlags, HANDLE hTransaction);
__attribute__((dllimport)) BOOLEAN CreateSymbolicLinkTransactedW(LPCWSTR lpSymlinkFileName, LPCWSTR lpTargetFileName, DWORD dwFlags, HANDLE hTransaction);
__attribute__((dllimport)) WINBOOL QueryActCtxSettingsW(DWORD dwFlags, HANDLE hActCtx, PCWSTR settingsNameSpace, PCWSTR settingName, PWSTR pvBuffer, SIZE_T dwBuffer, SIZE_T *pdwWrittenOrRequired);
__attribute__((dllimport)) WINBOOL ReplacePartitionUnit(PWSTR TargetPartition, PWSTR SparePartition, ULONG Flags);
__attribute__((dllimport)) WINBOOL AddSecureMemoryCacheCallback(PSECURE_MEMORY_CACHE_CALLBACK pfnCallBack);
__attribute__((dllimport)) WINBOOL RemoveSecureMemoryCacheCallback(PSECURE_MEMORY_CACHE_CALLBACK pfnCallBack);
__attribute__((dllimport)) WINBOOL CopyContext(PCONTEXT Destination, DWORD ContextFlags, PCONTEXT Source);
__attribute__((dllimport)) WINBOOL InitializeContext(PVOID Buffer, DWORD ContextFlags, PCONTEXT *Context, PDWORD ContextLength);
__attribute__((dllimport)) DWORD64 GetEnabledXStateFeatures(void);
__attribute__((dllimport)) WINBOOL GetXStateFeaturesMask(PCONTEXT Context, PDWORD64 FeatureMask);
__attribute__((dllimport)) PVOID LocateXStateFeature(PCONTEXT Context, DWORD FeatureId, PDWORD Length);
__attribute__((dllimport)) WINBOOL SetXStateFeaturesMask(PCONTEXT Context, DWORD64 FeatureMask);
__attribute__((dllimport)) DWORD EnableThreadProfiling(HANDLE ThreadHandle, DWORD Flags, DWORD64 HardwareCounters, HANDLE *PerformanceDataHandle);
__attribute__((dllimport)) DWORD DisableThreadProfiling(HANDLE PerformanceDataHandle);
__attribute__((dllimport)) DWORD QueryThreadProfiling(HANDLE ThreadHandle, PBOOLEAN Enabled);
__attribute__((dllimport)) DWORD ReadThreadProfilingData(HANDLE PerformanceDataHandle, DWORD Flags, PPERFORMANCE_DATA PerformanceData);
typedef struct _DRAWPATRECT
{
POINT ptPosition;
POINT ptSize;
WORD wStyle;
WORD wPattern;
} DRAWPATRECT, *PDRAWPATRECT;
typedef struct _PSINJECTDATA
{
DWORD DataBytes;
WORD InjectionPoint;
WORD PageNumber;
} PSINJECTDATA, *PPSINJECTDATA;
typedef struct _PSFEATURE_OUTPUT
{
WINBOOL bPageIndependent;
WINBOOL bSetPageDevice;
} PSFEATURE_OUTPUT, *PPSFEATURE_OUTPUT;
typedef struct _PSFEATURE_CUSTPAPER
{
LONG lOrientation;
LONG lWidth;
LONG lHeight;
LONG lWidthOffset;
LONG lHeightOffset;
} PSFEATURE_CUSTPAPER, *PPSFEATURE_CUSTPAPER;
typedef struct tagXFORM
{
FLOAT eM11;
FLOAT eM12;
FLOAT eM21;
FLOAT eM22;
FLOAT eDx;
FLOAT eDy;
} XFORM, *PXFORM, *LPXFORM;
typedef struct tagBITMAP
{
LONG bmType;
LONG bmWidth;
LONG bmHeight;
LONG bmWidthBytes;
WORD bmPlanes;
WORD bmBitsPixel;
LPVOID bmBits;
} BITMAP, *PBITMAP, *NPBITMAP, *LPBITMAP;
typedef struct tagRGBTRIPLE
{
BYTE rgbtBlue;
BYTE rgbtGreen;
BYTE rgbtRed;
} RGBTRIPLE;
typedef struct tagRGBQUAD
{
BYTE rgbBlue;
BYTE rgbGreen;
BYTE rgbRed;
BYTE rgbReserved;
} RGBQUAD;
typedef RGBQUAD *LPRGBQUAD;
typedef LONG LCSCSTYPE;
typedef LONG LCSGAMUTMATCH;
typedef long FXPT16DOT16, *LPFXPT16DOT16;
typedef long FXPT2DOT30, *LPFXPT2DOT30;
typedef struct tagCIEXYZ
{
FXPT2DOT30 ciexyzX;
FXPT2DOT30 ciexyzY;
FXPT2DOT30 ciexyzZ;
} CIEXYZ;
typedef CIEXYZ *LPCIEXYZ;
typedef struct tagICEXYZTRIPLE
{
CIEXYZ ciexyzRed;
CIEXYZ ciexyzGreen;
CIEXYZ ciexyzBlue;
} CIEXYZTRIPLE;
typedef CIEXYZTRIPLE *LPCIEXYZTRIPLE;
typedef struct tagLOGCOLORSPACEA
{
DWORD lcsSignature;
DWORD lcsVersion;
DWORD lcsSize;
LCSCSTYPE lcsCSType;
LCSGAMUTMATCH lcsIntent;
CIEXYZTRIPLE lcsEndpoints;
DWORD lcsGammaRed;
DWORD lcsGammaGreen;
DWORD lcsGammaBlue;
CHAR lcsFilename[260];
} LOGCOLORSPACEA, *LPLOGCOLORSPACEA;
typedef struct tagLOGCOLORSPACEW
{
DWORD lcsSignature;
DWORD lcsVersion;
DWORD lcsSize;
LCSCSTYPE lcsCSType;
LCSGAMUTMATCH lcsIntent;
CIEXYZTRIPLE lcsEndpoints;
DWORD lcsGammaRed;
DWORD lcsGammaGreen;
DWORD lcsGammaBlue;
WCHAR lcsFilename[260];
} LOGCOLORSPACEW, *LPLOGCOLORSPACEW;
typedef LOGCOLORSPACEW LOGCOLORSPACE;
typedef LPLOGCOLORSPACEW LPLOGCOLORSPACE;
typedef struct tagBITMAPCOREHEADER
{
DWORD bcSize;
WORD bcWidth;
WORD bcHeight;
WORD bcPlanes;
WORD bcBitCount;
} BITMAPCOREHEADER, *LPBITMAPCOREHEADER, *PBITMAPCOREHEADER;
typedef struct tagBITMAPINFOHEADER
{
DWORD biSize;
LONG biWidth;
LONG biHeight;
WORD biPlanes;
WORD biBitCount;
DWORD biCompression;
DWORD biSizeImage;
LONG biXPelsPerMeter;
LONG biYPelsPerMeter;
DWORD biClrUsed;
DWORD biClrImportant;
} BITMAPINFOHEADER, *LPBITMAPINFOHEADER, *PBITMAPINFOHEADER;
typedef struct
{
DWORD bV4Size;
LONG bV4Width;
LONG bV4Height;
WORD bV4Planes;
WORD bV4BitCount;
DWORD bV4V4Compression;
DWORD bV4SizeImage;
LONG bV4XPelsPerMeter;
LONG bV4YPelsPerMeter;
DWORD bV4ClrUsed;
DWORD bV4ClrImportant;
DWORD bV4RedMask;
DWORD bV4GreenMask;
DWORD bV4BlueMask;
DWORD bV4AlphaMask;
DWORD bV4CSType;
CIEXYZTRIPLE bV4Endpoints;
DWORD bV4GammaRed;
DWORD bV4GammaGreen;
DWORD bV4GammaBlue;
} BITMAPV4HEADER, *LPBITMAPV4HEADER, *PBITMAPV4HEADER;
typedef struct
{
DWORD bV5Size;
LONG bV5Width;
LONG bV5Height;
WORD bV5Planes;
WORD bV5BitCount;
DWORD bV5Compression;
DWORD bV5SizeImage;
LONG bV5XPelsPerMeter;
LONG bV5YPelsPerMeter;
DWORD bV5ClrUsed;
DWORD bV5ClrImportant;
DWORD bV5RedMask;
DWORD bV5GreenMask;
DWORD bV5BlueMask;
DWORD bV5AlphaMask;
DWORD bV5CSType;
CIEXYZTRIPLE bV5Endpoints;
DWORD bV5GammaRed;
DWORD bV5GammaGreen;
DWORD bV5GammaBlue;
DWORD bV5Intent;
DWORD bV5ProfileData;
DWORD bV5ProfileSize;
DWORD bV5Reserved;
} BITMAPV5HEADER, *LPBITMAPV5HEADER, *PBITMAPV5HEADER;
typedef struct tagBITMAPINFO
{
BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[1];
} BITMAPINFO, *LPBITMAPINFO, *PBITMAPINFO;
typedef struct tagBITMAPCOREINFO
{
BITMAPCOREHEADER bmciHeader;
RGBTRIPLE bmciColors[1];
} BITMAPCOREINFO, *LPBITMAPCOREINFO, *PBITMAPCOREINFO;
typedef struct tagBITMAPFILEHEADER
{
WORD bfType;
DWORD bfSize;
WORD bfReserved1;
WORD bfReserved2;
DWORD bfOffBits;
} BITMAPFILEHEADER, *LPBITMAPFILEHEADER, *PBITMAPFILEHEADER;
typedef struct tagFONTSIGNATURE
{
DWORD fsUsb[4];
DWORD fsCsb[2];
} FONTSIGNATURE, *PFONTSIGNATURE, *LPFONTSIGNATURE;
typedef struct tagCHARSETINFO
{
UINT ciCharset;
UINT ciACP;
FONTSIGNATURE fs;
} CHARSETINFO, *PCHARSETINFO, *NPCHARSETINFO, *LPCHARSETINFO;
typedef struct tagLOCALESIGNATURE
{
DWORD lsUsb[4];
DWORD lsCsbDefault[2];
DWORD lsCsbSupported[2];
} LOCALESIGNATURE, *PLOCALESIGNATURE, *LPLOCALESIGNATURE;
typedef struct tagHANDLETABLE
{
HGDIOBJ objectHandle[1];
} HANDLETABLE, *PHANDLETABLE, *LPHANDLETABLE;
typedef struct tagMETARECORD
{
DWORD rdSize;
WORD rdFunction;
WORD rdParm[1];
} METARECORD;
typedef struct tagMETARECORD *PMETARECORD;
typedef struct tagMETARECORD *LPMETARECORD;
typedef struct tagMETAFILEPICT
{
LONG mm;
LONG xExt;
LONG yExt;
HMETAFILE hMF;
} METAFILEPICT, *LPMETAFILEPICT;
typedef struct tagMETAHEADER
{
WORD mtType;
WORD mtHeaderSize;
WORD mtVersion;
DWORD mtSize;
WORD mtNoObjects;
DWORD mtMaxRecord;
WORD mtNoParameters;
} METAHEADER;
typedef struct tagMETAHEADER *PMETAHEADER;
typedef struct tagMETAHEADER *LPMETAHEADER;
typedef struct tagENHMETARECORD
{
DWORD iType;
DWORD nSize;
DWORD dParm[1];
} ENHMETARECORD, *PENHMETARECORD, *LPENHMETARECORD;
typedef struct tagENHMETAHEADER
{
DWORD iType;
DWORD nSize;
RECTL rclBounds;
RECTL rclFrame;
DWORD dSignature;
DWORD nVersion;
DWORD nBytes;
DWORD nRecords;
WORD nHandles;
WORD sReserved;
DWORD nDescription;
DWORD offDescription;
DWORD nPalEntries;
SIZEL szlDevice;
SIZEL szlMillimeters;
DWORD cbPixelFormat;
DWORD offPixelFormat;
DWORD bOpenGL;
SIZEL szlMicrometers;
} ENHMETAHEADER, *PENHMETAHEADER, *LPENHMETAHEADER;
typedef WCHAR BCHAR;
typedef struct tagTEXTMETRICA
{
LONG tmHeight;
LONG tmAscent;
LONG tmDescent;
LONG tmInternalLeading;
LONG tmExternalLeading;
LONG tmAveCharWidth;
LONG tmMaxCharWidth;
LONG tmWeight;
LONG tmOverhang;
LONG tmDigitizedAspectX;
LONG tmDigitizedAspectY;
BYTE tmFirstChar;
BYTE tmLastChar;
BYTE tmDefaultChar;
BYTE tmBreakChar;
BYTE tmItalic;
BYTE tmUnderlined;
BYTE tmStruckOut;
BYTE tmPitchAndFamily;
BYTE tmCharSet;
} TEXTMETRICA, *PTEXTMETRICA, *NPTEXTMETRICA, *LPTEXTMETRICA;
typedef struct tagTEXTMETRICW
{
LONG tmHeight;
LONG tmAscent;
LONG tmDescent;
LONG tmInternalLeading;
LONG tmExternalLeading;
LONG tmAveCharWidth;
LONG tmMaxCharWidth;
LONG tmWeight;
LONG tmOverhang;
LONG tmDigitizedAspectX;
LONG tmDigitizedAspectY;
WCHAR tmFirstChar;
WCHAR tmLastChar;
WCHAR tmDefaultChar;
WCHAR tmBreakChar;
BYTE tmItalic;
BYTE tmUnderlined;
BYTE tmStruckOut;
BYTE tmPitchAndFamily;
BYTE tmCharSet;
} TEXTMETRICW, *PTEXTMETRICW, *NPTEXTMETRICW, *LPTEXTMETRICW;
typedef TEXTMETRICW TEXTMETRIC;
typedef PTEXTMETRICW PTEXTMETRIC;
typedef NPTEXTMETRICW NPTEXTMETRIC;
typedef LPTEXTMETRICW LPTEXTMETRIC;
typedef struct tagNEWTEXTMETRICA
{
LONG tmHeight;
LONG tmAscent;
LONG tmDescent;
LONG tmInternalLeading;
LONG tmExternalLeading;
LONG tmAveCharWidth;
LONG tmMaxCharWidth;
LONG tmWeight;
LONG tmOverhang;
LONG tmDigitizedAspectX;
LONG tmDigitizedAspectY;
BYTE tmFirstChar;
BYTE tmLastChar;
BYTE tmDefaultChar;
BYTE tmBreakChar;
BYTE tmItalic;
BYTE tmUnderlined;
BYTE tmStruckOut;
BYTE tmPitchAndFamily;
BYTE tmCharSet;
DWORD ntmFlags;
UINT ntmSizeEM;
UINT ntmCellHeight;
UINT ntmAvgWidth;
} NEWTEXTMETRICA, *PNEWTEXTMETRICA, *NPNEWTEXTMETRICA, *LPNEWTEXTMETRICA;
typedef struct tagNEWTEXTMETRICW
{
LONG tmHeight;
LONG tmAscent;
LONG tmDescent;
LONG tmInternalLeading;
LONG tmExternalLeading;
LONG tmAveCharWidth;
LONG tmMaxCharWidth;
LONG tmWeight;
LONG tmOverhang;
LONG tmDigitizedAspectX;
LONG tmDigitizedAspectY;
WCHAR tmFirstChar;
WCHAR tmLastChar;
WCHAR tmDefaultChar;
WCHAR tmBreakChar;
BYTE tmItalic;
BYTE tmUnderlined;
BYTE tmStruckOut;
BYTE tmPitchAndFamily;
BYTE tmCharSet;
DWORD ntmFlags;
UINT ntmSizeEM;
UINT ntmCellHeight;
UINT ntmAvgWidth;
} NEWTEXTMETRICW, *PNEWTEXTMETRICW, *NPNEWTEXTMETRICW, *LPNEWTEXTMETRICW;
typedef NEWTEXTMETRICW NEWTEXTMETRIC;
typedef PNEWTEXTMETRICW PNEWTEXTMETRIC;
typedef NPNEWTEXTMETRICW NPNEWTEXTMETRIC;
typedef LPNEWTEXTMETRICW LPNEWTEXTMETRIC;
typedef struct tagNEWTEXTMETRICEXA
{
NEWTEXTMETRICA ntmTm;
FONTSIGNATURE ntmFontSig;
} NEWTEXTMETRICEXA;
typedef struct tagNEWTEXTMETRICEXW
{
NEWTEXTMETRICW ntmTm;
FONTSIGNATURE ntmFontSig;
} NEWTEXTMETRICEXW;
typedef NEWTEXTMETRICEXW NEWTEXTMETRICEX;
typedef struct tagPELARRAY
{
LONG paXCount;
LONG paYCount;
LONG paXExt;
LONG paYExt;
BYTE paRGBs;
} PELARRAY, *PPELARRAY, *NPPELARRAY, *LPPELARRAY;
typedef struct tagLOGBRUSH
{
UINT lbStyle;
COLORREF lbColor;
ULONG_PTR lbHatch;
} LOGBRUSH, *PLOGBRUSH, *NPLOGBRUSH, *LPLOGBRUSH;
typedef struct tagLOGBRUSH32
{
UINT lbStyle;
COLORREF lbColor;
ULONG lbHatch;
} LOGBRUSH32, *PLOGBRUSH32, *NPLOGBRUSH32, *LPLOGBRUSH32;
typedef LOGBRUSH PATTERN;
typedef PATTERN *PPATTERN;
typedef PATTERN *NPPATTERN;
typedef PATTERN *LPPATTERN;
typedef struct tagLOGPEN
{
UINT lopnStyle;
POINT lopnWidth;
COLORREF lopnColor;
} LOGPEN, *PLOGPEN, *NPLOGPEN, *LPLOGPEN;
typedef struct tagEXTLOGPEN
{
DWORD elpPenStyle;
DWORD elpWidth;
UINT elpBrushStyle;
COLORREF elpColor;
ULONG_PTR elpHatch;
DWORD elpNumEntries;
DWORD elpStyleEntry[1];
} EXTLOGPEN, *PEXTLOGPEN, *NPEXTLOGPEN, *LPEXTLOGPEN;
typedef struct tagEXTLOGPEN32
{
DWORD elpPenStyle;
DWORD elpWidth;
UINT elpBrushStyle;
COLORREF elpColor;
ULONG elpHatch;
DWORD elpNumEntries;
DWORD elpStyleEntry[1];
} EXTLOGPEN32, *PEXTLOGPEN32, *NPEXTLOGPEN32, *LPEXTLOGPEN32;
typedef struct tagPALETTEENTRY
{
BYTE peRed;
BYTE peGreen;
BYTE peBlue;
BYTE peFlags;
} PALETTEENTRY, *PPALETTEENTRY, *LPPALETTEENTRY;
typedef struct tagLOGPALETTE
{
WORD palVersion;
WORD palNumEntries;
PALETTEENTRY palPalEntry[1];
} LOGPALETTE, *PLOGPALETTE, *NPLOGPALETTE, *LPLOGPALETTE;
typedef struct tagLOGFONTA
{
LONG lfHeight;
LONG lfWidth;
LONG lfEscapement;
LONG lfOrientation;
LONG lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
CHAR lfFaceName[32];
} LOGFONTA, *PLOGFONTA, *NPLOGFONTA, *LPLOGFONTA;
typedef struct tagLOGFONTW
{
LONG lfHeight;
LONG lfWidth;
LONG lfEscapement;
LONG lfOrientation;
LONG lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
WCHAR lfFaceName[32];
} LOGFONTW, *PLOGFONTW, *NPLOGFONTW, *LPLOGFONTW;
typedef LOGFONTW LOGFONT;
typedef PLOGFONTW PLOGFONT;
typedef NPLOGFONTW NPLOGFONT;
typedef LPLOGFONTW LPLOGFONT;
typedef struct tagENUMLOGFONTA
{
LOGFONTA elfLogFont;
BYTE elfFullName[64];
BYTE elfStyle[32];
} ENUMLOGFONTA, *LPENUMLOGFONTA;
typedef struct tagENUMLOGFONTW
{
LOGFONTW elfLogFont;
WCHAR elfFullName[64];
WCHAR elfStyle[32];
} ENUMLOGFONTW, *LPENUMLOGFONTW;
typedef ENUMLOGFONTW ENUMLOGFONT;
typedef LPENUMLOGFONTW LPENUMLOGFONT;
typedef struct tagENUMLOGFONTEXA
{
LOGFONTA elfLogFont;
BYTE elfFullName[64];
BYTE elfStyle[32];
BYTE elfScript[32];
} ENUMLOGFONTEXA, *LPENUMLOGFONTEXA;
typedef struct tagENUMLOGFONTEXW
{
LOGFONTW elfLogFont;
WCHAR elfFullName[64];
WCHAR elfStyle[32];
WCHAR elfScript[32];
} ENUMLOGFONTEXW, *LPENUMLOGFONTEXW;
typedef ENUMLOGFONTEXW ENUMLOGFONTEX;
typedef LPENUMLOGFONTEXW LPENUMLOGFONTEX;
typedef struct tagPANOSE
{
BYTE bFamilyType;
BYTE bSerifStyle;
BYTE bWeight;
BYTE bProportion;
BYTE bContrast;
BYTE bStrokeVariation;
BYTE bArmStyle;
BYTE bLetterform;
BYTE bMidline;
BYTE bXHeight;
} PANOSE, *LPPANOSE;
typedef struct tagEXTLOGFONTA
{
LOGFONTA elfLogFont;
BYTE elfFullName[64];
BYTE elfStyle[32];
DWORD elfVersion;
DWORD elfStyleSize;
DWORD elfMatch;
DWORD elfReserved;
BYTE elfVendorId[4];
DWORD elfCulture;
PANOSE elfPanose;
} EXTLOGFONTA, *PEXTLOGFONTA, *NPEXTLOGFONTA, *LPEXTLOGFONTA;
typedef struct tagEXTLOGFONTW
{
LOGFONTW elfLogFont;
WCHAR elfFullName[64];
WCHAR elfStyle[32];
DWORD elfVersion;
DWORD elfStyleSize;
DWORD elfMatch;
DWORD elfReserved;
BYTE elfVendorId[4];
DWORD elfCulture;
PANOSE elfPanose;
} EXTLOGFONTW, *PEXTLOGFONTW, *NPEXTLOGFONTW, *LPEXTLOGFONTW;
typedef EXTLOGFONTW EXTLOGFONT;
typedef PEXTLOGFONTW PEXTLOGFONT;
typedef NPEXTLOGFONTW NPEXTLOGFONT;
typedef LPEXTLOGFONTW LPEXTLOGFONT;
typedef struct _devicemodeA
{
BYTE dmDeviceName[32];
WORD dmSpecVersion;
WORD dmDriverVersion;
WORD dmSize;
WORD dmDriverExtra;
DWORD dmFields;
__extension__ union {
__extension__ struct
{
short dmOrientation;
short dmPaperSize;
short dmPaperLength;
short dmPaperWidth;
short dmScale;
short dmCopies;
short dmDefaultSource;
short dmPrintQuality;
};
struct
{
POINTL dmPosition;
DWORD dmDisplayOrientation;
DWORD dmDisplayFixedOutput;
};
};
short dmColor;
short dmDuplex;
short dmYResolution;
short dmTTOption;
short dmCollate;
BYTE dmFormName[32];
WORD dmLogPixels;
DWORD dmBitsPerPel;
DWORD dmPelsWidth;
DWORD dmPelsHeight;
__extension__ union {
DWORD dmDisplayFlags;
DWORD dmNup;
};
DWORD dmDisplayFrequency;
DWORD dmICMMethod;
DWORD dmICMIntent;
DWORD dmMediaType;
DWORD dmDitherType;
DWORD dmReserved1;
DWORD dmReserved2;
DWORD dmPanningWidth;
DWORD dmPanningHeight;
} DEVMODEA, *PDEVMODEA, *NPDEVMODEA, *LPDEVMODEA;
typedef struct _devicemodeW
{
WCHAR dmDeviceName[32];
WORD dmSpecVersion;
WORD dmDriverVersion;
WORD dmSize;
WORD dmDriverExtra;
DWORD dmFields;
__extension__ union {
__extension__ struct
{
short dmOrientation;
short dmPaperSize;
short dmPaperLength;
short dmPaperWidth;
short dmScale;
short dmCopies;
short dmDefaultSource;
short dmPrintQuality;
};
__extension__ struct
{
POINTL dmPosition;
DWORD dmDisplayOrientation;
DWORD dmDisplayFixedOutput;
};
};
short dmColor;
short dmDuplex;
short dmYResolution;
short dmTTOption;
short dmCollate;
WCHAR dmFormName[32];
WORD dmLogPixels;
DWORD dmBitsPerPel;
DWORD dmPelsWidth;
DWORD dmPelsHeight;
__extension__ union {
DWORD dmDisplayFlags;
DWORD dmNup;
};
DWORD dmDisplayFrequency;
DWORD dmICMMethod;
DWORD dmICMIntent;
DWORD dmMediaType;
DWORD dmDitherType;
DWORD dmReserved1;
DWORD dmReserved2;
DWORD dmPanningWidth;
DWORD dmPanningHeight;
} DEVMODEW, *PDEVMODEW, *NPDEVMODEW, *LPDEVMODEW;
typedef DEVMODEW DEVMODE;
typedef PDEVMODEW PDEVMODE;
typedef NPDEVMODEW NPDEVMODE;
typedef LPDEVMODEW LPDEVMODE;
typedef struct _DISPLAY_DEVICEA
{
DWORD cb;
CHAR DeviceName[32];
CHAR DeviceString[128];
DWORD StateFlags;
CHAR DeviceID[128];
CHAR DeviceKey[128];
} DISPLAY_DEVICEA, *PDISPLAY_DEVICEA, *LPDISPLAY_DEVICEA;
typedef struct _DISPLAY_DEVICEW
{
DWORD cb;
WCHAR DeviceName[32];
WCHAR DeviceString[128];
DWORD StateFlags;
WCHAR DeviceID[128];
WCHAR DeviceKey[128];
} DISPLAY_DEVICEW, *PDISPLAY_DEVICEW, *LPDISPLAY_DEVICEW;
typedef DISPLAY_DEVICEW DISPLAY_DEVICE;
typedef PDISPLAY_DEVICEW PDISPLAY_DEVICE;
typedef LPDISPLAY_DEVICEW LPDISPLAY_DEVICE;
typedef struct DISPLAYCONFIG_RATIONAL
{
UINT32 Numerator;
UINT32 Denominator;
} DISPLAYCONFIG_RATIONAL;
typedef enum
{
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_OTHER = (int)-1,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HD15 = (int)0,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SVIDEO = (int)1,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPOSITE_VIDEO = (int)2,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPONENT_VIDEO = (int)3,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DVI = (int)4,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HDMI = (int)5,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_LVDS = (int)6,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_D_JPN = (int)8,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDI = (int)9,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EXTERNAL = (int)10,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED = (int)11,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EXTERNAL = (int)12,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EMBEDDED = (int)13,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDTVDONGLE = (int)14,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL = (int)0x80000000,
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_FORCE_UINT32 = (int)0xFFFFFFFF
} DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY;
typedef enum
{
DISPLAYCONFIG_SCANLINE_ORDERING_UNSPECIFIED = 0,
DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE = 1,
DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED = 2,
DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_UPPERFIELDFIRST = 2,
DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_LOWERFIELDFIRST = 3,
DISPLAYCONFIG_SCANLINE_ORDERING_FORCE_UINT32 = 0xFFFFFFFF
} DISPLAYCONFIG_SCANLINE_ORDERING;
typedef struct DISPLAYCONFIG_2DREGION
{
UINT32 cx;
UINT32 cy;
} DISPLAYCONFIG_2DREGION;
typedef struct DISPLAYCONFIG_VIDEO_SIGNAL_INFO
{
UINT64 pixelRate;
DISPLAYCONFIG_RATIONAL hSyncFreq;
DISPLAYCONFIG_RATIONAL vSyncFreq;
DISPLAYCONFIG_2DREGION activeSize;
DISPLAYCONFIG_2DREGION totalSize;
UINT32 videoStandard;
DISPLAYCONFIG_SCANLINE_ORDERING scanLineOrdering;
} DISPLAYCONFIG_VIDEO_SIGNAL_INFO;
typedef enum
{
DISPLAYCONFIG_SCALING_IDENTITY = 1,
DISPLAYCONFIG_SCALING_CENTERED = 2,
DISPLAYCONFIG_SCALING_STRETCHED = 3,
DISPLAYCONFIG_SCALING_ASPECTRATIOCENTEREDMAX = 4,
DISPLAYCONFIG_SCALING_CUSTOM = 5,
DISPLAYCONFIG_SCALING_PREFERRED = 128,
DISPLAYCONFIG_SCALING_FORCE_UINT32 = 0xFFFFFFFF
} DISPLAYCONFIG_SCALING;
typedef enum
{
DISPLAYCONFIG_ROTATION_IDENTITY = 1,
DISPLAYCONFIG_ROTATION_ROTATE90 = 2,
DISPLAYCONFIG_ROTATION_ROTATE180 = 3,
DISPLAYCONFIG_ROTATION_ROTATE270 = 4,
DISPLAYCONFIG_ROTATION_FORCE_UINT32 = 0xFFFFFFFF
} DISPLAYCONFIG_ROTATION;
typedef enum
{
DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE = 1,
DISPLAYCONFIG_MODE_INFO_TYPE_TARGET = 2,
DISPLAYCONFIG_MODE_INFO_TYPE_FORCE_UINT32 = 0xFFFFFFFF
} DISPLAYCONFIG_MODE_INFO_TYPE;
typedef enum
{
DISPLAYCONFIG_PIXELFORMAT_8BPP = 1,
DISPLAYCONFIG_PIXELFORMAT_16BPP = 2,
DISPLAYCONFIG_PIXELFORMAT_24BPP = 3,
DISPLAYCONFIG_PIXELFORMAT_32BPP = 4,
DISPLAYCONFIG_PIXELFORMAT_NONGDI = 5,
DISPLAYCONFIG_PIXELFORMAT_FORCE_UINT32 = 0xffffffff
} DISPLAYCONFIG_PIXELFORMAT;
typedef struct DISPLAYCONFIG_SOURCE_MODE
{
UINT32 width;
UINT32 height;
DISPLAYCONFIG_PIXELFORMAT pixelFormat;
POINTL position;
} DISPLAYCONFIG_SOURCE_MODE;
typedef struct DISPLAYCONFIG_TARGET_MODE
{
DISPLAYCONFIG_VIDEO_SIGNAL_INFO targetVideoSignalInfo;
} DISPLAYCONFIG_TARGET_MODE;
typedef struct DISPLAYCONFIG_MODE_INFO
{
DISPLAYCONFIG_MODE_INFO_TYPE infoType;
UINT32 id;
LUID adapterId;
__extension__ union {
DISPLAYCONFIG_TARGET_MODE targetMode;
DISPLAYCONFIG_SOURCE_MODE sourceMode;
};
} DISPLAYCONFIG_MODE_INFO;
typedef struct DISPLAYCONFIG_PATH_SOURCE_INFO
{
LUID adapterId;
UINT32 id;
UINT32 modeInfoIdx;
UINT32 statusFlags;
} DISPLAYCONFIG_PATH_SOURCE_INFO;
typedef struct DISPLAYCONFIG_PATH_TARGET_INFO
{
LUID adapterId;
UINT32 id;
UINT32 modeInfoIdx;
DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY outputTechnology;
DISPLAYCONFIG_ROTATION rotation;
DISPLAYCONFIG_SCALING scaling;
DISPLAYCONFIG_RATIONAL refreshRate;
DISPLAYCONFIG_SCANLINE_ORDERING scanLineOrdering;
WINBOOL targetAvailable;
UINT32 statusFlags;
} DISPLAYCONFIG_PATH_TARGET_INFO;
typedef struct DISPLAYCONFIG_PATH_INFO
{
DISPLAYCONFIG_PATH_SOURCE_INFO sourceInfo;
DISPLAYCONFIG_PATH_TARGET_INFO targetInfo;
UINT32 flags;
} DISPLAYCONFIG_PATH_INFO;
typedef enum
{
DISPLAYCONFIG_TOPOLOGY_INTERNAL = 0x1,
DISPLAYCONFIG_TOPOLOGY_CLONE = 0x2,
DISPLAYCONFIG_TOPOLOGY_EXTEND = 0x4,
DISPLAYCONFIG_TOPOLOGY_EXTERNAL = 0x8,
DISPLAYCONFIG_TOPOLOGY_FORCE_UINT32 = 0xFFFFFFFF
} DISPLAYCONFIG_TOPOLOGY_ID;
typedef enum
{
DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME = 1,
DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME = 2,
DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_PREFERRED_MODE = 3,
DISPLAYCONFIG_DEVICE_INFO_GET_ADAPTER_NAME = 4,
DISPLAYCONFIG_DEVICE_INFO_SET_TARGET_PERSISTENCE = 5,
DISPLAYCONFIG_DEVICE_INFO_FORCE_UINT32 = 0xFFFFFFFF
} DISPLAYCONFIG_DEVICE_INFO_TYPE;
typedef struct DISPLAYCONFIG_DEVICE_INFO_HEADER
{
DISPLAYCONFIG_DEVICE_INFO_TYPE type;
UINT32 size;
LUID adapterId;
UINT32 id;
} DISPLAYCONFIG_DEVICE_INFO_HEADER;
typedef struct DISPLAYCONFIG_SOURCE_DEVICE_NAME
{
DISPLAYCONFIG_DEVICE_INFO_HEADER header;
WCHAR viewGdiDeviceName[32];
} DISPLAYCONFIG_SOURCE_DEVICE_NAME;
typedef struct DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS
{
__extension__ union {
__extension__ struct
{
UINT32 friendlyNameFromEdid : 1;
UINT32 friendlyNameForced : 1;
UINT32 edidIdsValid : 1;
UINT32 reserved : 29;
};
UINT32 value;
};
} DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS;
typedef struct DISPLAYCONFIG_TARGET_DEVICE_NAME
{
DISPLAYCONFIG_DEVICE_INFO_HEADER header;
DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS flags;
DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY outputTechnology;
UINT16 edidManufactureId;
UINT16 edidProductCodeId;
UINT32 connectorInstance;
WCHAR monitorFriendlyDeviceName[64];
WCHAR monitorDevicePath[128];
} DISPLAYCONFIG_TARGET_DEVICE_NAME;
typedef struct DISPLAYCONFIG_TARGET_PREFERRED_MODE
{
DISPLAYCONFIG_DEVICE_INFO_HEADER header;
UINT32 width;
UINT32 height;
DISPLAYCONFIG_TARGET_MODE targetMode;
} DISPLAYCONFIG_TARGET_PREFERRED_MODE;
typedef struct DISPLAYCONFIG_ADAPTER_NAME
{
DISPLAYCONFIG_DEVICE_INFO_HEADER header;
WCHAR adapterDevicePath[128];
} DISPLAYCONFIG_ADAPTER_NAME;
typedef struct DISPLAYCONFIG_SET_TARGET_PERSISTENCE
{
DISPLAYCONFIG_DEVICE_INFO_HEADER header;
__extension__ union {
__extension__ struct
{
UINT32 bootPersistenceOn : 1;
UINT32 reserved : 31;
};
UINT32 value;
};
} DISPLAYCONFIG_SET_TARGET_PERSISTENCE;
typedef struct _RGNDATAHEADER
{
DWORD dwSize;
DWORD iType;
DWORD nCount;
DWORD nRgnSize;
RECT rcBound;
} RGNDATAHEADER, *PRGNDATAHEADER;
typedef struct _RGNDATA
{
RGNDATAHEADER rdh;
char Buffer[1];
} RGNDATA, *PRGNDATA, *NPRGNDATA, *LPRGNDATA;
typedef struct _ABC
{
int abcA;
UINT abcB;
int abcC;
} ABC, *PABC, *NPABC, *LPABC;
typedef struct _ABCFLOAT
{
FLOAT abcfA;
FLOAT abcfB;
FLOAT abcfC;
} ABCFLOAT, *PABCFLOAT, *NPABCFLOAT, *LPABCFLOAT;
typedef struct _OUTLINETEXTMETRICA
{
UINT otmSize;
TEXTMETRICA otmTextMetrics;
BYTE otmFiller;
PANOSE otmPanoseNumber;
UINT otmfsSelection;
UINT otmfsType;
int otmsCharSlopeRise;
int otmsCharSlopeRun;
int otmItalicAngle;
UINT otmEMSquare;
int otmAscent;
int otmDescent;
UINT otmLineGap;
UINT otmsCapEmHeight;
UINT otmsXHeight;
RECT otmrcFontBox;
int otmMacAscent;
int otmMacDescent;
UINT otmMacLineGap;
UINT otmusMinimumPPEM;
POINT otmptSubscriptSize;
POINT otmptSubscriptOffset;
POINT otmptSuperscriptSize;
POINT otmptSuperscriptOffset;
UINT otmsStrikeoutSize;
int otmsStrikeoutPosition;
int otmsUnderscoreSize;
int otmsUnderscorePosition;
PSTR otmpFamilyName;
PSTR otmpFaceName;
PSTR otmpStyleName;
PSTR otmpFullName;
} OUTLINETEXTMETRICA, *POUTLINETEXTMETRICA, *NPOUTLINETEXTMETRICA, *LPOUTLINETEXTMETRICA;
typedef struct _OUTLINETEXTMETRICW
{
UINT otmSize;
TEXTMETRICW otmTextMetrics;
BYTE otmFiller;
PANOSE otmPanoseNumber;
UINT otmfsSelection;
UINT otmfsType;
int otmsCharSlopeRise;
int otmsCharSlopeRun;
int otmItalicAngle;
UINT otmEMSquare;
int otmAscent;
int otmDescent;
UINT otmLineGap;
UINT otmsCapEmHeight;
UINT otmsXHeight;
RECT otmrcFontBox;
int otmMacAscent;
int otmMacDescent;
UINT otmMacLineGap;
UINT otmusMinimumPPEM;
POINT otmptSubscriptSize;
POINT otmptSubscriptOffset;
POINT otmptSuperscriptSize;
POINT otmptSuperscriptOffset;
UINT otmsStrikeoutSize;
int otmsStrikeoutPosition;
int otmsUnderscoreSize;
int otmsUnderscorePosition;
PSTR otmpFamilyName;
PSTR otmpFaceName;
PSTR otmpStyleName;
PSTR otmpFullName;
} OUTLINETEXTMETRICW, *POUTLINETEXTMETRICW, *NPOUTLINETEXTMETRICW, *LPOUTLINETEXTMETRICW;
typedef OUTLINETEXTMETRICW OUTLINETEXTMETRIC;
typedef POUTLINETEXTMETRICW POUTLINETEXTMETRIC;
typedef NPOUTLINETEXTMETRICW NPOUTLINETEXTMETRIC;
typedef LPOUTLINETEXTMETRICW LPOUTLINETEXTMETRIC;
typedef struct tagPOLYTEXTA
{
int x;
int y;
UINT n;
LPCSTR lpstr;
UINT uiFlags;
RECT rcl;
int *pdx;
} POLYTEXTA, *PPOLYTEXTA, *NPPOLYTEXTA, *LPPOLYTEXTA;
typedef struct tagPOLYTEXTW
{
int x;
int y;
UINT n;
LPCWSTR lpstr;
UINT uiFlags;
RECT rcl;
int *pdx;
} POLYTEXTW, *PPOLYTEXTW, *NPPOLYTEXTW, *LPPOLYTEXTW;
typedef POLYTEXTW POLYTEXT;
typedef PPOLYTEXTW PPOLYTEXT;
typedef NPPOLYTEXTW NPPOLYTEXT;
typedef LPPOLYTEXTW LPPOLYTEXT;
typedef struct _FIXED
{
WORD fract;
short value;
} FIXED;
typedef struct _MAT2
{
FIXED eM11;
FIXED eM12;
FIXED eM21;
FIXED eM22;
} MAT2, *LPMAT2;
typedef struct _GLYPHMETRICS
{
UINT gmBlackBoxX;
UINT gmBlackBoxY;
POINT gmptGlyphOrigin;
short gmCellIncX;
short gmCellIncY;
} GLYPHMETRICS, *LPGLYPHMETRICS;
typedef struct tagPOINTFX
{
FIXED x;
FIXED y;
} POINTFX, *LPPOINTFX;
typedef struct tagTTPOLYCURVE
{
WORD wType;
WORD cpfx;
POINTFX apfx[1];
} TTPOLYCURVE, *LPTTPOLYCURVE;
typedef struct tagTTPOLYGONHEADER
{
DWORD cb;
DWORD dwType;
POINTFX pfxStart;
} TTPOLYGONHEADER, *LPTTPOLYGONHEADER;
typedef struct tagGCP_RESULTSA
{
DWORD lStructSize;
LPSTR lpOutString;
UINT *lpOrder;
int *lpDx;
int *lpCaretPos;
LPSTR lpClass;
LPWSTR lpGlyphs;
UINT nGlyphs;
int nMaxFit;
} GCP_RESULTSA, *LPGCP_RESULTSA;
typedef struct tagGCP_RESULTSW
{
DWORD lStructSize;
LPWSTR lpOutString;
UINT *lpOrder;
int *lpDx;
int *lpCaretPos;
LPSTR lpClass;
LPWSTR lpGlyphs;
UINT nGlyphs;
int nMaxFit;
} GCP_RESULTSW, *LPGCP_RESULTSW;
typedef GCP_RESULTSW GCP_RESULTS;
typedef LPGCP_RESULTSW LPGCP_RESULTS;
typedef struct _RASTERIZER_STATUS
{
short nSize;
short wFlags;
short nLanguageID;
} RASTERIZER_STATUS, *LPRASTERIZER_STATUS;
typedef struct tagPIXELFORMATDESCRIPTOR
{
WORD nSize;
WORD nVersion;
DWORD dwFlags;
BYTE 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;
DWORD dwLayerMask;
DWORD dwVisibleMask;
DWORD dwDamageMask;
} PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
typedef int (*OLDFONTENUMPROCA)(const LOGFONTA *, const TEXTMETRICA *, DWORD, LPARAM);
typedef int (*OLDFONTENUMPROCW)(const LOGFONTW *, const TEXTMETRICW *, DWORD, LPARAM);
typedef OLDFONTENUMPROCA FONTENUMPROCA;
typedef OLDFONTENUMPROCW FONTENUMPROCW;
typedef FONTENUMPROCW FONTENUMPROC;
typedef int (*GOBJENUMPROC)(LPVOID, LPARAM);
typedef void (*LINEDDAPROC)(int, int, LPARAM);
__attribute__((dllimport)) int AddFontResourceA(LPCSTR);
__attribute__((dllimport)) int AddFontResourceW(LPCWSTR);
__attribute__((dllimport)) WINBOOL AnimatePalette(HPALETTE hPal, UINT iStartIndex, UINT cEntries, const PALETTEENTRY *ppe);
__attribute__((dllimport)) WINBOOL Arc(HDC hdc, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
__attribute__((dllimport)) WINBOOL BitBlt(HDC hdc, int x, int y, int cx, int cy, HDC hdcSrc, int x1, int y1, DWORD rop);
__attribute__((dllimport)) WINBOOL CancelDC(HDC hdc);
__attribute__((dllimport)) WINBOOL Chord(HDC hdc, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
__attribute__((dllimport)) int ChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR *ppfd);
__attribute__((dllimport)) HMETAFILE CloseMetaFile(HDC hdc);
__attribute__((dllimport)) int CombineRgn(HRGN hrgnDst, HRGN hrgnSrc1, HRGN hrgnSrc2, int iMode);
__attribute__((dllimport)) HMETAFILE CopyMetaFileA(HMETAFILE, LPCSTR);
__attribute__((dllimport)) HMETAFILE CopyMetaFileW(HMETAFILE, LPCWSTR);
__attribute__((dllimport)) HBITMAP CreateBitmap(int nWidth, int nHeight, UINT nPlanes, UINT nBitCount, const void *lpBits);
__attribute__((dllimport)) HBITMAP CreateBitmapIndirect(const BITMAP *pbm);
__attribute__((dllimport)) HBRUSH CreateBrushIndirect(const LOGBRUSH *plbrush);
__attribute__((dllimport)) HBITMAP CreateCompatibleBitmap(HDC hdc, int cx, int cy);
__attribute__((dllimport)) HBITMAP CreateDiscardableBitmap(HDC hdc, int cx, int cy);
__attribute__((dllimport)) HDC CreateCompatibleDC(HDC hdc);
__attribute__((dllimport)) HDC CreateDCA(LPCSTR pwszDriver, LPCSTR pwszDevice, LPCSTR pszPort, const DEVMODEA *pdm);
__attribute__((dllimport)) HDC CreateDCW(LPCWSTR pwszDriver, LPCWSTR pwszDevice, LPCWSTR pszPort, const DEVMODEW *pdm);
__attribute__((dllimport)) HBITMAP CreateDIBitmap(HDC hdc, const BITMAPINFOHEADER *pbmih, DWORD flInit, const void *pjBits, const BITMAPINFO *pbmi, UINT iUsage);
__attribute__((dllimport)) HBRUSH CreateDIBPatternBrush(HGLOBAL h, UINT iUsage);
__attribute__((dllimport)) HBRUSH CreateDIBPatternBrushPt(const void *lpPackedDIB, UINT iUsage);
__attribute__((dllimport)) HRGN CreateEllipticRgn(int x1, int y1, int x2, int y2);
__attribute__((dllimport)) HRGN CreateEllipticRgnIndirect(const RECT *lprect);
__attribute__((dllimport)) HFONT CreateFontIndirectA(const LOGFONTA *lplf);
__attribute__((dllimport)) HFONT CreateFontIndirectW(const LOGFONTW *lplf);
__attribute__((dllimport)) HFONT CreateFontA(int cHeight, int cWidth, int cEscapement, int cOrientation, int cWeight, DWORD bItalic, DWORD bUnderline, DWORD bStrikeOut, DWORD iCharSet, DWORD iOutPrecision, DWORD iClipPrecision, DWORD iQuality, DWORD iPitchAndFamily, LPCSTR pszFaceName);
__attribute__((dllimport)) HFONT CreateFontW(int cHeight, int cWidth, int cEscapement, int cOrientation, int cWeight, DWORD bItalic, DWORD bUnderline, DWORD bStrikeOut, DWORD iCharSet, DWORD iOutPrecision, DWORD iClipPrecision, DWORD iQuality, DWORD iPitchAndFamily, LPCWSTR pszFaceName);
__attribute__((dllimport)) HBRUSH CreateHatchBrush(int iHatch, COLORREF color);
__attribute__((dllimport)) HDC CreateICA(LPCSTR pszDriver, LPCSTR pszDevice, LPCSTR pszPort, const DEVMODEA *pdm);
__attribute__((dllimport)) HDC CreateICW(LPCWSTR pszDriver, LPCWSTR pszDevice, LPCWSTR pszPort, const DEVMODEW *pdm);
__attribute__((dllimport)) HDC CreateMetaFileA(LPCSTR pszFile);
__attribute__((dllimport)) HDC CreateMetaFileW(LPCWSTR pszFile);
__attribute__((dllimport)) HPALETTE CreatePalette(const LOGPALETTE *plpal);
__attribute__((dllimport)) HPEN CreatePen(int iStyle, int cWidth, COLORREF color);
__attribute__((dllimport)) HPEN CreatePenIndirect(const LOGPEN *plpen);
__attribute__((dllimport)) HRGN CreatePolyPolygonRgn(const POINT *pptl, const INT *pc, int cPoly, int iMode);
__attribute__((dllimport)) HBRUSH CreatePatternBrush(HBITMAP hbm);
__attribute__((dllimport)) HRGN CreateRectRgn(int x1, int y1, int x2, int y2);
__attribute__((dllimport)) HRGN CreateRectRgnIndirect(const RECT *lprect);
__attribute__((dllimport)) HRGN CreateRoundRectRgn(int x1, int y1, int x2, int y2, int w, int h);
__attribute__((dllimport)) WINBOOL CreateScalableFontResourceA(DWORD fdwHidden, LPCSTR lpszFont, LPCSTR lpszFile, LPCSTR lpszPath);
__attribute__((dllimport)) WINBOOL CreateScalableFontResourceW(DWORD fdwHidden, LPCWSTR lpszFont, LPCWSTR lpszFile, LPCWSTR lpszPath);
__attribute__((dllimport)) HBRUSH CreateSolidBrush(COLORREF color);
__attribute__((dllimport)) WINBOOL DeleteDC(HDC hdc);
__attribute__((dllimport)) WINBOOL DeleteMetaFile(HMETAFILE hmf);
__attribute__((dllimport)) WINBOOL DeleteObject(HGDIOBJ ho);
__attribute__((dllimport)) int DescribePixelFormat(HDC hdc, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd);
typedef UINT (*LPFNDEVMODE)(HWND, HMODULE, LPDEVMODE, LPSTR, LPSTR, LPDEVMODE, LPSTR, UINT);
typedef DWORD (*LPFNDEVCAPS)(LPSTR, LPSTR, UINT, LPSTR, LPDEVMODE);
__attribute__((dllimport)) int DeviceCapabilitiesA(LPCSTR pDevice, LPCSTR pPort, WORD fwCapability, LPSTR pOutput, const DEVMODEA *pDevMode);
__attribute__((dllimport)) int DeviceCapabilitiesW(LPCWSTR pDevice, LPCWSTR pPort, WORD fwCapability, LPWSTR pOutput, const DEVMODEW *pDevMode);
__attribute__((dllimport)) int DrawEscape(HDC hdc, int iEscape, int cjIn, LPCSTR lpIn);
__attribute__((dllimport)) WINBOOL Ellipse(HDC hdc, int left, int top, int right, int bottom);
__attribute__((dllimport)) int EnumFontFamiliesExA(HDC hdc, LPLOGFONTA lpLogfont, FONTENUMPROCA lpProc, LPARAM lParam, DWORD dwFlags);
__attribute__((dllimport)) int EnumFontFamiliesExW(HDC hdc, LPLOGFONTW lpLogfont, FONTENUMPROCW lpProc, LPARAM lParam, DWORD dwFlags);
__attribute__((dllimport)) int EnumFontFamiliesA(HDC hdc, LPCSTR lpLogfont, FONTENUMPROCA lpProc, LPARAM lParam);
__attribute__((dllimport)) int EnumFontFamiliesW(HDC hdc, LPCWSTR lpLogfont, FONTENUMPROCW lpProc, LPARAM lParam);
__attribute__((dllimport)) int EnumFontsA(HDC hdc, LPCSTR lpLogfont, FONTENUMPROCA lpProc, LPARAM lParam);
__attribute__((dllimport)) int EnumFontsW(HDC hdc, LPCWSTR lpLogfont, FONTENUMPROCW lpProc, LPARAM lParam);
__attribute__((dllimport)) int EnumObjects(HDC hdc, int nType, GOBJENUMPROC lpFunc, LPARAM lParam);
__attribute__((dllimport)) WINBOOL EqualRgn(HRGN hrgn1, HRGN hrgn2);
__attribute__((dllimport)) int Escape(HDC hdc, int iEscape, int cjIn, LPCSTR pvIn, LPVOID pvOut);
__attribute__((dllimport)) int ExtEscape(HDC hdc, int iEscape, int cjInput, LPCSTR lpInData, int cjOutput, LPSTR lpOutData);
__attribute__((dllimport)) int ExcludeClipRect(HDC hdc, int left, int top, int right, int bottom);
__attribute__((dllimport)) HRGN ExtCreateRegion(const XFORM *lpx, DWORD nCount, const RGNDATA *lpData);
__attribute__((dllimport)) WINBOOL ExtFloodFill(HDC hdc, int x, int y, COLORREF color, UINT type);
__attribute__((dllimport)) WINBOOL FillRgn(HDC hdc, HRGN hrgn, HBRUSH hbr);
__attribute__((dllimport)) WINBOOL FloodFill(HDC hdc, int x, int y, COLORREF color);
__attribute__((dllimport)) WINBOOL FrameRgn(HDC hdc, HRGN hrgn, HBRUSH hbr, int w, int h);
__attribute__((dllimport)) int GetROP2(HDC hdc);
__attribute__((dllimport)) WINBOOL GetAspectRatioFilterEx(HDC hdc, LPSIZE lpsize);
__attribute__((dllimport)) COLORREF GetBkColor(HDC hdc);
__attribute__((dllimport)) COLORREF GetDCBrushColor(HDC hdc);
__attribute__((dllimport)) COLORREF GetDCPenColor(HDC hdc);
__attribute__((dllimport)) int GetBkMode(HDC hdc);
__attribute__((dllimport)) LONG GetBitmapBits(HBITMAP hbit, LONG cb, LPVOID lpvBits);
__attribute__((dllimport)) WINBOOL GetBitmapDimensionEx(HBITMAP hbit, LPSIZE lpsize);
__attribute__((dllimport)) UINT GetBoundsRect(HDC hdc, LPRECT lprect, UINT flags);
__attribute__((dllimport)) WINBOOL GetBrushOrgEx(HDC hdc, LPPOINT lppt);
__attribute__((dllimport)) WINBOOL GetCharWidthA(HDC hdc, UINT iFirst, UINT iLast, LPINT lpBuffer);
__attribute__((dllimport)) WINBOOL GetCharWidthW(HDC hdc, UINT iFirst, UINT iLast, LPINT lpBuffer);
__attribute__((dllimport)) WINBOOL GetCharWidth32A(HDC hdc, UINT iFirst, UINT iLast, LPINT lpBuffer);
__attribute__((dllimport)) WINBOOL GetCharWidth32W(HDC hdc, UINT iFirst, UINT iLast, LPINT lpBuffer);
__attribute__((dllimport)) WINBOOL GetCharWidthFloatA(HDC hdc, UINT iFirst, UINT iLast, PFLOAT lpBuffer);
__attribute__((dllimport)) WINBOOL GetCharWidthFloatW(HDC hdc, UINT iFirst, UINT iLast, PFLOAT lpBuffer);
__attribute__((dllimport)) WINBOOL GetCharABCWidthsA(HDC hdc, UINT wFirst, UINT wLast, LPABC lpABC);
__attribute__((dllimport)) WINBOOL GetCharABCWidthsW(HDC hdc, UINT wFirst, UINT wLast, LPABC lpABC);
__attribute__((dllimport)) WINBOOL GetCharABCWidthsFloatA(HDC hdc, UINT iFirst, UINT iLast, LPABCFLOAT lpABC);
__attribute__((dllimport)) WINBOOL GetCharABCWidthsFloatW(HDC hdc, UINT iFirst, UINT iLast, LPABCFLOAT lpABC);
__attribute__((dllimport)) int GetClipBox(HDC hdc, LPRECT lprect);
__attribute__((dllimport)) int GetClipRgn(HDC hdc, HRGN hrgn);
__attribute__((dllimport)) int GetMetaRgn(HDC hdc, HRGN hrgn);
__attribute__((dllimport)) HGDIOBJ GetCurrentObject(HDC hdc, UINT type);
__attribute__((dllimport)) WINBOOL GetCurrentPositionEx(HDC hdc, LPPOINT lppt);
__attribute__((dllimport)) int GetDeviceCaps(HDC hdc, int index);
__attribute__((dllimport)) int GetDIBits(HDC hdc, HBITMAP hbm, UINT start, UINT cLines, LPVOID lpvBits, LPBITMAPINFO lpbmi, UINT usage);
__attribute__((dllimport)) DWORD GetFontData(HDC hdc, DWORD dwTable, DWORD dwOffset, PVOID pvBuffer, DWORD cjBuffer);
__attribute__((dllimport)) DWORD GetGlyphOutlineA(HDC hdc, UINT uChar, UINT fuFormat, LPGLYPHMETRICS lpgm, DWORD cjBuffer, LPVOID pvBuffer, const MAT2 *lpmat2);
__attribute__((dllimport)) DWORD GetGlyphOutlineW(HDC hdc, UINT uChar, UINT fuFormat, LPGLYPHMETRICS lpgm, DWORD cjBuffer, LPVOID pvBuffer, const MAT2 *lpmat2);
__attribute__((dllimport)) int GetGraphicsMode(HDC hdc);
__attribute__((dllimport)) int GetMapMode(HDC hdc);
__attribute__((dllimport)) UINT GetMetaFileBitsEx(HMETAFILE hMF, UINT cbBuffer, LPVOID lpData);
__attribute__((dllimport)) HMETAFILE GetMetaFileA(LPCSTR lpName);
__attribute__((dllimport)) HMETAFILE GetMetaFileW(LPCWSTR lpName);
__attribute__((dllimport)) COLORREF GetNearestColor(HDC hdc, COLORREF color);
__attribute__((dllimport)) UINT GetNearestPaletteIndex(HPALETTE h, COLORREF color);
__attribute__((dllimport)) DWORD GetObjectType(HGDIOBJ h);
__attribute__((dllimport)) UINT GetOutlineTextMetricsA(HDC hdc, UINT cjCopy, LPOUTLINETEXTMETRICA potm);
__attribute__((dllimport)) UINT GetOutlineTextMetricsW(HDC hdc, UINT cjCopy, LPOUTLINETEXTMETRICW potm);
__attribute__((dllimport)) UINT GetPaletteEntries(HPALETTE hpal, UINT iStart, UINT cEntries, LPPALETTEENTRY pPalEntries);
__attribute__((dllimport)) COLORREF GetPixel(HDC hdc, int x, int y);
__attribute__((dllimport)) int GetPixelFormat(HDC hdc);
__attribute__((dllimport)) int GetPolyFillMode(HDC hdc);
__attribute__((dllimport)) WINBOOL GetRasterizerCaps(LPRASTERIZER_STATUS lpraststat, UINT cjBytes);
__attribute__((dllimport)) int GetRandomRgn(HDC hdc, HRGN hrgn, INT i);
__attribute__((dllimport)) DWORD GetRegionData(HRGN hrgn, DWORD nCount, LPRGNDATA lpRgnData);
__attribute__((dllimport)) int GetRgnBox(HRGN hrgn, LPRECT lprc);
__attribute__((dllimport)) HGDIOBJ GetStockObject(int i);
__attribute__((dllimport)) int GetStretchBltMode(HDC hdc);
__attribute__((dllimport)) UINT GetSystemPaletteEntries(HDC hdc, UINT iStart, UINT cEntries, LPPALETTEENTRY pPalEntries);
__attribute__((dllimport)) UINT GetSystemPaletteUse(HDC hdc);
__attribute__((dllimport)) int GetTextCharacterExtra(HDC hdc);
__attribute__((dllimport)) UINT GetTextAlign(HDC hdc);
__attribute__((dllimport)) COLORREF GetTextColor(HDC hdc);
__attribute__((dllimport)) WINBOOL GetTextExtentPointA(HDC hdc, LPCSTR lpString, int c, LPSIZE lpsz);
__attribute__((dllimport)) WINBOOL GetTextExtentPointW(HDC hdc, LPCWSTR lpString, int c, LPSIZE lpsz);
__attribute__((dllimport)) WINBOOL GetTextExtentPoint32A(HDC hdc, LPCSTR lpString, int c, LPSIZE psizl);
__attribute__((dllimport)) WINBOOL GetTextExtentPoint32W(HDC hdc, LPCWSTR lpString, int c, LPSIZE psizl);
__attribute__((dllimport)) WINBOOL GetTextExtentExPointA(HDC hdc, LPCSTR lpszString, int cchString, int nMaxExtent, LPINT lpnFit, LPINT lpnDx, LPSIZE lpSize);
__attribute__((dllimport)) WINBOOL GetTextExtentExPointW(HDC hdc, LPCWSTR lpszString, int cchString, int nMaxExtent, LPINT lpnFit, LPINT lpnDx, LPSIZE lpSize);
__attribute__((dllimport)) int GetTextCharset(HDC hdc);
__attribute__((dllimport)) int GetTextCharsetInfo(HDC hdc, LPFONTSIGNATURE lpSig, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL TranslateCharsetInfo(DWORD *lpSrc, LPCHARSETINFO lpCs, DWORD dwFlags);
__attribute__((dllimport)) DWORD GetFontLanguageInfo(HDC hdc);
__attribute__((dllimport)) DWORD GetCharacterPlacementA(HDC hdc, LPCSTR lpString, int nCount, int nMexExtent, LPGCP_RESULTSA lpResults, DWORD dwFlags);
__attribute__((dllimport)) DWORD GetCharacterPlacementW(HDC hdc, LPCWSTR lpString, int nCount, int nMexExtent, LPGCP_RESULTSW lpResults, DWORD dwFlags);
typedef struct tagWCRANGE
{
WCHAR wcLow;
USHORT cGlyphs;
} WCRANGE, *PWCRANGE, *LPWCRANGE;
typedef struct tagGLYPHSET
{
DWORD cbThis;
DWORD flAccel;
DWORD cGlyphsSupported;
DWORD cRanges;
WCRANGE ranges[1];
} GLYPHSET, *PGLYPHSET, *LPGLYPHSET;
__attribute__((dllimport)) DWORD GetFontUnicodeRanges(HDC hdc, LPGLYPHSET lpgs);
__attribute__((dllimport)) DWORD GetGlyphIndicesA(HDC hdc, LPCSTR lpstr, int c, LPWORD pgi, DWORD fl);
__attribute__((dllimport)) DWORD GetGlyphIndicesW(HDC hdc, LPCWSTR lpstr, int c, LPWORD pgi, DWORD fl);
__attribute__((dllimport)) WINBOOL GetTextExtentPointI(HDC hdc, LPWORD pgiIn, int cgi, LPSIZE psize);
__attribute__((dllimport)) WINBOOL GetTextExtentExPointI(HDC hdc, LPWORD lpwszString, int cwchString, int nMaxExtent, LPINT lpnFit, LPINT lpnDx, LPSIZE lpSize);
__attribute__((dllimport)) WINBOOL GetCharWidthI(HDC hdc, UINT giFirst, UINT cgi, LPWORD pgi, LPINT piWidths);
__attribute__((dllimport)) WINBOOL GetCharABCWidthsI(HDC hdc, UINT giFirst, UINT cgi, LPWORD pgi, LPABC pabc);
typedef struct tagDESIGNVECTOR
{
DWORD dvReserved;
DWORD dvNumAxes;
LONG dvValues[16];
} DESIGNVECTOR, *PDESIGNVECTOR, *LPDESIGNVECTOR;
__attribute__((dllimport)) int AddFontResourceExA(LPCSTR name, DWORD fl, PVOID res);
__attribute__((dllimport)) int AddFontResourceExW(LPCWSTR name, DWORD fl, PVOID res);
__attribute__((dllimport)) WINBOOL RemoveFontResourceExA(LPCSTR name, DWORD fl, PVOID pdv);
__attribute__((dllimport)) WINBOOL RemoveFontResourceExW(LPCWSTR name, DWORD fl, PVOID pdv);
__attribute__((dllimport)) HANDLE AddFontMemResourceEx(PVOID pFileView, DWORD cjSize, PVOID pvResrved, DWORD *pNumFonts);
__attribute__((dllimport)) WINBOOL RemoveFontMemResourceEx(HANDLE h);
typedef struct tagAXISINFOA
{
LONG axMinValue;
LONG axMaxValue;
BYTE axAxisName[16];
} AXISINFOA, *PAXISINFOA, *LPAXISINFOA;
typedef struct tagAXISINFOW
{
LONG axMinValue;
LONG axMaxValue;
WCHAR axAxisName[16];
} AXISINFOW, *PAXISINFOW, *LPAXISINFOW;
typedef AXISINFOW AXISINFO;
typedef PAXISINFOW PAXISINFO;
typedef LPAXISINFOW LPAXISINFO;
typedef struct tagAXESLISTA
{
DWORD axlReserved;
DWORD axlNumAxes;
AXISINFOA axlAxisInfo[16];
} AXESLISTA, *PAXESLISTA, *LPAXESLISTA;
typedef struct tagAXESLISTW
{
DWORD axlReserved;
DWORD axlNumAxes;
AXISINFOW axlAxisInfo[16];
} AXESLISTW, *PAXESLISTW, *LPAXESLISTW;
typedef AXESLISTW AXESLIST;
typedef PAXESLISTW PAXESLIST;
typedef LPAXESLISTW LPAXESLIST;
typedef struct tagENUMLOGFONTEXDVA
{
ENUMLOGFONTEXA elfEnumLogfontEx;
DESIGNVECTOR elfDesignVector;
} ENUMLOGFONTEXDVA, *PENUMLOGFONTEXDVA, *LPENUMLOGFONTEXDVA;
typedef struct tagENUMLOGFONTEXDVW
{
ENUMLOGFONTEXW elfEnumLogfontEx;
DESIGNVECTOR elfDesignVector;
} ENUMLOGFONTEXDVW, *PENUMLOGFONTEXDVW, *LPENUMLOGFONTEXDVW;
typedef ENUMLOGFONTEXDVW ENUMLOGFONTEXDV;
typedef PENUMLOGFONTEXDVW PENUMLOGFONTEXDV;
typedef LPENUMLOGFONTEXDVW LPENUMLOGFONTEXDV;
__attribute__((dllimport)) HFONT CreateFontIndirectExA(const ENUMLOGFONTEXDVA *);
__attribute__((dllimport)) HFONT CreateFontIndirectExW(const ENUMLOGFONTEXDVW *);
typedef struct tagENUMTEXTMETRICA
{
NEWTEXTMETRICEXA etmNewTextMetricEx;
AXESLISTA etmAxesList;
} ENUMTEXTMETRICA, *PENUMTEXTMETRICA, *LPENUMTEXTMETRICA;
typedef struct tagENUMTEXTMETRICW
{
NEWTEXTMETRICEXW etmNewTextMetricEx;
AXESLISTW etmAxesList;
} ENUMTEXTMETRICW, *PENUMTEXTMETRICW, *LPENUMTEXTMETRICW;
typedef ENUMTEXTMETRICW ENUMTEXTMETRIC;
typedef PENUMTEXTMETRICW PENUMTEXTMETRIC;
typedef LPENUMTEXTMETRICW LPENUMTEXTMETRIC;
__attribute__((dllimport)) WINBOOL GetViewportExtEx(HDC hdc, LPSIZE lpsize);
__attribute__((dllimport)) WINBOOL GetViewportOrgEx(HDC hdc, LPPOINT lppoint);
__attribute__((dllimport)) WINBOOL GetWindowExtEx(HDC hdc, LPSIZE lpsize);
__attribute__((dllimport)) WINBOOL GetWindowOrgEx(HDC hdc, LPPOINT lppoint);
__attribute__((dllimport)) int IntersectClipRect(HDC hdc, int left, int top, int right, int bottom);
__attribute__((dllimport)) WINBOOL InvertRgn(HDC hdc, HRGN hrgn);
__attribute__((dllimport)) WINBOOL LineDDA(int xStart, int yStart, int xEnd, int yEnd, LINEDDAPROC lpProc, LPARAM data);
__attribute__((dllimport)) WINBOOL LineTo(HDC hdc, int x, int y);
__attribute__((dllimport)) WINBOOL MaskBlt(HDC hdcDest, int xDest, int yDest, int width, int height, HDC hdcSrc, int xSrc, int ySrc, HBITMAP hbmMask, int xMask, int yMask, DWORD rop);
__attribute__((dllimport)) WINBOOL PlgBlt(HDC hdcDest, const POINT *lpPoint, HDC hdcSrc, int xSrc, int ySrc, int width, int height, HBITMAP hbmMask, int xMask, int yMask);
__attribute__((dllimport)) int OffsetClipRgn(HDC hdc, int x, int y);
__attribute__((dllimport)) int OffsetRgn(HRGN hrgn, int x, int y);
__attribute__((dllimport)) WINBOOL PatBlt(HDC hdc, int x, int y, int w, int h, DWORD rop);
__attribute__((dllimport)) WINBOOL Pie(HDC hdc, int left, int top, int right, int bottom, int xr1, int yr1, int xr2, int yr2);
__attribute__((dllimport)) WINBOOL PlayMetaFile(HDC hdc, HMETAFILE hmf);
__attribute__((dllimport)) WINBOOL PaintRgn(HDC hdc, HRGN hrgn);
__attribute__((dllimport)) WINBOOL PolyPolygon(HDC hdc, const POINT *apt, const INT *asz, int csz);
__attribute__((dllimport)) WINBOOL PtInRegion(HRGN hrgn, int x, int y);
__attribute__((dllimport)) WINBOOL PtVisible(HDC hdc, int x, int y);
__attribute__((dllimport)) WINBOOL RectInRegion(HRGN hrgn, const RECT *lprect);
__attribute__((dllimport)) WINBOOL RectVisible(HDC hdc, const RECT *lprect);
__attribute__((dllimport)) WINBOOL Rectangle(HDC hdc, int left, int top, int right, int bottom);
__attribute__((dllimport)) WINBOOL RestoreDC(HDC hdc, int nSavedDC);
__attribute__((dllimport)) HDC ResetDCA(HDC hdc, const DEVMODEA *lpdm);
__attribute__((dllimport)) HDC ResetDCW(HDC hdc, const DEVMODEW *lpdm);
__attribute__((dllimport)) UINT RealizePalette(HDC hdc);
__attribute__((dllimport)) WINBOOL RemoveFontResourceA(LPCSTR lpFileName);
__attribute__((dllimport)) WINBOOL RemoveFontResourceW(LPCWSTR lpFileName);
__attribute__((dllimport)) WINBOOL RoundRect(HDC hdc, int left, int top, int right, int bottom, int width, int height);
__attribute__((dllimport)) WINBOOL ResizePalette(HPALETTE hpal, UINT n);
__attribute__((dllimport)) int SaveDC(HDC hdc);
__attribute__((dllimport)) int SelectClipRgn(HDC hdc, HRGN hrgn);
__attribute__((dllimport)) int ExtSelectClipRgn(HDC hdc, HRGN hrgn, int mode);
__attribute__((dllimport)) int SetMetaRgn(HDC hdc);
__attribute__((dllimport)) HGDIOBJ SelectObject(HDC hdc, HGDIOBJ h);
__attribute__((dllimport)) HPALETTE SelectPalette(HDC hdc, HPALETTE hPal, WINBOOL bForceBkgd);
__attribute__((dllimport)) COLORREF SetBkColor(HDC hdc, COLORREF color);
__attribute__((dllimport)) COLORREF SetDCBrushColor(HDC hdc, COLORREF color);
__attribute__((dllimport)) COLORREF SetDCPenColor(HDC hdc, COLORREF color);
__attribute__((dllimport)) int SetBkMode(HDC hdc, int mode);
__attribute__((dllimport)) LONG SetBitmapBits(HBITMAP hbm, DWORD cb, const void *pvBits);
__attribute__((dllimport)) UINT SetBoundsRect(HDC hdc, const RECT *lprect, UINT flags);
__attribute__((dllimport)) int SetDIBits(HDC hdc, HBITMAP hbm, UINT start, UINT cLines, const void *lpBits, const BITMAPINFO *lpbmi, UINT ColorUse);
__attribute__((dllimport)) int SetDIBitsToDevice(HDC hdc, int xDest, int yDest, DWORD w, DWORD h, int xSrc, int ySrc, UINT StartScan, UINT cLines, const void *lpvBits, const BITMAPINFO *lpbmi, UINT ColorUse);
__attribute__((dllimport)) DWORD SetMapperFlags(HDC hdc, DWORD flags);
__attribute__((dllimport)) int SetGraphicsMode(HDC hdc, int iMode);
__attribute__((dllimport)) int SetMapMode(HDC hdc, int iMode);
__attribute__((dllimport)) DWORD SetLayout(HDC hdc, DWORD l);
__attribute__((dllimport)) DWORD GetLayout(HDC hdc);
__attribute__((dllimport)) HMETAFILE SetMetaFileBitsEx(UINT cbBuffer, const BYTE *lpData);
__attribute__((dllimport)) UINT SetPaletteEntries(HPALETTE hpal, UINT iStart, UINT cEntries, const PALETTEENTRY *pPalEntries);
__attribute__((dllimport)) COLORREF SetPixel(HDC hdc, int x, int y, COLORREF color);
__attribute__((dllimport)) WINBOOL SetPixelV(HDC hdc, int x, int y, COLORREF color);
__attribute__((dllimport)) WINBOOL SetPixelFormat(HDC hdc, int format, const PIXELFORMATDESCRIPTOR *ppfd);
__attribute__((dllimport)) int SetPolyFillMode(HDC hdc, int mode);
__attribute__((dllimport)) WINBOOL StretchBlt(HDC hdcDest, int xDest, int yDest, int wDest, int hDest, HDC hdcSrc, int xSrc, int ySrc, int wSrc, int hSrc, DWORD rop);
__attribute__((dllimport)) WINBOOL SetRectRgn(HRGN hrgn, int left, int top, int right, int bottom);
__attribute__((dllimport)) int StretchDIBits(HDC hdc, int xDest, int yDest, int DestWidth, int DestHeight, int xSrc, int ySrc, int SrcWidth, int SrcHeight, const void *lpBits, const BITMAPINFO *lpbmi, UINT iUsage, DWORD rop);
__attribute__((dllimport)) int SetROP2(HDC hdc, int rop2);
__attribute__((dllimport)) int SetStretchBltMode(HDC hdc, int mode);
__attribute__((dllimport)) UINT SetSystemPaletteUse(HDC hdc, UINT use);
__attribute__((dllimport)) int SetTextCharacterExtra(HDC hdc, int extra);
__attribute__((dllimport)) COLORREF SetTextColor(HDC hdc, COLORREF color);
__attribute__((dllimport)) UINT SetTextAlign(HDC hdc, UINT align);
__attribute__((dllimport)) WINBOOL SetTextJustification(HDC hdc, int extra, int count);
__attribute__((dllimport)) WINBOOL UpdateColors(HDC hdc);
typedef USHORT COLOR16;
typedef struct _TRIVERTEX
{
LONG x;
LONG y;
COLOR16 Red;
COLOR16 Green;
COLOR16 Blue;
COLOR16 Alpha;
} TRIVERTEX, *PTRIVERTEX, *LPTRIVERTEX;
typedef struct _GRADIENT_TRIANGLE
{
ULONG Vertex1;
ULONG Vertex2;
ULONG Vertex3;
} GRADIENT_TRIANGLE, *PGRADIENT_TRIANGLE, *LPGRADIENT_TRIANGLE;
typedef struct _GRADIENT_RECT
{
ULONG UpperLeft;
ULONG LowerRight;
} GRADIENT_RECT, *PGRADIENT_RECT, *LPGRADIENT_RECT;
typedef struct _BLENDFUNCTION
{
BYTE BlendOp;
BYTE BlendFlags;
BYTE SourceConstantAlpha;
BYTE AlphaFormat;
} BLENDFUNCTION, *PBLENDFUNCTION;
__attribute__((dllimport)) WINBOOL AlphaBlend(HDC hdcDest, int xoriginDest, int yoriginDest, int wDest, int hDest, HDC hdcSrc, int xoriginSrc, int yoriginSrc, int wSrc, int hSrc, BLENDFUNCTION ftn);
__attribute__((dllimport)) WINBOOL GdiAlphaBlend(HDC hdcDest, int xoriginDest, int yoriginDest, int wDest, int hDest, HDC hdcSrc, int xoriginSrc, int yoriginSrc, int wSrc, int hSrc, BLENDFUNCTION ftn);
__attribute__((dllimport)) WINBOOL TransparentBlt(HDC hdcDest, int xoriginDest, int yoriginDest, int wDest, int hDest, HDC hdcSrc, int xoriginSrc, int yoriginSrc, int wSrc, int hSrc, UINT crTransparent);
__attribute__((dllimport)) WINBOOL GdiTransparentBlt(HDC hdcDest, int xoriginDest, int yoriginDest, int wDest, int hDest, HDC hdcSrc, int xoriginSrc, int yoriginSrc, int wSrc, int hSrc, UINT crTransparent);
__attribute__((dllimport)) WINBOOL GradientFill(HDC hdc, PTRIVERTEX pVertex, ULONG nVertex, PVOID pMesh, ULONG nMesh, ULONG ulMode);
__attribute__((dllimport)) WINBOOL GdiGradientFill(HDC hdc, PTRIVERTEX pVertex, ULONG nVertex, PVOID pMesh, ULONG nMesh, ULONG ulMode);
__attribute__((dllimport)) WINBOOL PlayMetaFileRecord(HDC hdc, LPHANDLETABLE lpHandleTable, LPMETARECORD lpMR, UINT noObjs);
typedef int (*MFENUMPROC)(HDC hdc, HANDLETABLE *lpht, METARECORD *lpMR, int nObj, LPARAM lParam);
__attribute__((dllimport)) WINBOOL EnumMetaFile(HDC hdc, HMETAFILE hmf, MFENUMPROC lpProc, LPARAM lParam);
typedef int (*ENHMFENUMPROC)(HDC hdc, HANDLETABLE *lpht, const ENHMETARECORD *lpmr, int hHandles, LPARAM data);
__attribute__((dllimport)) HENHMETAFILE CloseEnhMetaFile(HDC hdc);
__attribute__((dllimport)) HENHMETAFILE CopyEnhMetaFileA(HENHMETAFILE hEnh, LPCSTR lpFileName);
__attribute__((dllimport)) HENHMETAFILE CopyEnhMetaFileW(HENHMETAFILE hEnh, LPCWSTR lpFileName);
__attribute__((dllimport)) HDC CreateEnhMetaFileA(HDC hdc, LPCSTR lpFilename, const RECT *lprc, LPCSTR lpDesc);
__attribute__((dllimport)) HDC CreateEnhMetaFileW(HDC hdc, LPCWSTR lpFilename, const RECT *lprc, LPCWSTR lpDesc);
__attribute__((dllimport)) WINBOOL DeleteEnhMetaFile(HENHMETAFILE hmf);
__attribute__((dllimport)) WINBOOL EnumEnhMetaFile(HDC hdc, HENHMETAFILE hmf, ENHMFENUMPROC lpProc, LPVOID lpParam, const RECT *lpRect);
__attribute__((dllimport)) HENHMETAFILE GetEnhMetaFileA(LPCSTR lpName);
__attribute__((dllimport)) HENHMETAFILE GetEnhMetaFileW(LPCWSTR lpName);
__attribute__((dllimport)) UINT GetEnhMetaFileBits(HENHMETAFILE hEMF, UINT nSize, LPBYTE lpData);
__attribute__((dllimport)) UINT GetEnhMetaFileDescriptionA(HENHMETAFILE hemf, UINT cchBuffer, LPSTR lpDescription);
__attribute__((dllimport)) UINT GetEnhMetaFileDescriptionW(HENHMETAFILE hemf, UINT cchBuffer, LPWSTR lpDescription);
__attribute__((dllimport)) UINT GetEnhMetaFileHeader(HENHMETAFILE hemf, UINT nSize, LPENHMETAHEADER lpEnhMetaHeader);
__attribute__((dllimport)) UINT GetEnhMetaFilePaletteEntries(HENHMETAFILE hemf, UINT nNumEntries, LPPALETTEENTRY lpPaletteEntries);
__attribute__((dllimport)) UINT GetEnhMetaFilePixelFormat(HENHMETAFILE hemf, UINT cbBuffer, PIXELFORMATDESCRIPTOR *ppfd);
__attribute__((dllimport)) UINT GetWinMetaFileBits(HENHMETAFILE hemf, UINT cbData16, LPBYTE pData16, INT iMapMode, HDC hdcRef);
__attribute__((dllimport)) WINBOOL PlayEnhMetaFile(HDC hdc, HENHMETAFILE hmf, const RECT *lprect);
__attribute__((dllimport)) WINBOOL PlayEnhMetaFileRecord(HDC hdc, LPHANDLETABLE pht, const ENHMETARECORD *pmr, UINT cht);
__attribute__((dllimport)) HENHMETAFILE SetEnhMetaFileBits(UINT nSize, const BYTE *pb);
__attribute__((dllimport)) HENHMETAFILE SetWinMetaFileBits(UINT nSize, const BYTE *lpMeta16Data, HDC hdcRef, const METAFILEPICT *lpMFP);
__attribute__((dllimport)) WINBOOL GdiComment(HDC hdc, UINT nSize, const BYTE *lpData);
__attribute__((dllimport)) WINBOOL GetTextMetricsA(HDC hdc, LPTEXTMETRICA lptm);
__attribute__((dllimport)) WINBOOL GetTextMetricsW(HDC hdc, LPTEXTMETRICW lptm);
typedef struct tagDIBSECTION
{
BITMAP dsBm;
BITMAPINFOHEADER dsBmih;
DWORD dsBitfields[3];
HANDLE dshSection;
DWORD dsOffset;
} DIBSECTION, *LPDIBSECTION, *PDIBSECTION;
__attribute__((dllimport)) WINBOOL AngleArc(HDC hdc, int x, int y, DWORD r, FLOAT StartAngle, FLOAT SweepAngle);
__attribute__((dllimport)) WINBOOL PolyPolyline(HDC hdc, const POINT *apt, const DWORD *asz, DWORD csz);
__attribute__((dllimport)) WINBOOL GetWorldTransform(HDC hdc, LPXFORM lpxf);
__attribute__((dllimport)) WINBOOL SetWorldTransform(HDC hdc, const XFORM *lpxf);
__attribute__((dllimport)) WINBOOL ModifyWorldTransform(HDC hdc, const XFORM *lpxf, DWORD mode);
__attribute__((dllimport)) WINBOOL CombineTransform(LPXFORM lpxfOut, const XFORM *lpxf1, const XFORM *lpxf2);
__attribute__((dllimport)) HBITMAP CreateDIBSection(HDC hdc, const BITMAPINFO *lpbmi, UINT usage, void **ppvBits, HANDLE hSection, DWORD offset);
__attribute__((dllimport)) UINT GetDIBColorTable(HDC hdc, UINT iStart, UINT cEntries, RGBQUAD *prgbq);
__attribute__((dllimport)) UINT SetDIBColorTable(HDC hdc, UINT iStart, UINT cEntries, const RGBQUAD *prgbq);
typedef struct tagCOLORADJUSTMENT
{
WORD caSize;
WORD caFlags;
WORD caIlluminantIndex;
WORD caRedGamma;
WORD caGreenGamma;
WORD caBlueGamma;
WORD caReferenceBlack;
WORD caReferenceWhite;
SHORT caContrast;
SHORT caBrightness;
SHORT caColorfulness;
SHORT caRedGreenTint;
} COLORADJUSTMENT, *PCOLORADJUSTMENT, *LPCOLORADJUSTMENT;
__attribute__((dllimport)) WINBOOL SetColorAdjustment(HDC hdc, const COLORADJUSTMENT *lpca);
__attribute__((dllimport)) WINBOOL GetColorAdjustment(HDC hdc, LPCOLORADJUSTMENT lpca);
__attribute__((dllimport)) HPALETTE CreateHalftonePalette(HDC hdc);
typedef WINBOOL (*ABORTPROC)(HDC, int);
typedef struct _DOCINFOA
{
int cbSize;
LPCSTR lpszDocName;
LPCSTR lpszOutput;
LPCSTR lpszDatatype;
DWORD fwType;
} DOCINFOA, *LPDOCINFOA;
typedef struct _DOCINFOW
{
int cbSize;
LPCWSTR lpszDocName;
LPCWSTR lpszOutput;
LPCWSTR lpszDatatype;
DWORD fwType;
} DOCINFOW, *LPDOCINFOW;
typedef DOCINFOW DOCINFO;
typedef LPDOCINFOW LPDOCINFO;
__attribute__((dllimport)) int StartDocA(HDC hdc, const DOCINFOA *lpdi);
__attribute__((dllimport)) int StartDocW(HDC hdc, const DOCINFOW *lpdi);
__attribute__((dllimport)) int EndDoc(HDC hdc);
__attribute__((dllimport)) int StartPage(HDC hdc);
__attribute__((dllimport)) int EndPage(HDC hdc);
__attribute__((dllimport)) int AbortDoc(HDC hdc);
__attribute__((dllimport)) int SetAbortProc(HDC hdc, ABORTPROC lpProc);
__attribute__((dllimport)) WINBOOL AbortPath(HDC hdc);
__attribute__((dllimport)) WINBOOL ArcTo(HDC hdc, int left, int top, int right, int bottom, int xr1, int yr1, int xr2, int yr2);
__attribute__((dllimport)) WINBOOL BeginPath(HDC hdc);
__attribute__((dllimport)) WINBOOL CloseFigure(HDC hdc);
__attribute__((dllimport)) WINBOOL EndPath(HDC hdc);
__attribute__((dllimport)) WINBOOL FillPath(HDC hdc);
__attribute__((dllimport)) WINBOOL FlattenPath(HDC hdc);
__attribute__((dllimport)) int GetPath(HDC hdc, LPPOINT apt, LPBYTE aj, int cpt);
__attribute__((dllimport)) HRGN PathToRegion(HDC hdc);
__attribute__((dllimport)) WINBOOL PolyDraw(HDC hdc, const POINT *apt, const BYTE *aj, int cpt);
__attribute__((dllimport)) WINBOOL SelectClipPath(HDC hdc, int mode);
__attribute__((dllimport)) int SetArcDirection(HDC hdc, int dir);
__attribute__((dllimport)) WINBOOL SetMiterLimit(HDC hdc, FLOAT limit, PFLOAT old);
__attribute__((dllimport)) WINBOOL StrokeAndFillPath(HDC hdc);
__attribute__((dllimport)) WINBOOL StrokePath(HDC hdc);
__attribute__((dllimport)) WINBOOL WidenPath(HDC hdc);
__attribute__((dllimport)) HPEN ExtCreatePen(DWORD iPenStyle, DWORD cWidth, const LOGBRUSH *plbrush, DWORD cStyle, const DWORD *pstyle);
__attribute__((dllimport)) WINBOOL GetMiterLimit(HDC hdc, PFLOAT plimit);
__attribute__((dllimport)) int GetArcDirection(HDC hdc);
__attribute__((dllimport)) int GetObjectA(HANDLE h, int c, LPVOID pv);
__attribute__((dllimport)) int GetObjectW(HANDLE h, int c, LPVOID pv);
__attribute__((dllimport)) WINBOOL MoveToEx(HDC hdc, int x, int y, LPPOINT lppt);
__attribute__((dllimport)) WINBOOL TextOutA(HDC hdc, int x, int y, LPCSTR lpString, int c);
__attribute__((dllimport)) WINBOOL TextOutW(HDC hdc, int x, int y, LPCWSTR lpString, int c);
__attribute__((dllimport)) WINBOOL ExtTextOutA(HDC hdc, int x, int y, UINT options, const RECT *lprect, LPCSTR lpString, UINT c, const INT *lpDx);
__attribute__((dllimport)) WINBOOL ExtTextOutW(HDC hdc, int x, int y, UINT options, const RECT *lprect, LPCWSTR lpString, UINT c, const INT *lpDx);
__attribute__((dllimport)) WINBOOL PolyTextOutA(HDC hdc, const POLYTEXTA *ppt, int nstrings);
__attribute__((dllimport)) WINBOOL PolyTextOutW(HDC hdc, const POLYTEXTW *ppt, int nstrings);
__attribute__((dllimport)) HRGN CreatePolygonRgn(const POINT *pptl, int cPoint, int iMode);
__attribute__((dllimport)) WINBOOL DPtoLP(HDC hdc, LPPOINT lppt, int c);
__attribute__((dllimport)) WINBOOL LPtoDP(HDC hdc, LPPOINT lppt, int c);
__attribute__((dllimport)) WINBOOL Polygon(HDC hdc, const POINT *apt, int cpt);
__attribute__((dllimport)) WINBOOL Polyline(HDC hdc, const POINT *apt, int cpt);
__attribute__((dllimport)) WINBOOL PolyBezier(HDC hdc, const POINT *apt, DWORD cpt);
__attribute__((dllimport)) WINBOOL PolyBezierTo(HDC hdc, const POINT *apt, DWORD cpt);
__attribute__((dllimport)) WINBOOL PolylineTo(HDC hdc, const POINT *apt, DWORD cpt);
__attribute__((dllimport)) WINBOOL SetViewportExtEx(HDC hdc, int x, int y, LPSIZE lpsz);
__attribute__((dllimport)) WINBOOL SetViewportOrgEx(HDC hdc, int x, int y, LPPOINT lppt);
__attribute__((dllimport)) WINBOOL SetWindowExtEx(HDC hdc, int x, int y, LPSIZE lpsz);
__attribute__((dllimport)) WINBOOL SetWindowOrgEx(HDC hdc, int x, int y, LPPOINT lppt);
__attribute__((dllimport)) WINBOOL OffsetViewportOrgEx(HDC hdc, int x, int y, LPPOINT lppt);
__attribute__((dllimport)) WINBOOL OffsetWindowOrgEx(HDC hdc, int x, int y, LPPOINT lppt);
__attribute__((dllimport)) WINBOOL ScaleViewportExtEx(HDC hdc, int xn, int dx, int yn, int yd, LPSIZE lpsz);
__attribute__((dllimport)) WINBOOL ScaleWindowExtEx(HDC hdc, int xn, int xd, int yn, int yd, LPSIZE lpsz);
__attribute__((dllimport)) WINBOOL SetBitmapDimensionEx(HBITMAP hbm, int w, int h, LPSIZE lpsz);
__attribute__((dllimport)) WINBOOL SetBrushOrgEx(HDC hdc, int x, int y, LPPOINT lppt);
__attribute__((dllimport)) int GetTextFaceA(HDC hdc, int c, LPSTR lpName);
__attribute__((dllimport)) int GetTextFaceW(HDC hdc, int c, LPWSTR lpName);
typedef struct tagKERNINGPAIR
{
WORD wFirst;
WORD wSecond;
int iKernAmount;
} KERNINGPAIR, *LPKERNINGPAIR;
__attribute__((dllimport)) DWORD GetKerningPairsA(HDC hdc, DWORD nPairs, LPKERNINGPAIR lpKernPair);
__attribute__((dllimport)) DWORD GetKerningPairsW(HDC hdc, DWORD nPairs, LPKERNINGPAIR lpKernPair);
__attribute__((dllimport)) WINBOOL GetDCOrgEx(HDC hdc, LPPOINT lppt);
__attribute__((dllimport)) WINBOOL FixBrushOrgEx(HDC hdc, int x, int y, LPPOINT ptl);
__attribute__((dllimport)) WINBOOL UnrealizeObject(HGDIOBJ h);
__attribute__((dllimport)) WINBOOL GdiFlush(void);
__attribute__((dllimport)) DWORD GdiSetBatchLimit(DWORD dw);
__attribute__((dllimport)) DWORD GdiGetBatchLimit(void);
typedef int (*ICMENUMPROCA)(LPSTR, LPARAM);
typedef int (*ICMENUMPROCW)(LPWSTR, LPARAM);
__attribute__((dllimport)) int SetICMMode(HDC hdc, int mode);
__attribute__((dllimport)) WINBOOL CheckColorsInGamut(HDC hdc, LPVOID lpRGBTriple, LPVOID dlpBuffer, DWORD nCount);
__attribute__((dllimport)) HCOLORSPACE GetColorSpace(HDC hdc);
__attribute__((dllimport)) WINBOOL GetLogColorSpaceA(HCOLORSPACE hColorSpace, LPLOGCOLORSPACEA lpBuffer, DWORD nSize);
__attribute__((dllimport)) WINBOOL GetLogColorSpaceW(HCOLORSPACE hColorSpace, LPLOGCOLORSPACEW lpBuffer, DWORD nSize);
__attribute__((dllimport)) HCOLORSPACE CreateColorSpaceA(LPLOGCOLORSPACEA lplcs);
__attribute__((dllimport)) HCOLORSPACE CreateColorSpaceW(LPLOGCOLORSPACEW lplcs);
__attribute__((dllimport)) HCOLORSPACE SetColorSpace(HDC hdc, HCOLORSPACE hcs);
__attribute__((dllimport)) WINBOOL DeleteColorSpace(HCOLORSPACE hcs);
__attribute__((dllimport)) WINBOOL GetICMProfileA(HDC hdc, LPDWORD pBufSize, LPSTR pszFilename);
__attribute__((dllimport)) WINBOOL GetICMProfileW(HDC hdc, LPDWORD pBufSize, LPWSTR pszFilename);
__attribute__((dllimport)) WINBOOL SetICMProfileA(HDC hdc, LPSTR lpFileName);
__attribute__((dllimport)) WINBOOL SetICMProfileW(HDC hdc, LPWSTR lpFileName);
__attribute__((dllimport)) WINBOOL GetDeviceGammaRamp(HDC hdc, LPVOID lpRamp);
__attribute__((dllimport)) WINBOOL SetDeviceGammaRamp(HDC hdc, LPVOID lpRamp);
__attribute__((dllimport)) WINBOOL ColorMatchToTarget(HDC hdc, HDC hdcTarget, DWORD action);
__attribute__((dllimport)) int EnumICMProfilesA(HDC hdc, ICMENUMPROCA lpProc, LPARAM lParam);
__attribute__((dllimport)) int EnumICMProfilesW(HDC hdc, ICMENUMPROCW lpProc, LPARAM lParam);
__attribute__((dllimport)) WINBOOL UpdateICMRegKeyA(DWORD reserved, LPSTR lpszCMID, LPSTR lpszFileName, UINT command);
__attribute__((dllimport)) WINBOOL UpdateICMRegKeyW(DWORD reserved, LPWSTR lpszCMID, LPWSTR lpszFileName, UINT command);
__attribute__((dllimport)) WINBOOL ColorCorrectPalette(HDC hdc, HPALETTE hPal, DWORD deFirst, DWORD num);
typedef struct tagEMR
{
DWORD iType;
DWORD nSize;
} EMR, *PEMR;
typedef struct tagEMRTEXT
{
POINTL ptlReference;
DWORD nChars;
DWORD offString;
DWORD fOptions;
RECTL rcl;
DWORD offDx;
} EMRTEXT, *PEMRTEXT;
typedef struct tagABORTPATH
{
EMR emr;
} EMRABORTPATH, *PEMRABORTPATH, EMRBEGINPATH, *PEMRBEGINPATH, EMRENDPATH, *PEMRENDPATH, EMRCLOSEFIGURE, *PEMRCLOSEFIGURE, EMRFLATTENPATH, *PEMRFLATTENPATH, EMRWIDENPATH, *PEMRWIDENPATH, EMRSETMETARGN, *PEMRSETMETARGN, EMRSAVEDC, *PEMRSAVEDC, EMRREALIZEPALETTE, *PEMRREALIZEPALETTE;
typedef struct tagEMRSELECTCLIPPATH
{
EMR emr;
DWORD iMode;
} EMRSELECTCLIPPATH, *PEMRSELECTCLIPPATH, EMRSETBKMODE, *PEMRSETBKMODE, EMRSETMAPMODE, *PEMRSETMAPMODE, EMRSETLAYOUT, *PEMRSETLAYOUT,
EMRSETPOLYFILLMODE, *PEMRSETPOLYFILLMODE, EMRSETROP2, *PEMRSETROP2, EMRSETSTRETCHBLTMODE, *PEMRSETSTRETCHBLTMODE, EMRSETICMMODE,
*PEMRSETICMMODE, EMRSETTEXTALIGN, *PEMRSETTEXTALIGN;
typedef struct tagEMRSETMITERLIMIT
{
EMR emr;
FLOAT eMiterLimit;
} EMRSETMITERLIMIT, *PEMRSETMITERLIMIT;
typedef struct tagEMRRESTOREDC
{
EMR emr;
LONG iRelative;
} EMRRESTOREDC, *PEMRRESTOREDC;
typedef struct tagEMRSETARCDIRECTION
{
EMR emr;
DWORD iArcDirection;
} EMRSETARCDIRECTION, *PEMRSETARCDIRECTION;
typedef struct tagEMRSETMAPPERFLAGS
{
EMR emr;
DWORD dwFlags;
} EMRSETMAPPERFLAGS, *PEMRSETMAPPERFLAGS;
typedef struct tagEMRSETTEXTCOLOR
{
EMR emr;
COLORREF crColor;
} EMRSETBKCOLOR, *PEMRSETBKCOLOR, EMRSETTEXTCOLOR, *PEMRSETTEXTCOLOR;
typedef struct tagEMRSELECTOBJECT
{
EMR emr;
DWORD ihObject;
} EMRSELECTOBJECT, *PEMRSELECTOBJECT, EMRDELETEOBJECT, *PEMRDELETEOBJECT;
typedef struct tagEMRSELECTPALETTE
{
EMR emr;
DWORD ihPal;
} EMRSELECTPALETTE, *PEMRSELECTPALETTE;
typedef struct tagEMRRESIZEPALETTE
{
EMR emr;
DWORD ihPal;
DWORD cEntries;
} EMRRESIZEPALETTE, *PEMRRESIZEPALETTE;
typedef struct tagEMRSETPALETTEENTRIES
{
EMR emr;
DWORD ihPal;
DWORD iStart;
DWORD cEntries;
PALETTEENTRY aPalEntries[1];
} EMRSETPALETTEENTRIES, *PEMRSETPALETTEENTRIES;
typedef struct tagEMRSETCOLORADJUSTMENT
{
EMR emr;
COLORADJUSTMENT ColorAdjustment;
} EMRSETCOLORADJUSTMENT, *PEMRSETCOLORADJUSTMENT;
typedef struct tagEMRGDICOMMENT
{
EMR emr;
DWORD cbData;
BYTE Data[1];
} EMRGDICOMMENT, *PEMRGDICOMMENT;
typedef struct tagEMREOF
{
EMR emr;
DWORD nPalEntries;
DWORD offPalEntries;
DWORD nSizeLast;
} EMREOF, *PEMREOF;
typedef struct tagEMRLINETO
{
EMR emr;
POINTL ptl;
} EMRLINETO, *PEMRLINETO, EMRMOVETOEX, *PEMRMOVETOEX;
typedef struct tagEMROFFSETCLIPRGN
{
EMR emr;
POINTL ptlOffset;
} EMROFFSETCLIPRGN, *PEMROFFSETCLIPRGN;
typedef struct tagEMRFILLPATH
{
EMR emr;
RECTL rclBounds;
} EMRFILLPATH, *PEMRFILLPATH, EMRSTROKEANDFILLPATH, *PEMRSTROKEANDFILLPATH, EMRSTROKEPATH, *PEMRSTROKEPATH;
typedef struct tagEMREXCLUDECLIPRECT
{
EMR emr;
RECTL rclClip;
} EMREXCLUDECLIPRECT, *PEMREXCLUDECLIPRECT, EMRINTERSECTCLIPRECT, *PEMRINTERSECTCLIPRECT;
typedef struct tagEMRSETVIEWPORTORGEX
{
EMR emr;
POINTL ptlOrigin;
} EMRSETVIEWPORTORGEX, *PEMRSETVIEWPORTORGEX, EMRSETWINDOWORGEX, *PEMRSETWINDOWORGEX, EMRSETBRUSHORGEX, *PEMRSETBRUSHORGEX;
typedef struct tagEMRSETVIEWPORTEXTEX
{
EMR emr;
SIZEL szlExtent;
} EMRSETVIEWPORTEXTEX, *PEMRSETVIEWPORTEXTEX, EMRSETWINDOWEXTEX, *PEMRSETWINDOWEXTEX;
typedef struct tagEMRSCALEVIEWPORTEXTEX
{
EMR emr;
LONG xNum;
LONG xDenom;
LONG yNum;
LONG yDenom;
} EMRSCALEVIEWPORTEXTEX, *PEMRSCALEVIEWPORTEXTEX, EMRSCALEWINDOWEXTEX, *PEMRSCALEWINDOWEXTEX;
typedef struct tagEMRSETWORLDTRANSFORM
{
EMR emr;
XFORM xform;
} EMRSETWORLDTRANSFORM, *PEMRSETWORLDTRANSFORM;
typedef struct tagEMRMODIFYWORLDTRANSFORM
{
EMR emr;
XFORM xform;
DWORD iMode;
} EMRMODIFYWORLDTRANSFORM, *PEMRMODIFYWORLDTRANSFORM;
typedef struct tagEMRSETPIXELV
{
EMR emr;
POINTL ptlPixel;
COLORREF crColor;
} EMRSETPIXELV, *PEMRSETPIXELV;
typedef struct tagEMREXTFLOODFILL
{
EMR emr;
POINTL ptlStart;
COLORREF crColor;
DWORD iMode;
} EMREXTFLOODFILL, *PEMREXTFLOODFILL;
typedef struct tagEMRELLIPSE
{
EMR emr;
RECTL rclBox;
} EMRELLIPSE, *PEMRELLIPSE, EMRRECTANGLE, *PEMRRECTANGLE;
typedef struct tagEMRROUNDRECT
{
EMR emr;
RECTL rclBox;
SIZEL szlCorner;
} EMRROUNDRECT, *PEMRROUNDRECT;
typedef struct tagEMRARC
{
EMR emr;
RECTL rclBox;
POINTL ptlStart;
POINTL ptlEnd;
} EMRARC, *PEMRARC, EMRARCTO, *PEMRARCTO, EMRCHORD, *PEMRCHORD, EMRPIE, *PEMRPIE;
typedef struct tagEMRANGLEARC
{
EMR emr;
POINTL ptlCenter;
DWORD nRadius;
FLOAT eStartAngle;
FLOAT eSweepAngle;
} EMRANGLEARC, *PEMRANGLEARC;
typedef struct tagEMRPOLYLINE
{
EMR emr;
RECTL rclBounds;
DWORD cptl;
POINTL aptl[1];
} EMRPOLYLINE, *PEMRPOLYLINE, EMRPOLYBEZIER, *PEMRPOLYBEZIER, EMRPOLYGON, *PEMRPOLYGON, EMRPOLYBEZIERTO, *PEMRPOLYBEZIERTO, EMRPOLYLINETO, *PEMRPOLYLINETO;
typedef struct tagEMRPOLYLINE16
{
EMR emr;
RECTL rclBounds;
DWORD cpts;
POINTS apts[1];
} EMRPOLYLINE16, *PEMRPOLYLINE16, EMRPOLYBEZIER16, *PEMRPOLYBEZIER16, EMRPOLYGON16, *PEMRPOLYGON16, EMRPOLYBEZIERTO16, *PEMRPOLYBEZIERTO16, EMRPOLYLINETO16, *PEMRPOLYLINETO16;
typedef struct tagEMRPOLYDRAW
{
EMR emr;
RECTL rclBounds;
DWORD cptl;
POINTL aptl[1];
BYTE abTypes[1];
} EMRPOLYDRAW, *PEMRPOLYDRAW;
typedef struct tagEMRPOLYDRAW16
{
EMR emr;
RECTL rclBounds;
DWORD cpts;
POINTS apts[1];
BYTE abTypes[1];
} EMRPOLYDRAW16, *PEMRPOLYDRAW16;
typedef struct tagEMRPOLYPOLYLINE
{
EMR emr;
RECTL rclBounds;
DWORD nPolys;
DWORD cptl;
DWORD aPolyCounts[1];
POINTL aptl[1];
} EMRPOLYPOLYLINE, *PEMRPOLYPOLYLINE, EMRPOLYPOLYGON, *PEMRPOLYPOLYGON;
typedef struct tagEMRPOLYPOLYLINE16
{
EMR emr;
RECTL rclBounds;
DWORD nPolys;
DWORD cpts;
DWORD aPolyCounts[1];
POINTS apts[1];
} EMRPOLYPOLYLINE16, *PEMRPOLYPOLYLINE16, EMRPOLYPOLYGON16, *PEMRPOLYPOLYGON16;
typedef struct tagEMRINVERTRGN
{
EMR emr;
RECTL rclBounds;
DWORD cbRgnData;
BYTE RgnData[1];
} EMRINVERTRGN, *PEMRINVERTRGN, EMRPAINTRGN, *PEMRPAINTRGN;
typedef struct tagEMRFILLRGN
{
EMR emr;
RECTL rclBounds;
DWORD cbRgnData;
DWORD ihBrush;
BYTE RgnData[1];
} EMRFILLRGN, *PEMRFILLRGN;
typedef struct tagEMRFRAMERGN
{
EMR emr;
RECTL rclBounds;
DWORD cbRgnData;
DWORD ihBrush;
SIZEL szlStroke;
BYTE RgnData[1];
} EMRFRAMERGN, *PEMRFRAMERGN;
typedef struct tagEMREXTSELECTCLIPRGN
{
EMR emr;
DWORD cbRgnData;
DWORD iMode;
BYTE RgnData[1];
} EMREXTSELECTCLIPRGN, *PEMREXTSELECTCLIPRGN;
typedef struct tagEMREXTTEXTOUTA
{
EMR emr;
RECTL rclBounds;
DWORD iGraphicsMode;
FLOAT exScale;
FLOAT eyScale;
EMRTEXT emrtext;
} EMREXTTEXTOUTA, *PEMREXTTEXTOUTA, EMREXTTEXTOUTW, *PEMREXTTEXTOUTW;
typedef struct tagEMRPOLYTEXTOUTA
{
EMR emr;
RECTL rclBounds;
DWORD iGraphicsMode;
FLOAT exScale;
FLOAT eyScale;
LONG cStrings;
EMRTEXT aemrtext[1];
} EMRPOLYTEXTOUTA, *PEMRPOLYTEXTOUTA, EMRPOLYTEXTOUTW, *PEMRPOLYTEXTOUTW;
typedef struct tagEMRBITBLT
{
EMR emr;
RECTL rclBounds;
LONG xDest;
LONG yDest;
LONG cxDest;
LONG cyDest;
DWORD dwRop;
LONG xSrc;
LONG ySrc;
XFORM xformSrc;
COLORREF crBkColorSrc;
DWORD iUsageSrc;
DWORD offBmiSrc;
DWORD cbBmiSrc;
DWORD offBitsSrc;
DWORD cbBitsSrc;
} EMRBITBLT, *PEMRBITBLT;
typedef struct tagEMRSTRETCHBLT
{
EMR emr;
RECTL rclBounds;
LONG xDest;
LONG yDest;
LONG cxDest;
LONG cyDest;
DWORD dwRop;
LONG xSrc;
LONG ySrc;
XFORM xformSrc;
COLORREF crBkColorSrc;
DWORD iUsageSrc;
DWORD offBmiSrc;
DWORD cbBmiSrc;
DWORD offBitsSrc;
DWORD cbBitsSrc;
LONG cxSrc;
LONG cySrc;
} EMRSTRETCHBLT, *PEMRSTRETCHBLT;
typedef struct tagEMRMASKBLT
{
EMR emr;
RECTL rclBounds;
LONG xDest;
LONG yDest;
LONG cxDest;
LONG cyDest;
DWORD dwRop;
LONG xSrc;
LONG ySrc;
XFORM xformSrc;
COLORREF crBkColorSrc;
DWORD iUsageSrc;
DWORD offBmiSrc;
DWORD cbBmiSrc;
DWORD offBitsSrc;
DWORD cbBitsSrc;
LONG xMask;
LONG yMask;
DWORD iUsageMask;
DWORD offBmiMask;
DWORD cbBmiMask;
DWORD offBitsMask;
DWORD cbBitsMask;
} EMRMASKBLT, *PEMRMASKBLT;
typedef struct tagEMRPLGBLT
{
EMR emr;
RECTL rclBounds;
POINTL aptlDest[3];
LONG xSrc;
LONG ySrc;
LONG cxSrc;
LONG cySrc;
XFORM xformSrc;
COLORREF crBkColorSrc;
DWORD iUsageSrc;
DWORD offBmiSrc;
DWORD cbBmiSrc;
DWORD offBitsSrc;
DWORD cbBitsSrc;
LONG xMask;
LONG yMask;
DWORD iUsageMask;
DWORD offBmiMask;
DWORD cbBmiMask;
DWORD offBitsMask;
DWORD cbBitsMask;
} EMRPLGBLT, *PEMRPLGBLT;
typedef struct tagEMRSETDIBITSTODEVICE
{
EMR emr;
RECTL rclBounds;
LONG xDest;
LONG yDest;
LONG xSrc;
LONG ySrc;
LONG cxSrc;
LONG cySrc;
DWORD offBmiSrc;
DWORD cbBmiSrc;
DWORD offBitsSrc;
DWORD cbBitsSrc;
DWORD iUsageSrc;
DWORD iStartScan;
DWORD cScans;
} EMRSETDIBITSTODEVICE, *PEMRSETDIBITSTODEVICE;
typedef struct tagEMRSTRETCHDIBITS
{
EMR emr;
RECTL rclBounds;
LONG xDest;
LONG yDest;
LONG xSrc;
LONG ySrc;
LONG cxSrc;
LONG cySrc;
DWORD offBmiSrc;
DWORD cbBmiSrc;
DWORD offBitsSrc;
DWORD cbBitsSrc;
DWORD iUsageSrc;
DWORD dwRop;
LONG cxDest;
LONG cyDest;
} EMRSTRETCHDIBITS, *PEMRSTRETCHDIBITS;
typedef struct tagEMREXTCREATEFONTINDIRECTW
{
EMR emr;
DWORD ihFont;
EXTLOGFONTW elfw;
} EMREXTCREATEFONTINDIRECTW, *PEMREXTCREATEFONTINDIRECTW;
typedef struct tagEMRCREATEPALETTE
{
EMR emr;
DWORD ihPal;
LOGPALETTE lgpl;
} EMRCREATEPALETTE, *PEMRCREATEPALETTE;
typedef struct tagEMRCREATEPEN
{
EMR emr;
DWORD ihPen;
LOGPEN lopn;
} EMRCREATEPEN, *PEMRCREATEPEN;
typedef struct tagEMREXTCREATEPEN
{
EMR emr;
DWORD ihPen;
DWORD offBmi;
DWORD cbBmi;
DWORD offBits;
DWORD cbBits;
EXTLOGPEN elp;
} EMREXTCREATEPEN, *PEMREXTCREATEPEN;
typedef struct tagEMRCREATEBRUSHINDIRECT
{
EMR emr;
DWORD ihBrush;
LOGBRUSH32 lb;
} EMRCREATEBRUSHINDIRECT, *PEMRCREATEBRUSHINDIRECT;
typedef struct tagEMRCREATEMONOBRUSH
{
EMR emr;
DWORD ihBrush;
DWORD iUsage;
DWORD offBmi;
DWORD cbBmi;
DWORD offBits;
DWORD cbBits;
} EMRCREATEMONOBRUSH, *PEMRCREATEMONOBRUSH;
typedef struct tagEMRCREATEDIBPATTERNBRUSHPT
{
EMR emr;
DWORD ihBrush;
DWORD iUsage;
DWORD offBmi;
DWORD cbBmi;
DWORD offBits;
DWORD cbBits;
} EMRCREATEDIBPATTERNBRUSHPT, *PEMRCREATEDIBPATTERNBRUSHPT;
typedef struct tagEMRFORMAT
{
DWORD dSignature;
DWORD nVersion;
DWORD cbData;
DWORD offData;
} EMRFORMAT, *PEMRFORMAT;
typedef struct tagEMRGLSRECORD
{
EMR emr;
DWORD cbData;
BYTE Data[1];
} EMRGLSRECORD, *PEMRGLSRECORD;
typedef struct tagEMRGLSBOUNDEDRECORD
{
EMR emr;
RECTL rclBounds;
DWORD cbData;
BYTE Data[1];
} EMRGLSBOUNDEDRECORD, *PEMRGLSBOUNDEDRECORD;
typedef struct tagEMRPIXELFORMAT
{
EMR emr;
PIXELFORMATDESCRIPTOR pfd;
} EMRPIXELFORMAT, *PEMRPIXELFORMAT;
typedef struct tagEMRCREATECOLORSPACE
{
EMR emr;
DWORD ihCS;
LOGCOLORSPACEA lcs;
} EMRCREATECOLORSPACE, *PEMRCREATECOLORSPACE;
typedef struct tagEMRSETCOLORSPACE
{
EMR emr;
DWORD ihCS;
} EMRSETCOLORSPACE, *PEMRSETCOLORSPACE, EMRSELECTCOLORSPACE, *PEMRSELECTCOLORSPACE, EMRDELETECOLORSPACE, *PEMRDELETECOLORSPACE;
typedef struct tagEMREXTESCAPE
{
EMR emr;
INT iEscape;
INT cbEscData;
BYTE EscData[1];
} EMREXTESCAPE, *PEMREXTESCAPE, EMRDRAWESCAPE, *PEMRDRAWESCAPE;
typedef struct tagEMRNAMEDESCAPE
{
EMR emr;
INT iEscape;
INT cbDriver;
INT cbEscData;
BYTE EscData[1];
} EMRNAMEDESCAPE, *PEMRNAMEDESCAPE;
typedef struct tagEMRSETICMPROFILE
{
EMR emr;
DWORD dwFlags;
DWORD cbName;
DWORD cbData;
BYTE Data[1];
} EMRSETICMPROFILE, *PEMRSETICMPROFILE, EMRSETICMPROFILEA, *PEMRSETICMPROFILEA, EMRSETICMPROFILEW, *PEMRSETICMPROFILEW;
typedef struct tagEMRCREATECOLORSPACEW
{
EMR emr;
DWORD ihCS;
LOGCOLORSPACEW lcs;
DWORD dwFlags;
DWORD cbData;
BYTE Data[1];
} EMRCREATECOLORSPACEW, *PEMRCREATECOLORSPACEW;
typedef struct tagCOLORMATCHTOTARGET
{
EMR emr;
DWORD dwAction;
DWORD dwFlags;
DWORD cbName;
DWORD cbData;
BYTE Data[1];
} EMRCOLORMATCHTOTARGET, *PEMRCOLORMATCHTOTARGET;
typedef struct tagCOLORCORRECTPALETTE
{
EMR emr;
DWORD ihPalette;
DWORD nFirstEntry;
DWORD nPalEntries;
DWORD nReserved;
} EMRCOLORCORRECTPALETTE, *PEMRCOLORCORRECTPALETTE;
typedef struct tagEMRALPHABLEND
{
EMR emr;
RECTL rclBounds;
LONG xDest;
LONG yDest;
LONG cxDest;
LONG cyDest;
DWORD dwRop;
LONG xSrc;
LONG ySrc;
XFORM xformSrc;
COLORREF crBkColorSrc;
DWORD iUsageSrc;
DWORD offBmiSrc;
DWORD cbBmiSrc;
DWORD offBitsSrc;
DWORD cbBitsSrc;
LONG cxSrc;
LONG cySrc;
} EMRALPHABLEND, *PEMRALPHABLEND;
typedef struct tagEMRGRADIENTFILL
{
EMR emr;
RECTL rclBounds;
DWORD nVer;
DWORD nTri;
ULONG ulMode;
TRIVERTEX Ver[1];
} EMRGRADIENTFILL, *PEMRGRADIENTFILL;
typedef struct tagEMRTRANSPARENTBLT
{
EMR emr;
RECTL rclBounds;
LONG xDest;
LONG yDest;
LONG cxDest;
LONG cyDest;
DWORD dwRop;
LONG xSrc;
LONG ySrc;
XFORM xformSrc;
COLORREF crBkColorSrc;
DWORD iUsageSrc;
DWORD offBmiSrc;
DWORD cbBmiSrc;
DWORD offBitsSrc;
DWORD cbBitsSrc;
LONG cxSrc;
LONG cySrc;
} EMRTRANSPARENTBLT, *PEMRTRANSPARENTBLT;
__attribute__((dllimport)) WINBOOL wglCopyContext(HGLRC, HGLRC, UINT);
__attribute__((dllimport)) HGLRC wglCreateContext(HDC);
__attribute__((dllimport)) HGLRC wglCreateLayerContext(HDC, int);
__attribute__((dllimport)) WINBOOL wglDeleteContext(HGLRC);
__attribute__((dllimport)) HGLRC wglGetCurrentContext(void);
__attribute__((dllimport)) HDC wglGetCurrentDC(void);
__attribute__((dllimport)) PROC wglGetProcAddress(LPCSTR);
__attribute__((dllimport)) WINBOOL wglMakeCurrent(HDC, HGLRC);
__attribute__((dllimport)) WINBOOL wglShareLists(HGLRC, HGLRC);
__attribute__((dllimport)) WINBOOL wglUseFontBitmapsA(HDC, DWORD, DWORD, DWORD);
__attribute__((dllimport)) WINBOOL wglUseFontBitmapsW(HDC, DWORD, DWORD, DWORD);
__attribute__((dllimport)) WINBOOL SwapBuffers(HDC);
typedef struct _POINTFLOAT
{
FLOAT x;
FLOAT y;
} POINTFLOAT, *PPOINTFLOAT;
typedef struct _GLYPHMETRICSFLOAT
{
FLOAT gmfBlackBoxX;
FLOAT gmfBlackBoxY;
POINTFLOAT gmfptGlyphOrigin;
FLOAT gmfCellIncX;
FLOAT gmfCellIncY;
} GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
__attribute__((dllimport)) WINBOOL wglUseFontOutlinesA(HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, int, LPGLYPHMETRICSFLOAT);
__attribute__((dllimport)) WINBOOL wglUseFontOutlinesW(HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, int, LPGLYPHMETRICSFLOAT);
typedef struct tagLAYERPLANEDESCRIPTOR
{
WORD nSize;
WORD nVersion;
DWORD dwFlags;
BYTE 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;
COLORREF crTransparent;
} LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
__attribute__((dllimport)) WINBOOL wglDescribeLayerPlane(HDC, int, int, UINT, LPLAYERPLANEDESCRIPTOR);
__attribute__((dllimport)) int wglSetLayerPaletteEntries(HDC, int, int, int, const COLORREF *);
__attribute__((dllimport)) int wglGetLayerPaletteEntries(HDC, int, int, int, COLORREF *);
__attribute__((dllimport)) WINBOOL wglRealizeLayerPalette(HDC, int, WINBOOL);
__attribute__((dllimport)) WINBOOL wglSwapLayerBuffers(HDC, UINT);
typedef struct _WGLSWAP
{
HDC hdc;
UINT uiFlags;
} WGLSWAP, *PWGLSWAP, *LPWGLSWAP;
__attribute__((dllimport)) DWORD wglSwapMultipleBuffers(UINT, const WGLSWAP *);
typedef HANDLE HDWP;
typedef void MENUTEMPLATEA;
typedef void MENUTEMPLATEW;
typedef PVOID LPMENUTEMPLATEA;
typedef PVOID LPMENUTEMPLATEW;
typedef MENUTEMPLATEW MENUTEMPLATE;
typedef LPMENUTEMPLATEW LPMENUTEMPLATE;
typedef LRESULT (*WNDPROC)(HWND, UINT, WPARAM, LPARAM);
typedef INT_PTR (*DLGPROC)(HWND, UINT, WPARAM, LPARAM);
typedef void (*TIMERPROC)(HWND, UINT, UINT_PTR, DWORD);
typedef WINBOOL (*GRAYSTRINGPROC)(HDC, LPARAM, int);
typedef WINBOOL (*WNDENUMPROC)(HWND, LPARAM);
typedef LRESULT (*HOOKPROC)(int code, WPARAM wParam, LPARAM lParam);
typedef void (*SENDASYNCPROC)(HWND, UINT, ULONG_PTR, LRESULT);
typedef WINBOOL (*PROPENUMPROCA)(HWND, LPCSTR, HANDLE);
typedef WINBOOL (*PROPENUMPROCW)(HWND, LPCWSTR, HANDLE);
typedef WINBOOL (*PROPENUMPROCEXA)(HWND, LPSTR, HANDLE, ULONG_PTR);
typedef WINBOOL (*PROPENUMPROCEXW)(HWND, LPWSTR, HANDLE, ULONG_PTR);
typedef int (*EDITWORDBREAKPROCA)(LPSTR lpch, int ichCurrent, int cch, int code);
typedef int (*EDITWORDBREAKPROCW)(LPWSTR lpch, int ichCurrent, int cch, int code);
typedef WINBOOL (*DRAWSTATEPROC)(HDC hdc, LPARAM lData, WPARAM wData, int cx, int cy);
typedef PROPENUMPROCW PROPENUMPROC;
typedef PROPENUMPROCEXW PROPENUMPROCEX;
typedef EDITWORDBREAKPROCW EDITWORDBREAKPROC;
typedef WINBOOL (*NAMEENUMPROCA)(LPSTR, LPARAM);
typedef WINBOOL (*NAMEENUMPROCW)(LPWSTR, LPARAM);
typedef NAMEENUMPROCA WINSTAENUMPROCA;
typedef NAMEENUMPROCW WINSTAENUMPROCW;
typedef NAMEENUMPROCA DESKTOPENUMPROCA;
typedef NAMEENUMPROCW DESKTOPENUMPROCW;
typedef WINSTAENUMPROCW WINSTAENUMPROC;
typedef DESKTOPENUMPROCW DESKTOPENUMPROC;
__attribute__((dllimport)) int wvsprintfA(LPSTR, LPCSTR, va_list arglist);
__attribute__((dllimport)) int wvsprintfW(LPWSTR, LPCWSTR, va_list arglist);
__attribute__((dllimport)) int __attribute__((__cdecl__)) wsprintfA(LPSTR, LPCSTR, ...);
__attribute__((dllimport)) int __attribute__((__cdecl__)) wsprintfW(LPWSTR, LPCWSTR, ...);
typedef struct tagCBT_CREATEWNDA
{
struct tagCREATESTRUCTA *lpcs;
HWND hwndInsertAfter;
} CBT_CREATEWNDA, *LPCBT_CREATEWNDA;
typedef struct tagCBT_CREATEWNDW
{
struct tagCREATESTRUCTW *lpcs;
HWND hwndInsertAfter;
} CBT_CREATEWNDW, *LPCBT_CREATEWNDW;
typedef CBT_CREATEWNDW CBT_CREATEWND;
typedef LPCBT_CREATEWNDW LPCBT_CREATEWND;
typedef struct tagCBTACTIVATESTRUCT
{
WINBOOL fMouse;
HWND hWndActive;
} CBTACTIVATESTRUCT, *LPCBTACTIVATESTRUCT;
typedef struct tagWTSSESSION_NOTIFICATION
{
DWORD cbSize;
DWORD dwSessionId;
} WTSSESSION_NOTIFICATION, *PWTSSESSION_NOTIFICATION;
typedef struct
{
HWND hwnd;
RECT rc;
} SHELLHOOKINFO, *LPSHELLHOOKINFO;
typedef struct tagEVENTMSG
{
UINT message;
UINT paramL;
UINT paramH;
DWORD time;
HWND hwnd;
} EVENTMSG, *PEVENTMSGMSG, *NPEVENTMSGMSG, *LPEVENTMSGMSG;
typedef struct tagEVENTMSG *PEVENTMSG, *NPEVENTMSG, *LPEVENTMSG;
typedef struct tagCWPSTRUCT
{
LPARAM lParam;
WPARAM wParam;
UINT message;
HWND hwnd;
} CWPSTRUCT, *PCWPSTRUCT, *NPCWPSTRUCT, *LPCWPSTRUCT;
typedef struct tagCWPRETSTRUCT
{
LRESULT lResult;
LPARAM lParam;
WPARAM wParam;
UINT message;
HWND hwnd;
} CWPRETSTRUCT, *PCWPRETSTRUCT, *NPCWPRETSTRUCT, *LPCWPRETSTRUCT;
typedef struct tagKBDLLHOOKSTRUCT
{
DWORD vkCode;
DWORD scanCode;
DWORD flags;
DWORD time;
ULONG_PTR dwExtraInfo;
} KBDLLHOOKSTRUCT, *LPKBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT;
typedef struct tagMSLLHOOKSTRUCT
{
POINT pt;
DWORD mouseData;
DWORD flags;
DWORD time;
ULONG_PTR dwExtraInfo;
} MSLLHOOKSTRUCT, *LPMSLLHOOKSTRUCT, *PMSLLHOOKSTRUCT;
typedef struct tagDEBUGHOOKINFO
{
DWORD idThread;
DWORD idThreadInstaller;
LPARAM lParam;
WPARAM wParam;
int code;
} DEBUGHOOKINFO, *PDEBUGHOOKINFO, *NPDEBUGHOOKINFO, *LPDEBUGHOOKINFO;
typedef struct tagMOUSEHOOKSTRUCT
{
POINT pt;
HWND hwnd;
UINT wHitTestCode;
ULONG_PTR dwExtraInfo;
} MOUSEHOOKSTRUCT, *LPMOUSEHOOKSTRUCT, *PMOUSEHOOKSTRUCT;
typedef struct tagMOUSEHOOKSTRUCTEX
{
MOUSEHOOKSTRUCT __unnamed;
DWORD mouseData;
} MOUSEHOOKSTRUCTEX, *LPMOUSEHOOKSTRUCTEX, *PMOUSEHOOKSTRUCTEX;
typedef struct tagHARDWAREHOOKSTRUCT
{
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
} HARDWAREHOOKSTRUCT, *LPHARDWAREHOOKSTRUCT, *PHARDWAREHOOKSTRUCT;
__attribute__((dllimport)) HKL LoadKeyboardLayoutA(LPCSTR pwszKLID, UINT Flags);
__attribute__((dllimport)) HKL LoadKeyboardLayoutW(LPCWSTR pwszKLID, UINT Flags);
__attribute__((dllimport)) HKL ActivateKeyboardLayout(HKL hkl, UINT Flags);
__attribute__((dllimport)) int ToUnicodeEx(UINT wVirtKey, UINT wScanCode, const BYTE *lpKeyState, LPWSTR pwszBuff, int cchBuff, UINT wFlags, HKL dwhkl);
__attribute__((dllimport)) WINBOOL UnloadKeyboardLayout(HKL hkl);
__attribute__((dllimport)) WINBOOL GetKeyboardLayoutNameA(LPSTR pwszKLID);
__attribute__((dllimport)) WINBOOL GetKeyboardLayoutNameW(LPWSTR pwszKLID);
__attribute__((dllimport)) int GetKeyboardLayoutList(int nBuff, HKL *lpList);
__attribute__((dllimport)) HKL GetKeyboardLayout(DWORD idThread);
typedef struct tagMOUSEMOVEPOINT
{
int x;
int y;
DWORD time;
ULONG_PTR dwExtraInfo;
} MOUSEMOVEPOINT, *PMOUSEMOVEPOINT, *LPMOUSEMOVEPOINT;
__attribute__((dllimport)) int GetMouseMovePointsEx(UINT cbSize, LPMOUSEMOVEPOINT lppt, LPMOUSEMOVEPOINT lpptBuf, int nBufPoints, DWORD resolution);
__attribute__((dllimport)) HDESK CreateDesktopA(LPCSTR lpszDesktop, LPCSTR lpszDevice, LPDEVMODEA pDevmode, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa);
__attribute__((dllimport)) HDESK CreateDesktopW(LPCWSTR lpszDesktop, LPCWSTR lpszDevice, LPDEVMODEW pDevmode, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa);
__attribute__((dllimport)) HDESK CreateDesktopExA(LPCSTR lpszDesktop, LPCSTR lpszDevice, DEVMODEA *pDevmode, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa, ULONG ulHeapSize, PVOID pvoid);
__attribute__((dllimport)) HDESK CreateDesktopExW(LPCWSTR lpszDesktop, LPCWSTR lpszDevice, DEVMODEW *pDevmode, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa, ULONG ulHeapSize, PVOID pvoid);
__attribute__((dllimport)) HDESK OpenDesktopA(LPCSTR lpszDesktop, DWORD dwFlags, WINBOOL fInherit, ACCESS_MASK dwDesiredAccess);
__attribute__((dllimport)) HDESK OpenDesktopW(LPCWSTR lpszDesktop, DWORD dwFlags, WINBOOL fInherit, ACCESS_MASK dwDesiredAccess);
__attribute__((dllimport)) HDESK OpenInputDesktop(DWORD dwFlags, WINBOOL fInherit, ACCESS_MASK dwDesiredAccess);
__attribute__((dllimport)) WINBOOL EnumDesktopsA(HWINSTA hwinsta, DESKTOPENUMPROCA lpEnumFunc, LPARAM lParam);
__attribute__((dllimport)) WINBOOL EnumDesktopsW(HWINSTA hwinsta, DESKTOPENUMPROCW lpEnumFunc, LPARAM lParam);
__attribute__((dllimport)) WINBOOL EnumDesktopWindows(HDESK hDesktop, WNDENUMPROC lpfn, LPARAM lParam);
__attribute__((dllimport)) WINBOOL SwitchDesktop(HDESK hDesktop);
__attribute__((dllimport)) WINBOOL SetThreadDesktop(HDESK hDesktop);
__attribute__((dllimport)) WINBOOL CloseDesktop(HDESK hDesktop);
__attribute__((dllimport)) HDESK GetThreadDesktop(DWORD dwThreadId);
__attribute__((dllimport)) HWINSTA CreateWindowStationA(LPCSTR lpwinsta, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa);
__attribute__((dllimport)) HWINSTA CreateWindowStationW(LPCWSTR lpwinsta, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa);
__attribute__((dllimport)) HWINSTA OpenWindowStationA(LPCSTR lpszWinSta, WINBOOL fInherit, ACCESS_MASK dwDesiredAccess);
__attribute__((dllimport)) HWINSTA OpenWindowStationW(LPCWSTR lpszWinSta, WINBOOL fInherit, ACCESS_MASK dwDesiredAccess);
__attribute__((dllimport)) WINBOOL EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc, LPARAM lParam);
__attribute__((dllimport)) WINBOOL EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc, LPARAM lParam);
__attribute__((dllimport)) WINBOOL CloseWindowStation(HWINSTA hWinSta);
__attribute__((dllimport)) WINBOOL SetProcessWindowStation(HWINSTA hWinSta);
__attribute__((dllimport)) HWINSTA GetProcessWindowStation(void);
__attribute__((dllimport)) WINBOOL SetUserObjectSecurity(HANDLE hObj, PSECURITY_INFORMATION pSIRequested, PSECURITY_DESCRIPTOR pSID);
__attribute__((dllimport)) WINBOOL GetUserObjectSecurity(HANDLE hObj, PSECURITY_INFORMATION pSIRequested, PSECURITY_DESCRIPTOR pSID, DWORD nLength, LPDWORD lpnLengthNeeded);
typedef struct tagUSEROBJECTFLAGS
{
WINBOOL fInherit;
WINBOOL fReserved;
DWORD dwFlags;
} USEROBJECTFLAGS, *PUSEROBJECTFLAGS;
__attribute__((dllimport)) WINBOOL GetUserObjectInformationA(HANDLE hObj, int nIndex, PVOID pvInfo, DWORD nLength, LPDWORD lpnLengthNeeded);
__attribute__((dllimport)) WINBOOL GetUserObjectInformationW(HANDLE hObj, int nIndex, PVOID pvInfo, DWORD nLength, LPDWORD lpnLengthNeeded);
__attribute__((dllimport)) WINBOOL SetUserObjectInformationA(HANDLE hObj, int nIndex, PVOID pvInfo, DWORD nLength);
__attribute__((dllimport)) WINBOOL SetUserObjectInformationW(HANDLE hObj, int nIndex, PVOID pvInfo, DWORD nLength);
typedef struct tagWNDCLASSEXA
{
UINT cbSize;
UINT style;
WNDPROC lpfnWndProc;
int cbClsExtra;
int cbWndExtra;
HINSTANCE hInstance;
HICON hIcon;
HCURSOR hCursor;
HBRUSH hbrBackground;
LPCSTR lpszMenuName;
LPCSTR lpszClassName;
HICON hIconSm;
} WNDCLASSEXA, *PWNDCLASSEXA, *NPWNDCLASSEXA, *LPWNDCLASSEXA;
typedef struct tagWNDCLASSEXW
{
UINT cbSize;
UINT style;
WNDPROC lpfnWndProc;
int cbClsExtra;
int cbWndExtra;
HINSTANCE hInstance;
HICON hIcon;
HCURSOR hCursor;
HBRUSH hbrBackground;
LPCWSTR lpszMenuName;
LPCWSTR lpszClassName;
HICON hIconSm;
} WNDCLASSEXW, *PWNDCLASSEXW, *NPWNDCLASSEXW, *LPWNDCLASSEXW;
typedef WNDCLASSEXW WNDCLASSEX;
typedef PWNDCLASSEXW PWNDCLASSEX;
typedef NPWNDCLASSEXW NPWNDCLASSEX;
typedef LPWNDCLASSEXW LPWNDCLASSEX;
typedef struct tagWNDCLASSA
{
UINT style;
WNDPROC lpfnWndProc;
int cbClsExtra;
int cbWndExtra;
HINSTANCE hInstance;
HICON hIcon;
HCURSOR hCursor;
HBRUSH hbrBackground;
LPCSTR lpszMenuName;
LPCSTR lpszClassName;
} WNDCLASSA, *PWNDCLASSA, *NPWNDCLASSA, *LPWNDCLASSA;
typedef struct tagWNDCLASSW
{
UINT style;
WNDPROC lpfnWndProc;
int cbClsExtra;
int cbWndExtra;
HINSTANCE hInstance;
HICON hIcon;
HCURSOR hCursor;
HBRUSH hbrBackground;
LPCWSTR lpszMenuName;
LPCWSTR lpszClassName;
} WNDCLASSW, *PWNDCLASSW, *NPWNDCLASSW, *LPWNDCLASSW;
typedef WNDCLASSW WNDCLASS;
typedef PWNDCLASSW PWNDCLASS;
typedef NPWNDCLASSW NPWNDCLASS;
typedef LPWNDCLASSW LPWNDCLASS;
__attribute__((dllimport)) WINBOOL IsHungAppWindow(HWND hwnd);
__attribute__((dllimport)) void DisableProcessWindowsGhosting(void);
typedef struct tagMSG
{
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
} MSG, *PMSG, *NPMSG, *LPMSG;
typedef struct tagMINMAXINFO
{
POINT ptReserved;
POINT ptMaxSize;
POINT ptMaxPosition;
POINT ptMinTrackSize;
POINT ptMaxTrackSize;
} MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO;
typedef struct tagCOPYDATASTRUCT
{
ULONG_PTR dwData;
DWORD cbData;
PVOID lpData;
} COPYDATASTRUCT, *PCOPYDATASTRUCT;
typedef struct tagMDINEXTMENU
{
HMENU hmenuIn;
HMENU hmenuNext;
HWND hwndNext;
} MDINEXTMENU, *PMDINEXTMENU, *LPMDINEXTMENU;
typedef struct
{
GUID PowerSetting;
DWORD DataLength;
UCHAR Data[1];
} POWERBROADCAST_SETTING, *PPOWERBROADCAST_SETTING;
__attribute__((dllimport)) UINT RegisterWindowMessageA(LPCSTR lpString);
__attribute__((dllimport)) UINT RegisterWindowMessageW(LPCWSTR lpString);
typedef struct tagWINDOWPOS
{
HWND hwnd;
HWND hwndInsertAfter;
int x;
int y;
int cx;
int cy;
UINT flags;
} WINDOWPOS, *LPWINDOWPOS, *PWINDOWPOS;
typedef struct tagNCCALCSIZE_PARAMS
{
RECT rgrc[3];
PWINDOWPOS lppos;
} NCCALCSIZE_PARAMS, *LPNCCALCSIZE_PARAMS;
typedef struct tagTRACKMOUSEEVENT
{
DWORD cbSize;
DWORD dwFlags;
HWND hwndTrack;
DWORD dwHoverTime;
} TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;
__attribute__((dllimport)) WINBOOL TrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack);
__attribute__((dllimport)) WINBOOL DrawEdge(HDC hdc, LPRECT qrc, UINT edge, UINT grfFlags);
__attribute__((dllimport)) WINBOOL DrawFrameControl(HDC, LPRECT, UINT, UINT);
__attribute__((dllimport)) WINBOOL DrawCaption(HWND hwnd, HDC hdc, const RECT *lprect, UINT flags);
__attribute__((dllimport)) WINBOOL DrawAnimatedRects(HWND hwnd, int idAni, const RECT *lprcFrom, const RECT *lprcTo);
typedef struct tagACCEL
{
BYTE fVirt;
WORD key;
WORD cmd;
} ACCEL, *LPACCEL;
typedef struct tagPAINTSTRUCT
{
HDC hdc;
WINBOOL fErase;
RECT rcPaint;
WINBOOL fRestore;
WINBOOL fIncUpdate;
BYTE rgbReserved[32];
} PAINTSTRUCT, *PPAINTSTRUCT, *NPPAINTSTRUCT, *LPPAINTSTRUCT;
typedef struct tagCREATESTRUCTA
{
LPVOID lpCreateParams;
HINSTANCE hInstance;
HMENU hMenu;
HWND hwndParent;
int cy;
int cx;
int y;
int x;
LONG style;
LPCSTR lpszName;
LPCSTR lpszClass;
DWORD dwExStyle;
} CREATESTRUCTA, *LPCREATESTRUCTA;
typedef struct tagCREATESTRUCTW
{
LPVOID lpCreateParams;
HINSTANCE hInstance;
HMENU hMenu;
HWND hwndParent;
int cy;
int cx;
int y;
int x;
LONG style;
LPCWSTR lpszName;
LPCWSTR lpszClass;
DWORD dwExStyle;
} CREATESTRUCTW, *LPCREATESTRUCTW;
typedef CREATESTRUCTW CREATESTRUCT;
typedef LPCREATESTRUCTW LPCREATESTRUCT;
typedef struct tagWINDOWPLACEMENT
{
UINT length;
UINT flags;
UINT showCmd;
POINT ptMinPosition;
POINT ptMaxPosition;
RECT rcNormalPosition;
} WINDOWPLACEMENT;
typedef WINDOWPLACEMENT *PWINDOWPLACEMENT, *LPWINDOWPLACEMENT;
typedef struct tagNMHDR
{
HWND hwndFrom;
UINT_PTR idFrom;
UINT code;
} NMHDR;
typedef NMHDR *LPNMHDR;
typedef struct tagSTYLESTRUCT
{
DWORD styleOld;
DWORD styleNew;
} STYLESTRUCT, *LPSTYLESTRUCT;
typedef struct tagMEASUREITEMSTRUCT
{
UINT CtlType;
UINT CtlID;
UINT itemID;
UINT itemWidth;
UINT itemHeight;
ULONG_PTR itemData;
} MEASUREITEMSTRUCT, *PMEASUREITEMSTRUCT, *LPMEASUREITEMSTRUCT;
typedef struct tagDRAWITEMSTRUCT
{
UINT CtlType;
UINT CtlID;
UINT itemID;
UINT itemAction;
UINT itemState;
HWND hwndItem;
HDC hDC;
RECT rcItem;
ULONG_PTR itemData;
} DRAWITEMSTRUCT, *PDRAWITEMSTRUCT, *LPDRAWITEMSTRUCT;
typedef struct tagDELETEITEMSTRUCT
{
UINT CtlType;
UINT CtlID;
UINT itemID;
HWND hwndItem;
ULONG_PTR itemData;
} DELETEITEMSTRUCT, *PDELETEITEMSTRUCT, *LPDELETEITEMSTRUCT;
typedef struct tagCOMPAREITEMSTRUCT
{
UINT CtlType;
UINT CtlID;
HWND hwndItem;
UINT itemID1;
ULONG_PTR itemData1;
UINT itemID2;
ULONG_PTR itemData2;
DWORD dwLocaleId;
} COMPAREITEMSTRUCT, *PCOMPAREITEMSTRUCT, *LPCOMPAREITEMSTRUCT;
__attribute__((dllimport)) WINBOOL GetMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax);
__attribute__((dllimport)) WINBOOL GetMessageW(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax);
__attribute__((dllimport)) WINBOOL TranslateMessage(const MSG *lpMsg);
__attribute__((dllimport)) LRESULT DispatchMessageA(const MSG *lpMsg);
__attribute__((dllimport)) LRESULT DispatchMessageW(const MSG *lpMsg);
__attribute__((dllimport)) WINBOOL SetMessageQueue(int cMessagesMax);
__attribute__((dllimport)) WINBOOL PeekMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg);
__attribute__((dllimport)) WINBOOL PeekMessageW(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg);
__attribute__((dllimport)) WINBOOL RegisterHotKey(HWND hWnd, int id, UINT fsModifiers, UINT vk);
__attribute__((dllimport)) WINBOOL UnregisterHotKey(HWND hWnd, int id);
__attribute__((dllimport)) WINBOOL ExitWindowsEx(UINT uFlags, DWORD dwReason);
__attribute__((dllimport)) WINBOOL SwapMouseButton(WINBOOL fSwap);
__attribute__((dllimport)) DWORD GetMessagePos(void);
__attribute__((dllimport)) LONG GetMessageTime(void);
__attribute__((dllimport)) LPARAM GetMessageExtraInfo(void);
__attribute__((dllimport)) WINBOOL IsWow64Message(void);
__attribute__((dllimport)) LPARAM SetMessageExtraInfo(LPARAM lParam);
__attribute__((dllimport)) LRESULT SendMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) LRESULT SendMessageW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) LRESULT SendMessageTimeoutA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, UINT fuFlags, UINT uTimeout, PDWORD_PTR lpdwResult);
__attribute__((dllimport)) LRESULT SendMessageTimeoutW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, UINT fuFlags, UINT uTimeout, PDWORD_PTR lpdwResult);
__attribute__((dllimport)) WINBOOL SendNotifyMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) WINBOOL SendNotifyMessageW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) WINBOOL SendMessageCallbackA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, SENDASYNCPROC lpResultCallBack, ULONG_PTR dwData);
__attribute__((dllimport)) WINBOOL SendMessageCallbackW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, SENDASYNCPROC lpResultCallBack, ULONG_PTR dwData);
typedef struct
{
UINT cbSize;
HDESK hdesk;
HWND hwnd;
LUID luid;
} BSMINFO, *PBSMINFO;
__attribute__((dllimport)) long BroadcastSystemMessageExA(DWORD flags, LPDWORD lpInfo, UINT Msg, WPARAM wParam, LPARAM lParam, PBSMINFO pbsmInfo);
__attribute__((dllimport)) long BroadcastSystemMessageExW(DWORD flags, LPDWORD lpInfo, UINT Msg, WPARAM wParam, LPARAM lParam, PBSMINFO pbsmInfo);
__attribute__((dllimport)) long BroadcastSystemMessageA(DWORD flags, LPDWORD lpInfo, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) long BroadcastSystemMessageW(DWORD flags, LPDWORD lpInfo, UINT Msg, WPARAM wParam, LPARAM lParam);
typedef PVOID HDEVNOTIFY;
typedef HDEVNOTIFY *PHDEVNOTIFY;
typedef HANDLE HPOWERNOTIFY;
typedef HPOWERNOTIFY *PHPOWERNOTIFY;
__attribute__((dllimport)) HPOWERNOTIFY RegisterPowerSettingNotification(HANDLE hRecipient, LPCGUID PowerSettingGuid, DWORD Flags);
__attribute__((dllimport)) WINBOOL UnregisterPowerSettingNotification(HPOWERNOTIFY Handle);
__attribute__((dllimport)) HPOWERNOTIFY RegisterSuspendResumeNotification(HANDLE hRecipient, DWORD Flags);
__attribute__((dllimport)) WINBOOL UnregisterSuspendResumeNotification(HPOWERNOTIFY Handle);
__attribute__((dllimport)) WINBOOL PostMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) WINBOOL PostMessageW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) WINBOOL PostThreadMessageA(DWORD idThread, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) WINBOOL PostThreadMessageW(DWORD idThread, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) WINBOOL AttachThreadInput(DWORD idAttach, DWORD idAttachTo, WINBOOL fAttach);
__attribute__((dllimport)) WINBOOL ReplyMessage(LRESULT lResult);
__attribute__((dllimport)) WINBOOL WaitMessage(void);
__attribute__((dllimport)) DWORD WaitForInputIdle(HANDLE hProcess, DWORD dwMilliseconds);
__attribute__((dllimport)) LRESULT DefWindowProcA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) LRESULT DefWindowProcW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) void PostQuitMessage(int nExitCode);
__attribute__((dllimport)) WINBOOL InSendMessage(void);
__attribute__((dllimport)) DWORD InSendMessageEx(LPVOID lpReserved);
__attribute__((dllimport)) UINT GetDoubleClickTime(void);
__attribute__((dllimport)) WINBOOL SetDoubleClickTime(UINT);
__attribute__((dllimport)) ATOM RegisterClassA(const WNDCLASSA *lpWndClass);
__attribute__((dllimport)) ATOM RegisterClassW(const WNDCLASSW *lpWndClass);
__attribute__((dllimport)) WINBOOL UnregisterClassA(LPCSTR lpClassName, HINSTANCE hInstance);
__attribute__((dllimport)) WINBOOL UnregisterClassW(LPCWSTR lpClassName, HINSTANCE hInstance);
__attribute__((dllimport)) WINBOOL GetClassInfoA(HINSTANCE hInstance, LPCSTR lpClassName, LPWNDCLASSA lpWndClass);
__attribute__((dllimport)) WINBOOL GetClassInfoW(HINSTANCE hInstance, LPCWSTR lpClassName, LPWNDCLASSW lpWndClass);
__attribute__((dllimport)) ATOM RegisterClassExA(const WNDCLASSEXA *);
__attribute__((dllimport)) ATOM RegisterClassExW(const WNDCLASSEXW *);
__attribute__((dllimport)) WINBOOL GetClassInfoExA(HINSTANCE hInstance, LPCSTR lpszClass, LPWNDCLASSEXA lpwcx);
__attribute__((dllimport)) WINBOOL GetClassInfoExW(HINSTANCE hInstance, LPCWSTR lpszClass, LPWNDCLASSEXW lpwcx);
__attribute__((dllimport)) LRESULT CallWindowProcA(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) LRESULT CallWindowProcW(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
extern const GUID GUID_POWERSCHEME_PERSONALITY;
extern const GUID GUID_MIN_POWER_SAVINGS;
extern const GUID GUID_MAX_POWER_SAVINGS;
extern const GUID GUID_TYPICAL_POWER_SAVINGS;
extern const GUID GUID_ACDC_POWER_SOURCE;
extern const GUID GUID_BATTERY_PERCENTAGE_REMAINING;
extern const GUID GUID_IDLE_BACKGROUND_TASK;
extern const GUID GUID_SYSTEM_AWAYMODE;
extern const GUID GUID_MONITOR_POWER_ON;
__attribute__((dllimport)) HDEVNOTIFY RegisterDeviceNotificationA(HANDLE hRecipient, LPVOID NotificationFilter, DWORD Flags);
__attribute__((dllimport)) HDEVNOTIFY RegisterDeviceNotificationW(HANDLE hRecipient, LPVOID NotificationFilter, DWORD Flags);
__attribute__((dllimport)) WINBOOL UnregisterDeviceNotification(HDEVNOTIFY Handle);
typedef BOOLEAN (*PREGISTERCLASSNAMEW)(LPCWSTR);
__attribute__((dllimport)) HWND CreateWindowExA(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam);
__attribute__((dllimport)) HWND CreateWindowExW(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam);
__attribute__((dllimport)) WINBOOL IsWindow(HWND hWnd);
__attribute__((dllimport)) WINBOOL IsMenu(HMENU hMenu);
__attribute__((dllimport)) WINBOOL IsChild(HWND hWndParent, HWND hWnd);
__attribute__((dllimport)) WINBOOL DestroyWindow(HWND hWnd);
__attribute__((dllimport)) WINBOOL ShowWindow(HWND hWnd, int nCmdShow);
__attribute__((dllimport)) WINBOOL AnimateWindow(HWND hWnd, DWORD dwTime, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL UpdateLayeredWindow(HWND hWnd, HDC hdcDst, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend, DWORD dwFlags);
typedef struct tagUPDATELAYEREDWINDOWINFO
{
DWORD cbSize;
HDC hdcDst;
const POINT *pptDst;
const SIZE *psize;
HDC hdcSrc;
const POINT *pptSrc;
COLORREF crKey;
const BLENDFUNCTION *pblend;
DWORD dwFlags;
const RECT *prcDirty;
} UPDATELAYEREDWINDOWINFO, *PUPDATELAYEREDWINDOWINFO;
__attribute__((dllimport)) WINBOOL UpdateLayeredWindowIndirect(HWND hWnd, const UPDATELAYEREDWINDOWINFO *pULWInfo);
__attribute__((dllimport)) WINBOOL GetLayeredWindowAttributes(HWND hwnd, COLORREF *pcrKey, BYTE *pbAlpha, DWORD *pdwFlags);
__attribute__((dllimport)) WINBOOL PrintWindow(HWND hwnd, HDC hdcBlt, UINT nFlags);
__attribute__((dllimport)) WINBOOL SetLayeredWindowAttributes(HWND hwnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags);
typedef struct
{
UINT cbSize;
HWND hwnd;
DWORD dwFlags;
UINT uCount;
DWORD dwTimeout;
} FLASHWINFO, *PFLASHWINFO;
__attribute__((dllimport)) WINBOOL ShowWindowAsync(HWND hWnd, int nCmdShow);
__attribute__((dllimport)) WINBOOL FlashWindow(HWND hWnd, WINBOOL bInvert);
__attribute__((dllimport)) WINBOOL FlashWindowEx(PFLASHWINFO pfwi);
__attribute__((dllimport)) WINBOOL ShowOwnedPopups(HWND hWnd, WINBOOL fShow);
__attribute__((dllimport)) WINBOOL OpenIcon(HWND hWnd);
__attribute__((dllimport)) WINBOOL CloseWindow(HWND hWnd);
__attribute__((dllimport)) WINBOOL MoveWindow(HWND hWnd, int X, int Y, int nWidth, int nHeight, WINBOOL bRepaint);
__attribute__((dllimport)) WINBOOL SetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags);
__attribute__((dllimport)) WINBOOL GetWindowPlacement(HWND hWnd, WINDOWPLACEMENT *lpwndpl);
__attribute__((dllimport)) WINBOOL SetWindowPlacement(HWND hWnd, const WINDOWPLACEMENT *lpwndpl);
__attribute__((dllimport)) WINBOOL GetWindowDisplayAffinity(HWND hWnd, DWORD *pdwAffinity);
__attribute__((dllimport)) WINBOOL SetWindowDisplayAffinity(HWND hWnd, DWORD dwAffinity);
__attribute__((dllimport)) HDWP BeginDeferWindowPos(int nNumWindows);
__attribute__((dllimport)) HDWP DeferWindowPos(HDWP hWinPosInfo, HWND hWnd, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags);
__attribute__((dllimport)) WINBOOL EndDeferWindowPos(HDWP hWinPosInfo);
__attribute__((dllimport)) WINBOOL IsWindowVisible(HWND hWnd);
__attribute__((dllimport)) WINBOOL IsIconic(HWND hWnd);
__attribute__((dllimport)) WINBOOL AnyPopup(void);
__attribute__((dllimport)) WINBOOL BringWindowToTop(HWND hWnd);
__attribute__((dllimport)) WINBOOL IsZoomed(HWND hWnd);
typedef struct
{
DWORD style;
DWORD dwExtendedStyle;
WORD cdit;
short x;
short y;
short cx;
short cy;
} DLGTEMPLATE;
typedef DLGTEMPLATE *LPDLGTEMPLATEA;
typedef DLGTEMPLATE *LPDLGTEMPLATEW;
typedef LPDLGTEMPLATEW LPDLGTEMPLATE;
typedef const DLGTEMPLATE *LPCDLGTEMPLATEA;
typedef const DLGTEMPLATE *LPCDLGTEMPLATEW;
typedef LPCDLGTEMPLATEW LPCDLGTEMPLATE;
typedef struct
{
DWORD style;
DWORD dwExtendedStyle;
short x;
short y;
short cx;
short cy;
WORD id;
} DLGITEMTEMPLATE;
typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEA;
typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEW;
typedef PDLGITEMTEMPLATEW PDLGITEMTEMPLATE;
typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEA;
typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEW;
typedef LPDLGITEMTEMPLATEW LPDLGITEMTEMPLATE;
__attribute__((dllimport)) HWND CreateDialogParamA(HINSTANCE hInstance, LPCSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
__attribute__((dllimport)) HWND CreateDialogParamW(HINSTANCE hInstance, LPCWSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
__attribute__((dllimport)) HWND CreateDialogIndirectParamA(HINSTANCE hInstance, LPCDLGTEMPLATEA lpTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
__attribute__((dllimport)) HWND CreateDialogIndirectParamW(HINSTANCE hInstance, LPCDLGTEMPLATEW lpTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
__attribute__((dllimport)) INT_PTR DialogBoxParamA(HINSTANCE hInstance, LPCSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
__attribute__((dllimport)) INT_PTR DialogBoxParamW(HINSTANCE hInstance, LPCWSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
__attribute__((dllimport)) INT_PTR DialogBoxIndirectParamA(HINSTANCE hInstance, LPCDLGTEMPLATEA hDialogTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
__attribute__((dllimport)) INT_PTR DialogBoxIndirectParamW(HINSTANCE hInstance, LPCDLGTEMPLATEW hDialogTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
__attribute__((dllimport)) WINBOOL EndDialog(HWND hDlg, INT_PTR nResult);
__attribute__((dllimport)) HWND GetDlgItem(HWND hDlg, int nIDDlgItem);
__attribute__((dllimport)) WINBOOL SetDlgItemInt(HWND hDlg, int nIDDlgItem, UINT uValue, WINBOOL bSigned);
__attribute__((dllimport)) UINT GetDlgItemInt(HWND hDlg, int nIDDlgItem, WINBOOL *lpTranslated, WINBOOL bSigned);
__attribute__((dllimport)) WINBOOL SetDlgItemTextA(HWND hDlg, int nIDDlgItem, LPCSTR lpString);
__attribute__((dllimport)) WINBOOL SetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPCWSTR lpString);
__attribute__((dllimport)) UINT GetDlgItemTextA(HWND hDlg, int nIDDlgItem, LPSTR lpString, int cchMax);
__attribute__((dllimport)) UINT GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int cchMax);
__attribute__((dllimport)) WINBOOL CheckDlgButton(HWND hDlg, int nIDButton, UINT uCheck);
__attribute__((dllimport)) WINBOOL CheckRadioButton(HWND hDlg, int nIDFirstButton, int nIDLastButton, int nIDCheckButton);
__attribute__((dllimport)) UINT IsDlgButtonChecked(HWND hDlg, int nIDButton);
__attribute__((dllimport)) LRESULT SendDlgItemMessageA(HWND hDlg, int nIDDlgItem, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) LRESULT SendDlgItemMessageW(HWND hDlg, int nIDDlgItem, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) HWND GetNextDlgGroupItem(HWND hDlg, HWND hCtl, WINBOOL bPrevious);
__attribute__((dllimport)) HWND GetNextDlgTabItem(HWND hDlg, HWND hCtl, WINBOOL bPrevious);
__attribute__((dllimport)) int GetDlgCtrlID(HWND hWnd);
__attribute__((dllimport)) long GetDialogBaseUnits(void);
__attribute__((dllimport)) LRESULT DefDlgProcA(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) LRESULT DefDlgProcW(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) WINBOOL CallMsgFilterA(LPMSG lpMsg, int nCode);
__attribute__((dllimport)) WINBOOL CallMsgFilterW(LPMSG lpMsg, int nCode);
__attribute__((dllimport)) WINBOOL OpenClipboard(HWND hWndNewOwner);
__attribute__((dllimport)) WINBOOL CloseClipboard(void);
__attribute__((dllimport)) DWORD GetClipboardSequenceNumber(void);
__attribute__((dllimport)) HWND GetClipboardOwner(void);
__attribute__((dllimport)) HWND SetClipboardViewer(HWND hWndNewViewer);
__attribute__((dllimport)) HWND GetClipboardViewer(void);
__attribute__((dllimport)) WINBOOL ChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext);
__attribute__((dllimport)) HANDLE SetClipboardData(UINT uFormat, HANDLE hMem);
__attribute__((dllimport)) HANDLE GetClipboardData(UINT uFormat);
__attribute__((dllimport)) UINT RegisterClipboardFormatA(LPCSTR lpszFormat);
__attribute__((dllimport)) UINT RegisterClipboardFormatW(LPCWSTR lpszFormat);
__attribute__((dllimport)) int CountClipboardFormats(void);
__attribute__((dllimport)) UINT EnumClipboardFormats(UINT format);
__attribute__((dllimport)) int GetClipboardFormatNameA(UINT format, LPSTR lpszFormatName, int cchMaxCount);
__attribute__((dllimport)) int GetClipboardFormatNameW(UINT format, LPWSTR lpszFormatName, int cchMaxCount);
__attribute__((dllimport)) WINBOOL EmptyClipboard(void);
__attribute__((dllimport)) WINBOOL IsClipboardFormatAvailable(UINT format);
__attribute__((dllimport)) int GetPriorityClipboardFormat(UINT *paFormatPriorityList, int cFormats);
__attribute__((dllimport)) HWND GetOpenClipboardWindow(void);
__attribute__((dllimport)) WINBOOL AddClipboardFormatListener(HWND hwnd);
__attribute__((dllimport)) WINBOOL RemoveClipboardFormatListener(HWND hwnd);
__attribute__((dllimport)) WINBOOL GetUpdatedClipboardFormats(PUINT lpuiFormats, UINT cFormats, PUINT pcFormatsOut);
__attribute__((dllimport)) WINBOOL CharToOemA(LPCSTR lpszSrc, LPSTR lpszDst);
__attribute__((dllimport)) WINBOOL CharToOemW(LPCWSTR lpszSrc, LPSTR lpszDst);
__attribute__((dllimport)) WINBOOL OemToCharA(LPCSTR lpszSrc, LPSTR lpszDst);
__attribute__((dllimport)) WINBOOL OemToCharW(LPCSTR lpszSrc, LPWSTR lpszDst);
__attribute__((dllimport)) WINBOOL CharToOemBuffA(LPCSTR lpszSrc, LPSTR lpszDst, DWORD cchDstLength);
__attribute__((dllimport)) WINBOOL CharToOemBuffW(LPCWSTR lpszSrc, LPSTR lpszDst, DWORD cchDstLength);
__attribute__((dllimport)) WINBOOL OemToCharBuffA(LPCSTR lpszSrc, LPSTR lpszDst, DWORD cchDstLength);
__attribute__((dllimport)) WINBOOL OemToCharBuffW(LPCSTR lpszSrc, LPWSTR lpszDst, DWORD cchDstLength);
__attribute__((dllimport)) LPSTR CharUpperA(LPSTR lpsz);
__attribute__((dllimport)) LPWSTR CharUpperW(LPWSTR lpsz);
__attribute__((dllimport)) DWORD CharUpperBuffA(LPSTR lpsz, DWORD cchLength);
__attribute__((dllimport)) DWORD CharUpperBuffW(LPWSTR lpsz, DWORD cchLength);
__attribute__((dllimport)) LPSTR CharLowerA(LPSTR lpsz);
__attribute__((dllimport)) LPWSTR CharLowerW(LPWSTR lpsz);
__attribute__((dllimport)) DWORD CharLowerBuffA(LPSTR lpsz, DWORD cchLength);
__attribute__((dllimport)) DWORD CharLowerBuffW(LPWSTR lpsz, DWORD cchLength);
__attribute__((dllimport)) LPSTR CharNextA(LPCSTR lpsz);
__attribute__((dllimport)) LPWSTR CharNextW(LPCWSTR lpsz);
__attribute__((dllimport)) LPSTR CharPrevA(LPCSTR lpszStart, LPCSTR lpszCurrent);
__attribute__((dllimport)) LPWSTR CharPrevW(LPCWSTR lpszStart, LPCWSTR lpszCurrent);
__attribute__((dllimport)) LPSTR CharNextExA(WORD CodePage, LPCSTR lpCurrentChar, DWORD dwFlags);
__attribute__((dllimport)) LPSTR CharPrevExA(WORD CodePage, LPCSTR lpStart, LPCSTR lpCurrentChar, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL IsCharAlphaA(CHAR ch);
__attribute__((dllimport)) WINBOOL IsCharAlphaW(WCHAR ch);
__attribute__((dllimport)) WINBOOL IsCharAlphaNumericA(CHAR ch);
__attribute__((dllimport)) WINBOOL IsCharAlphaNumericW(WCHAR ch);
__attribute__((dllimport)) WINBOOL IsCharUpperA(CHAR ch);
__attribute__((dllimport)) WINBOOL IsCharUpperW(WCHAR ch);
__attribute__((dllimport)) WINBOOL IsCharLowerA(CHAR ch);
__attribute__((dllimport)) WINBOOL IsCharLowerW(WCHAR ch);
__attribute__((dllimport)) HWND SetFocus(HWND hWnd);
__attribute__((dllimport)) HWND GetActiveWindow(void);
__attribute__((dllimport)) HWND GetFocus(void);
__attribute__((dllimport)) UINT GetKBCodePage(void);
__attribute__((dllimport)) SHORT GetKeyState(int nVirtKey);
__attribute__((dllimport)) SHORT GetAsyncKeyState(int vKey);
__attribute__((dllimport)) WINBOOL GetKeyboardState(PBYTE lpKeyState);
__attribute__((dllimport)) WINBOOL SetKeyboardState(LPBYTE lpKeyState);
__attribute__((dllimport)) int GetKeyNameTextA(LONG lParam, LPSTR lpString, int cchSize);
__attribute__((dllimport)) int GetKeyNameTextW(LONG lParam, LPWSTR lpString, int cchSize);
__attribute__((dllimport)) int GetKeyboardType(int nTypeFlag);
__attribute__((dllimport)) int ToAscii(UINT uVirtKey, UINT uScanCode, const BYTE *lpKeyState, LPWORD lpChar, UINT uFlags);
__attribute__((dllimport)) int ToAsciiEx(UINT uVirtKey, UINT uScanCode, const BYTE *lpKeyState, LPWORD lpChar, UINT uFlags, HKL dwhkl);
__attribute__((dllimport)) int ToUnicode(UINT wVirtKey, UINT wScanCode, const BYTE *lpKeyState, LPWSTR pwszBuff, int cchBuff, UINT wFlags);
__attribute__((dllimport)) DWORD OemKeyScan(WORD wOemChar);
__attribute__((dllimport)) SHORT VkKeyScanA(CHAR ch);
__attribute__((dllimport)) SHORT VkKeyScanW(WCHAR ch);
__attribute__((dllimport)) SHORT VkKeyScanExA(CHAR ch, HKL dwhkl);
__attribute__((dllimport)) SHORT VkKeyScanExW(WCHAR ch, HKL dwhkl);
__attribute__((dllimport)) void keybd_event(BYTE bVk, BYTE bScan, DWORD dwFlags, ULONG_PTR dwExtraInfo);
__attribute__((dllimport)) void mouse_event(DWORD dwFlags, DWORD dx, DWORD dy, DWORD dwData, ULONG_PTR dwExtraInfo);
typedef struct tagMOUSEINPUT
{
LONG dx;
LONG dy;
DWORD mouseData;
DWORD dwFlags;
DWORD time;
ULONG_PTR dwExtraInfo;
} MOUSEINPUT, *PMOUSEINPUT, *LPMOUSEINPUT;
typedef struct tagKEYBDINPUT
{
WORD wVk;
WORD wScan;
DWORD dwFlags;
DWORD time;
ULONG_PTR dwExtraInfo;
} KEYBDINPUT, *PKEYBDINPUT, *LPKEYBDINPUT;
typedef struct tagHARDWAREINPUT
{
DWORD uMsg;
WORD wParamL;
WORD wParamH;
} HARDWAREINPUT, *PHARDWAREINPUT, *LPHARDWAREINPUT;
typedef struct tagINPUT
{
DWORD type;
__extension__ union {
MOUSEINPUT mi;
KEYBDINPUT ki;
HARDWAREINPUT hi;
};
} INPUT, *PINPUT, *LPINPUT;
__attribute__((dllimport)) UINT SendInput(UINT cInputs, LPINPUT pInputs, int cbSize);
struct HTOUCHINPUT__
{
int unused;
};
typedef struct HTOUCHINPUT__ *HTOUCHINPUT;
typedef struct tagTOUCHINPUT
{
LONG x;
LONG y;
HANDLE hSource;
DWORD dwID;
DWORD dwFlags;
DWORD dwMask;
DWORD dwTime;
ULONG_PTR dwExtraInfo;
DWORD cxContact;
DWORD cyContact;
} TOUCHINPUT, *PTOUCHINPUT;
typedef const TOUCHINPUT *PCTOUCHINPUT;
__attribute__((dllimport)) WINBOOL GetTouchInputInfo(HTOUCHINPUT hTouchInput, UINT cInputs, PTOUCHINPUT pInputs, int cbSize);
__attribute__((dllimport)) WINBOOL CloseTouchInputHandle(HTOUCHINPUT hTouchInput);
__attribute__((dllimport)) WINBOOL RegisterTouchWindow(HWND hwnd, ULONG ulFlags);
__attribute__((dllimport)) WINBOOL UnregisterTouchWindow(HWND hwnd);
__attribute__((dllimport)) WINBOOL IsTouchWindow(HWND hwnd, PULONG pulFlags);
typedef struct tagLASTINPUTINFO
{
UINT cbSize;
DWORD dwTime;
} LASTINPUTINFO, *PLASTINPUTINFO;
__attribute__((dllimport)) WINBOOL GetLastInputInfo(PLASTINPUTINFO plii);
__attribute__((dllimport)) UINT MapVirtualKeyA(UINT uCode, UINT uMapType);
__attribute__((dllimport)) UINT MapVirtualKeyW(UINT uCode, UINT uMapType);
__attribute__((dllimport)) UINT MapVirtualKeyExA(UINT uCode, UINT uMapType, HKL dwhkl);
__attribute__((dllimport)) UINT MapVirtualKeyExW(UINT uCode, UINT uMapType, HKL dwhkl);
__attribute__((dllimport)) WINBOOL GetInputState(void);
__attribute__((dllimport)) DWORD GetQueueStatus(UINT flags);
__attribute__((dllimport)) HWND GetCapture(void);
__attribute__((dllimport)) HWND SetCapture(HWND hWnd);
__attribute__((dllimport)) WINBOOL ReleaseCapture(void);
__attribute__((dllimport)) DWORD MsgWaitForMultipleObjects(DWORD nCount, const HANDLE *pHandles, WINBOOL fWaitAll, DWORD dwMilliseconds, DWORD dwWakeMask);
__attribute__((dllimport)) DWORD MsgWaitForMultipleObjectsEx(DWORD nCount, const HANDLE *pHandles, DWORD dwMilliseconds, DWORD dwWakeMask, DWORD dwFlags);
__attribute__((dllimport)) UINT_PTR SetTimer(HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc);
__attribute__((dllimport)) WINBOOL KillTimer(HWND hWnd, UINT_PTR uIDEvent);
__attribute__((dllimport)) WINBOOL IsWindowUnicode(HWND hWnd);
__attribute__((dllimport)) WINBOOL EnableWindow(HWND hWnd, WINBOOL bEnable);
__attribute__((dllimport)) WINBOOL IsWindowEnabled(HWND hWnd);
__attribute__((dllimport)) HACCEL LoadAcceleratorsA(HINSTANCE hInstance, LPCSTR lpTableName);
__attribute__((dllimport)) HACCEL LoadAcceleratorsW(HINSTANCE hInstance, LPCWSTR lpTableName);
__attribute__((dllimport)) HACCEL CreateAcceleratorTableA(LPACCEL paccel, int cAccel);
__attribute__((dllimport)) HACCEL CreateAcceleratorTableW(LPACCEL paccel, int cAccel);
__attribute__((dllimport)) WINBOOL DestroyAcceleratorTable(HACCEL hAccel);
__attribute__((dllimport)) int CopyAcceleratorTableA(HACCEL hAccelSrc, LPACCEL lpAccelDst, int cAccelEntries);
__attribute__((dllimport)) int CopyAcceleratorTableW(HACCEL hAccelSrc, LPACCEL lpAccelDst, int cAccelEntries);
__attribute__((dllimport)) int TranslateAcceleratorA(HWND hWnd, HACCEL hAccTable, LPMSG lpMsg);
__attribute__((dllimport)) int TranslateAcceleratorW(HWND hWnd, HACCEL hAccTable, LPMSG lpMsg);
__attribute__((dllimport)) UINT_PTR SetCoalescableTimer(HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc, ULONG uToleranceDelay);
__attribute__((dllimport)) int GetSystemMetrics(int nIndex);
__attribute__((dllimport)) HMENU LoadMenuA(HINSTANCE hInstance, LPCSTR lpMenuName);
__attribute__((dllimport)) HMENU LoadMenuW(HINSTANCE hInstance, LPCWSTR lpMenuName);
__attribute__((dllimport)) HMENU LoadMenuIndirectA(const MENUTEMPLATEA *lpMenuTemplate);
__attribute__((dllimport)) HMENU LoadMenuIndirectW(const MENUTEMPLATEW *lpMenuTemplate);
__attribute__((dllimport)) HMENU GetMenu(HWND hWnd);
__attribute__((dllimport)) WINBOOL SetMenu(HWND hWnd, HMENU hMenu);
__attribute__((dllimport)) WINBOOL ChangeMenuA(HMENU hMenu, UINT cmd, LPCSTR lpszNewItem, UINT cmdInsert, UINT flags);
__attribute__((dllimport)) WINBOOL ChangeMenuW(HMENU hMenu, UINT cmd, LPCWSTR lpszNewItem, UINT cmdInsert, UINT flags);
__attribute__((dllimport)) WINBOOL HiliteMenuItem(HWND hWnd, HMENU hMenu, UINT uIDHiliteItem, UINT uHilite);
__attribute__((dllimport)) int GetMenuStringA(HMENU hMenu, UINT uIDItem, LPSTR lpString, int cchMax, UINT flags);
__attribute__((dllimport)) int GetMenuStringW(HMENU hMenu, UINT uIDItem, LPWSTR lpString, int cchMax, UINT flags);
__attribute__((dllimport)) UINT GetMenuState(HMENU hMenu, UINT uId, UINT uFlags);
__attribute__((dllimport)) WINBOOL DrawMenuBar(HWND hWnd);
__attribute__((dllimport)) HMENU GetSystemMenu(HWND hWnd, WINBOOL bRevert);
__attribute__((dllimport)) HMENU CreateMenu(void);
__attribute__((dllimport)) HMENU CreatePopupMenu(void);
__attribute__((dllimport)) WINBOOL DestroyMenu(HMENU hMenu);
__attribute__((dllimport)) DWORD CheckMenuItem(HMENU hMenu, UINT uIDCheckItem, UINT uCheck);
__attribute__((dllimport)) WINBOOL EnableMenuItem(HMENU hMenu, UINT uIDEnableItem, UINT uEnable);
__attribute__((dllimport)) HMENU GetSubMenu(HMENU hMenu, int nPos);
__attribute__((dllimport)) UINT GetMenuItemID(HMENU hMenu, int nPos);
__attribute__((dllimport)) int GetMenuItemCount(HMENU hMenu);
__attribute__((dllimport)) WINBOOL InsertMenuA(HMENU hMenu, UINT uPosition, UINT uFlags, UINT_PTR uIDNewItem, LPCSTR lpNewItem);
__attribute__((dllimport)) WINBOOL InsertMenuW(HMENU hMenu, UINT uPosition, UINT uFlags, UINT_PTR uIDNewItem, LPCWSTR lpNewItem);
__attribute__((dllimport)) WINBOOL AppendMenuA(HMENU hMenu, UINT uFlags, UINT_PTR uIDNewItem, LPCSTR lpNewItem);
__attribute__((dllimport)) WINBOOL AppendMenuW(HMENU hMenu, UINT uFlags, UINT_PTR uIDNewItem, LPCWSTR lpNewItem);
__attribute__((dllimport)) WINBOOL ModifyMenuA(HMENU hMnu, UINT uPosition, UINT uFlags, UINT_PTR uIDNewItem, LPCSTR lpNewItem);
__attribute__((dllimport)) WINBOOL ModifyMenuW(HMENU hMnu, UINT uPosition, UINT uFlags, UINT_PTR uIDNewItem, LPCWSTR lpNewItem);
__attribute__((dllimport)) WINBOOL RemoveMenu(HMENU hMenu, UINT uPosition, UINT uFlags);
__attribute__((dllimport)) WINBOOL DeleteMenu(HMENU hMenu, UINT uPosition, UINT uFlags);
__attribute__((dllimport)) WINBOOL SetMenuItemBitmaps(HMENU hMenu, UINT uPosition, UINT uFlags, HBITMAP hBitmapUnchecked, HBITMAP hBitmapChecked);
__attribute__((dllimport)) LONG GetMenuCheckMarkDimensions(void);
__attribute__((dllimport)) WINBOOL TrackPopupMenu(HMENU hMenu, UINT uFlags, int x, int y, int nReserved, HWND hWnd, const RECT *prcRect);
typedef struct tagTPMPARAMS
{
UINT cbSize;
RECT rcExclude;
} TPMPARAMS;
typedef struct tagMENUINFO
{
DWORD cbSize;
DWORD fMask;
DWORD dwStyle;
UINT cyMax;
HBRUSH hbrBack;
DWORD dwContextHelpID;
ULONG_PTR dwMenuData;
} MENUINFO, *LPMENUINFO;
typedef TPMPARAMS *LPTPMPARAMS;
typedef MENUINFO const *LPCMENUINFO;
__attribute__((dllimport)) WINBOOL TrackPopupMenuEx(HMENU, UINT, int, int, HWND, LPTPMPARAMS);
__attribute__((dllimport)) WINBOOL GetMenuInfo(HMENU, LPMENUINFO);
__attribute__((dllimport)) WINBOOL SetMenuInfo(HMENU, LPCMENUINFO);
__attribute__((dllimport)) WINBOOL EndMenu(void);
__attribute__((dllimport)) WINBOOL CalculatePopupWindowPosition(const POINT *anchorPoint, const SIZE *windowSize, UINT flags, RECT *excludeRect, RECT *popupWindowPosition);
typedef struct tagMENUGETOBJECTINFO
{
DWORD dwFlags;
UINT uPos;
HMENU hmenu;
PVOID riid;
PVOID pvObj;
} MENUGETOBJECTINFO, *PMENUGETOBJECTINFO;
typedef struct tagMENUITEMINFOA
{
UINT cbSize;
UINT fMask;
UINT fType;
UINT fState;
UINT wID;
HMENU hSubMenu;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
ULONG_PTR dwItemData;
LPSTR dwTypeData;
UINT cch;
HBITMAP hbmpItem;
} MENUITEMINFOA, *LPMENUITEMINFOA;
typedef struct tagMENUITEMINFOW
{
UINT cbSize;
UINT fMask;
UINT fType;
UINT fState;
UINT wID;
HMENU hSubMenu;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
ULONG_PTR dwItemData;
LPWSTR dwTypeData;
UINT cch;
HBITMAP hbmpItem;
} MENUITEMINFOW, *LPMENUITEMINFOW;
typedef MENUITEMINFOW MENUITEMINFO;
typedef LPMENUITEMINFOW LPMENUITEMINFO;
typedef MENUITEMINFOA const *LPCMENUITEMINFOA;
typedef MENUITEMINFOW const *LPCMENUITEMINFOW;
typedef LPCMENUITEMINFOW LPCMENUITEMINFO;
__attribute__((dllimport)) WINBOOL InsertMenuItemA(HMENU hmenu, UINT item, WINBOOL fByPosition, LPCMENUITEMINFOA lpmi);
__attribute__((dllimport)) WINBOOL InsertMenuItemW(HMENU hmenu, UINT item, WINBOOL fByPosition, LPCMENUITEMINFOW lpmi);
__attribute__((dllimport)) WINBOOL GetMenuItemInfoA(HMENU hmenu, UINT item, WINBOOL fByPosition, LPMENUITEMINFOA lpmii);
__attribute__((dllimport)) WINBOOL GetMenuItemInfoW(HMENU hmenu, UINT item, WINBOOL fByPosition, LPMENUITEMINFOW lpmii);
__attribute__((dllimport)) WINBOOL SetMenuItemInfoA(HMENU hmenu, UINT item, WINBOOL fByPositon, LPCMENUITEMINFOA lpmii);
__attribute__((dllimport)) WINBOOL SetMenuItemInfoW(HMENU hmenu, UINT item, WINBOOL fByPositon, LPCMENUITEMINFOW lpmii);
__attribute__((dllimport)) UINT GetMenuDefaultItem(HMENU hMenu, UINT fByPos, UINT gmdiFlags);
__attribute__((dllimport)) WINBOOL SetMenuDefaultItem(HMENU hMenu, UINT uItem, UINT fByPos);
__attribute__((dllimport)) WINBOOL GetMenuItemRect(HWND hWnd, HMENU hMenu, UINT uItem, LPRECT lprcItem);
__attribute__((dllimport)) int MenuItemFromPoint(HWND hWnd, HMENU hMenu, POINT ptScreen);
typedef struct tagDROPSTRUCT
{
HWND hwndSource;
HWND hwndSink;
DWORD wFmt;
ULONG_PTR dwData;
POINT ptDrop;
DWORD dwControlData;
} DROPSTRUCT, *PDROPSTRUCT, *LPDROPSTRUCT;
__attribute__((dllimport)) DWORD DragObject(HWND hwndParent, HWND hwndFrom, UINT fmt, ULONG_PTR data, HCURSOR hcur);
__attribute__((dllimport)) WINBOOL DragDetect(HWND hwnd, POINT pt);
__attribute__((dllimport)) WINBOOL DrawIcon(HDC hDC, int X, int Y, HICON hIcon);
typedef struct tagDRAWTEXTPARAMS
{
UINT cbSize;
int iTabLength;
int iLeftMargin;
int iRightMargin;
UINT uiLengthDrawn;
} DRAWTEXTPARAMS, *LPDRAWTEXTPARAMS;
__attribute__((dllimport)) int DrawTextA(HDC hdc, LPCSTR lpchText, int cchText, LPRECT lprc, UINT format);
__attribute__((dllimport)) int DrawTextW(HDC hdc, LPCWSTR lpchText, int cchText, LPRECT lprc, UINT format);
__attribute__((dllimport)) int DrawTextExA(HDC hdc, LPSTR lpchText, int cchText, LPRECT lprc, UINT format, LPDRAWTEXTPARAMS lpdtp);
__attribute__((dllimport)) int DrawTextExW(HDC hdc, LPWSTR lpchText, int cchText, LPRECT lprc, UINT format, LPDRAWTEXTPARAMS lpdtp);
__attribute__((dllimport)) WINBOOL GrayStringA(HDC hDC, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc, LPARAM lpData, int nCount, int X, int Y, int nWidth, int nHeight);
__attribute__((dllimport)) WINBOOL GrayStringW(HDC hDC, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc, LPARAM lpData, int nCount, int X, int Y, int nWidth, int nHeight);
__attribute__((dllimport)) WINBOOL DrawStateA(HDC hdc, HBRUSH hbrFore, DRAWSTATEPROC qfnCallBack, LPARAM lData, WPARAM wData, int x, int y, int cx, int cy, UINT uFlags);
__attribute__((dllimport)) WINBOOL DrawStateW(HDC hdc, HBRUSH hbrFore, DRAWSTATEPROC qfnCallBack, LPARAM lData, WPARAM wData, int x, int y, int cx, int cy, UINT uFlags);
__attribute__((dllimport)) LONG TabbedTextOutA(HDC hdc, int x, int y, LPCSTR lpString, int chCount, int nTabPositions, const INT *lpnTabStopPositions, int nTabOrigin);
__attribute__((dllimport)) LONG TabbedTextOutW(HDC hdc, int x, int y, LPCWSTR lpString, int chCount, int nTabPositions, const INT *lpnTabStopPositions, int nTabOrigin);
__attribute__((dllimport)) DWORD GetTabbedTextExtentA(HDC hdc, LPCSTR lpString, int chCount, int nTabPositions, const INT *lpnTabStopPositions);
__attribute__((dllimport)) DWORD GetTabbedTextExtentW(HDC hdc, LPCWSTR lpString, int chCount, int nTabPositions, const INT *lpnTabStopPositions);
__attribute__((dllimport)) WINBOOL UpdateWindow(HWND hWnd);
__attribute__((dllimport)) HWND SetActiveWindow(HWND hWnd);
__attribute__((dllimport)) HWND GetForegroundWindow(void);
__attribute__((dllimport)) WINBOOL PaintDesktop(HDC hdc);
__attribute__((dllimport)) void SwitchToThisWindow(HWND hwnd, WINBOOL fUnknown);
__attribute__((dllimport)) WINBOOL SetForegroundWindow(HWND hWnd);
__attribute__((dllimport)) WINBOOL AllowSetForegroundWindow(DWORD dwProcessId);
__attribute__((dllimport)) WINBOOL LockSetForegroundWindow(UINT uLockCode);
__attribute__((dllimport)) HWND WindowFromDC(HDC hDC);
__attribute__((dllimport)) HDC GetDC(HWND hWnd);
__attribute__((dllimport)) HDC GetDCEx(HWND hWnd, HRGN hrgnClip, DWORD flags);
__attribute__((dllimport)) HDC GetWindowDC(HWND hWnd);
__attribute__((dllimport)) int ReleaseDC(HWND hWnd, HDC hDC);
__attribute__((dllimport)) HDC BeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint);
__attribute__((dllimport)) WINBOOL EndPaint(HWND hWnd, const PAINTSTRUCT *lpPaint);
__attribute__((dllimport)) WINBOOL GetUpdateRect(HWND hWnd, LPRECT lpRect, WINBOOL bErase);
__attribute__((dllimport)) int GetUpdateRgn(HWND hWnd, HRGN hRgn, WINBOOL bErase);
__attribute__((dllimport)) int SetWindowRgn(HWND hWnd, HRGN hRgn, WINBOOL bRedraw);
__attribute__((dllimport)) int GetWindowRgn(HWND hWnd, HRGN hRgn);
__attribute__((dllimport)) int GetWindowRgnBox(HWND hWnd, LPRECT lprc);
__attribute__((dllimport)) int ExcludeUpdateRgn(HDC hDC, HWND hWnd);
__attribute__((dllimport)) WINBOOL InvalidateRect(HWND hWnd, const RECT *lpRect, WINBOOL bErase);
__attribute__((dllimport)) WINBOOL ValidateRect(HWND hWnd, const RECT *lpRect);
__attribute__((dllimport)) WINBOOL InvalidateRgn(HWND hWnd, HRGN hRgn, WINBOOL bErase);
__attribute__((dllimport)) WINBOOL ValidateRgn(HWND hWnd, HRGN hRgn);
__attribute__((dllimport)) WINBOOL RedrawWindow(HWND hWnd, const RECT *lprcUpdate, HRGN hrgnUpdate, UINT flags);
__attribute__((dllimport)) WINBOOL LockWindowUpdate(HWND hWndLock);
__attribute__((dllimport)) WINBOOL ScrollWindow(HWND hWnd, int XAmount, int YAmount, const RECT *lpRect, const RECT *lpClipRect);
__attribute__((dllimport)) WINBOOL ScrollDC(HDC hDC, int dx, int dy, const RECT *lprcScroll, const RECT *lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate);
__attribute__((dllimport)) int ScrollWindowEx(HWND hWnd, int dx, int dy, const RECT *prcScroll, const RECT *prcClip, HRGN hrgnUpdate, LPRECT prcUpdate, UINT flags);
__attribute__((dllimport)) int SetScrollPos(HWND hWnd, int nBar, int nPos, WINBOOL bRedraw);
__attribute__((dllimport)) int GetScrollPos(HWND hWnd, int nBar);
__attribute__((dllimport)) WINBOOL SetScrollRange(HWND hWnd, int nBar, int nMinPos, int nMaxPos, WINBOOL bRedraw);
__attribute__((dllimport)) WINBOOL GetScrollRange(HWND hWnd, int nBar, LPINT lpMinPos, LPINT lpMaxPos);
__attribute__((dllimport)) WINBOOL ShowScrollBar(HWND hWnd, int wBar, WINBOOL bShow);
__attribute__((dllimport)) WINBOOL EnableScrollBar(HWND hWnd, UINT wSBflags, UINT wArrows);
__attribute__((dllimport)) WINBOOL SetPropA(HWND hWnd, LPCSTR lpString, HANDLE hData);
__attribute__((dllimport)) WINBOOL SetPropW(HWND hWnd, LPCWSTR lpString, HANDLE hData);
__attribute__((dllimport)) HANDLE GetPropA(HWND hWnd, LPCSTR lpString);
__attribute__((dllimport)) HANDLE GetPropW(HWND hWnd, LPCWSTR lpString);
__attribute__((dllimport)) HANDLE RemovePropA(HWND hWnd, LPCSTR lpString);
__attribute__((dllimport)) HANDLE RemovePropW(HWND hWnd, LPCWSTR lpString);
__attribute__((dllimport)) int EnumPropsExA(HWND hWnd, PROPENUMPROCEXA lpEnumFunc, LPARAM lParam);
__attribute__((dllimport)) int EnumPropsExW(HWND hWnd, PROPENUMPROCEXW lpEnumFunc, LPARAM lParam);
__attribute__((dllimport)) int EnumPropsA(HWND hWnd, PROPENUMPROCA lpEnumFunc);
__attribute__((dllimport)) int EnumPropsW(HWND hWnd, PROPENUMPROCW lpEnumFunc);
__attribute__((dllimport)) WINBOOL SetWindowTextA(HWND hWnd, LPCSTR lpString);
__attribute__((dllimport)) WINBOOL SetWindowTextW(HWND hWnd, LPCWSTR lpString);
__attribute__((dllimport)) int GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount);
__attribute__((dllimport)) int GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount);
__attribute__((dllimport)) int GetWindowTextLengthA(HWND hWnd);
__attribute__((dllimport)) int GetWindowTextLengthW(HWND hWnd);
__attribute__((dllimport)) WINBOOL GetClientRect(HWND hWnd, LPRECT lpRect);
__attribute__((dllimport)) WINBOOL GetWindowRect(HWND hWnd, LPRECT lpRect);
__attribute__((dllimport)) WINBOOL AdjustWindowRect(LPRECT lpRect, DWORD dwStyle, WINBOOL bMenu);
__attribute__((dllimport)) WINBOOL AdjustWindowRectEx(LPRECT lpRect, DWORD dwStyle, WINBOOL bMenu, DWORD dwExStyle);
typedef struct tagHELPINFO
{
UINT cbSize;
int iContextType;
int iCtrlId;
HANDLE hItemHandle;
DWORD_PTR dwContextId;
POINT MousePos;
} HELPINFO, *LPHELPINFO;
__attribute__((dllimport)) WINBOOL SetWindowContextHelpId(HWND, DWORD);
__attribute__((dllimport)) DWORD GetWindowContextHelpId(HWND);
__attribute__((dllimport)) WINBOOL SetMenuContextHelpId(HMENU, DWORD);
__attribute__((dllimport)) DWORD GetMenuContextHelpId(HMENU);
__attribute__((dllimport)) int MessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType);
__attribute__((dllimport)) int MessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType);
__attribute__((dllimport)) int MessageBoxExA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType, WORD wLanguageId);
__attribute__((dllimport)) int MessageBoxExW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType, WORD wLanguageId);
typedef void (*MSGBOXCALLBACK)(LPHELPINFO lpHelpInfo);
typedef struct tagMSGBOXPARAMSA
{
UINT cbSize;
HWND hwndOwner;
HINSTANCE hInstance;
LPCSTR lpszText;
LPCSTR lpszCaption;
DWORD dwStyle;
LPCSTR lpszIcon;
DWORD_PTR dwContextHelpId;
MSGBOXCALLBACK lpfnMsgBoxCallback;
DWORD dwLanguageId;
} MSGBOXPARAMSA, *PMSGBOXPARAMSA, *LPMSGBOXPARAMSA;
typedef struct tagMSGBOXPARAMSW
{
UINT cbSize;
HWND hwndOwner;
HINSTANCE hInstance;
LPCWSTR lpszText;
LPCWSTR lpszCaption;
DWORD dwStyle;
LPCWSTR lpszIcon;
DWORD_PTR dwContextHelpId;
MSGBOXCALLBACK lpfnMsgBoxCallback;
DWORD dwLanguageId;
} MSGBOXPARAMSW, *PMSGBOXPARAMSW, *LPMSGBOXPARAMSW;
typedef MSGBOXPARAMSW MSGBOXPARAMS;
typedef PMSGBOXPARAMSW PMSGBOXPARAMS;
typedef LPMSGBOXPARAMSW LPMSGBOXPARAMS;
__attribute__((dllimport)) int MessageBoxIndirectA(const MSGBOXPARAMSA *lpmbp);
__attribute__((dllimport)) int MessageBoxIndirectW(const MSGBOXPARAMSW *lpmbp);
__attribute__((dllimport)) WINBOOL MessageBeep(UINT uType);
__attribute__((dllimport)) int ShowCursor(WINBOOL bShow);
__attribute__((dllimport)) WINBOOL SetCursorPos(int X, int Y);
__attribute__((dllimport)) HCURSOR SetCursor(HCURSOR hCursor);
__attribute__((dllimport)) WINBOOL GetCursorPos(LPPOINT lpPoint);
__attribute__((dllimport)) WINBOOL ClipCursor(const RECT *lpRect);
__attribute__((dllimport)) WINBOOL GetClipCursor(LPRECT lpRect);
__attribute__((dllimport)) HCURSOR GetCursor(void);
__attribute__((dllimport)) WINBOOL CreateCaret(HWND hWnd, HBITMAP hBitmap, int nWidth, int nHeight);
__attribute__((dllimport)) UINT GetCaretBlinkTime(void);
__attribute__((dllimport)) WINBOOL SetCaretBlinkTime(UINT uMSeconds);
__attribute__((dllimport)) WINBOOL DestroyCaret(void);
__attribute__((dllimport)) WINBOOL HideCaret(HWND hWnd);
__attribute__((dllimport)) WINBOOL ShowCaret(HWND hWnd);
__attribute__((dllimport)) WINBOOL SetCaretPos(int X, int Y);
__attribute__((dllimport)) WINBOOL GetCaretPos(LPPOINT lpPoint);
__attribute__((dllimport)) WINBOOL ClientToScreen(HWND hWnd, LPPOINT lpPoint);
__attribute__((dllimport)) WINBOOL ScreenToClient(HWND hWnd, LPPOINT lpPoint);
__attribute__((dllimport)) int MapWindowPoints(HWND hWndFrom, HWND hWndTo, LPPOINT lpPoints, UINT cPoints);
__attribute__((dllimport)) HWND WindowFromPoint(POINT Point);
__attribute__((dllimport)) HWND ChildWindowFromPoint(HWND hWndParent, POINT Point);
__attribute__((dllimport)) HWND ChildWindowFromPointEx(HWND hwnd, POINT pt, UINT flags);
__attribute__((dllimport)) WINBOOL SetPhysicalCursorPos(int X, int Y);
__attribute__((dllimport)) WINBOOL GetPhysicalCursorPos(LPPOINT lpPoint);
__attribute__((dllimport)) WINBOOL LogicalToPhysicalPoint(HWND hWnd, LPPOINT lpPoint);
__attribute__((dllimport)) WINBOOL PhysicalToLogicalPoint(HWND hWnd, LPPOINT lpPoint);
__attribute__((dllimport)) HWND WindowFromPhysicalPoint(POINT Point);
__attribute__((dllimport)) DWORD GetSysColor(int nIndex);
__attribute__((dllimport)) HBRUSH GetSysColorBrush(int nIndex);
__attribute__((dllimport)) WINBOOL SetSysColors(int cElements, const INT *lpaElements, const COLORREF *lpaRgbValues);
__attribute__((dllimport)) WINBOOL DrawFocusRect(HDC hDC, const RECT *lprc);
__attribute__((dllimport)) int FillRect(HDC hDC, const RECT *lprc, HBRUSH hbr);
__attribute__((dllimport)) int FrameRect(HDC hDC, const RECT *lprc, HBRUSH hbr);
__attribute__((dllimport)) WINBOOL InvertRect(HDC hDC, const RECT *lprc);
__attribute__((dllimport)) WINBOOL SetRect(LPRECT lprc, int xLeft, int yTop, int xRight, int yBottom);
__attribute__((dllimport)) WINBOOL SetRectEmpty(LPRECT lprc);
__attribute__((dllimport)) WINBOOL CopyRect(LPRECT lprcDst, const RECT *lprcSrc);
__attribute__((dllimport)) WINBOOL InflateRect(LPRECT lprc, int dx, int dy);
__attribute__((dllimport)) WINBOOL IntersectRect(LPRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2);
__attribute__((dllimport)) WINBOOL UnionRect(LPRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2);
__attribute__((dllimport)) WINBOOL SubtractRect(LPRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2);
__attribute__((dllimport)) WINBOOL OffsetRect(LPRECT lprc, int dx, int dy);
__attribute__((dllimport)) WINBOOL IsRectEmpty(const RECT *lprc);
__attribute__((dllimport)) WINBOOL EqualRect(const RECT *lprc1, const RECT *lprc2);
__attribute__((dllimport)) WINBOOL PtInRect(const RECT *lprc, POINT pt);
__attribute__((dllimport)) WORD GetWindowWord(HWND hWnd, int nIndex);
__attribute__((dllimport)) WORD SetWindowWord(HWND hWnd, int nIndex, WORD wNewWord);
__attribute__((dllimport)) LONG GetWindowLongA(HWND hWnd, int nIndex);
__attribute__((dllimport)) LONG GetWindowLongW(HWND hWnd, int nIndex);
__attribute__((dllimport)) LONG SetWindowLongA(HWND hWnd, int nIndex, LONG dwNewLong);
__attribute__((dllimport)) LONG SetWindowLongW(HWND hWnd, int nIndex, LONG dwNewLong);
__attribute__((dllimport)) LONG_PTR GetWindowLongPtrA(HWND hWnd, int nIndex);
__attribute__((dllimport)) LONG_PTR GetWindowLongPtrW(HWND hWnd, int nIndex);
__attribute__((dllimport)) LONG_PTR SetWindowLongPtrA(HWND hWnd, int nIndex, LONG_PTR dwNewLong);
__attribute__((dllimport)) LONG_PTR SetWindowLongPtrW(HWND hWnd, int nIndex, LONG_PTR dwNewLong);
__attribute__((dllimport)) WORD GetClassWord(HWND hWnd, int nIndex);
__attribute__((dllimport)) WORD SetClassWord(HWND hWnd, int nIndex, WORD wNewWord);
__attribute__((dllimport)) DWORD GetClassLongA(HWND hWnd, int nIndex);
__attribute__((dllimport)) DWORD GetClassLongW(HWND hWnd, int nIndex);
__attribute__((dllimport)) DWORD SetClassLongA(HWND hWnd, int nIndex, LONG dwNewLong);
__attribute__((dllimport)) DWORD SetClassLongW(HWND hWnd, int nIndex, LONG dwNewLong);
__attribute__((dllimport)) ULONG_PTR GetClassLongPtrA(HWND hWnd, int nIndex);
__attribute__((dllimport)) ULONG_PTR GetClassLongPtrW(HWND hWnd, int nIndex);
__attribute__((dllimport)) ULONG_PTR SetClassLongPtrA(HWND hWnd, int nIndex, LONG_PTR dwNewLong);
__attribute__((dllimport)) ULONG_PTR SetClassLongPtrW(HWND hWnd, int nIndex, LONG_PTR dwNewLong);
__attribute__((dllimport)) WINBOOL GetProcessDefaultLayout(DWORD *pdwDefaultLayout);
__attribute__((dllimport)) WINBOOL SetProcessDefaultLayout(DWORD dwDefaultLayout);
__attribute__((dllimport)) HWND GetDesktopWindow(void);
__attribute__((dllimport)) HWND GetParent(HWND hWnd);
__attribute__((dllimport)) HWND SetParent(HWND hWndChild, HWND hWndNewParent);
__attribute__((dllimport)) WINBOOL EnumChildWindows(HWND hWndParent, WNDENUMPROC lpEnumFunc, LPARAM lParam);
__attribute__((dllimport)) HWND FindWindowA(LPCSTR lpClassName, LPCSTR lpWindowName);
__attribute__((dllimport)) HWND FindWindowW(LPCWSTR lpClassName, LPCWSTR lpWindowName);
__attribute__((dllimport)) HWND FindWindowExA(HWND hWndParent, HWND hWndChildAfter, LPCSTR lpszClass, LPCSTR lpszWindow);
__attribute__((dllimport)) HWND FindWindowExW(HWND hWndParent, HWND hWndChildAfter, LPCWSTR lpszClass, LPCWSTR lpszWindow);
__attribute__((dllimport)) HWND GetShellWindow(void);
__attribute__((dllimport)) WINBOOL RegisterShellHookWindow(HWND hwnd);
__attribute__((dllimport)) WINBOOL DeregisterShellHookWindow(HWND hwnd);
__attribute__((dllimport)) WINBOOL EnumWindows(WNDENUMPROC lpEnumFunc, LPARAM lParam);
__attribute__((dllimport)) WINBOOL EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam);
__attribute__((dllimport)) int GetClassNameA(HWND hWnd, LPSTR lpClassName, int nMaxCount);
__attribute__((dllimport)) int GetClassNameW(HWND hWnd, LPWSTR lpClassName, int nMaxCount);
__attribute__((dllimport)) HWND GetTopWindow(HWND hWnd);
__attribute__((dllimport)) DWORD GetWindowThreadProcessId(HWND hWnd, LPDWORD lpdwProcessId);
__attribute__((dllimport)) WINBOOL IsGUIThread(WINBOOL bConvert);
__attribute__((dllimport)) HWND GetLastActivePopup(HWND hWnd);
__attribute__((dllimport)) HWND GetWindow(HWND hWnd, UINT uCmd);
__attribute__((dllimport)) HHOOK SetWindowsHookA(int nFilterType, HOOKPROC pfnFilterProc);
__attribute__((dllimport)) HHOOK SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc);
__attribute__((dllimport)) WINBOOL UnhookWindowsHook(int nCode, HOOKPROC pfnFilterProc);
__attribute__((dllimport)) HHOOK SetWindowsHookExA(int idHook, HOOKPROC lpfn, HINSTANCE hmod, DWORD dwThreadId);
__attribute__((dllimport)) HHOOK SetWindowsHookExW(int idHook, HOOKPROC lpfn, HINSTANCE hmod, DWORD dwThreadId);
__attribute__((dllimport)) WINBOOL UnhookWindowsHookEx(HHOOK hhk);
__attribute__((dllimport)) LRESULT CallNextHookEx(HHOOK hhk, int nCode, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) WINBOOL CheckMenuRadioItem(HMENU hmenu, UINT first, UINT last, UINT check, UINT flags);
typedef struct
{
WORD versionNumber;
WORD offset;
} MENUITEMTEMPLATEHEADER, *PMENUITEMTEMPLATEHEADER;
typedef struct
{
WORD mtOption;
WORD mtID;
WCHAR mtString[1];
} MENUITEMTEMPLATE, *PMENUITEMTEMPLATE;
__attribute__((dllimport)) HBITMAP LoadBitmapA(HINSTANCE hInstance, LPCSTR lpBitmapName);
__attribute__((dllimport)) HBITMAP LoadBitmapW(HINSTANCE hInstance, LPCWSTR lpBitmapName);
__attribute__((dllimport)) HCURSOR LoadCursorA(HINSTANCE hInstance, LPCSTR lpCursorName);
__attribute__((dllimport)) HCURSOR LoadCursorW(HINSTANCE hInstance, LPCWSTR lpCursorName);
__attribute__((dllimport)) HCURSOR LoadCursorFromFileA(LPCSTR lpFileName);
__attribute__((dllimport)) HCURSOR LoadCursorFromFileW(LPCWSTR lpFileName);
__attribute__((dllimport)) HCURSOR CreateCursor(HINSTANCE hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, const void *pvANDPlane, const void *pvXORPlane);
__attribute__((dllimport)) WINBOOL DestroyCursor(HCURSOR hCursor);
typedef struct _ICONINFO
{
WINBOOL fIcon;
DWORD xHotspot;
DWORD yHotspot;
HBITMAP hbmMask;
HBITMAP hbmColor;
} ICONINFO;
typedef ICONINFO *PICONINFO;
__attribute__((dllimport)) WINBOOL SetSystemCursor(HCURSOR hcur, DWORD id);
__attribute__((dllimport)) HICON LoadIconA(HINSTANCE hInstance, LPCSTR lpIconName);
__attribute__((dllimport)) HICON LoadIconW(HINSTANCE hInstance, LPCWSTR lpIconName);
__attribute__((dllimport)) UINT PrivateExtractIconsA(LPCSTR szFileName, int nIconIndex, int cxIcon, int cyIcon, HICON *phicon, UINT *piconid, UINT nIcons, UINT flags);
__attribute__((dllimport)) UINT PrivateExtractIconsW(LPCWSTR szFileName, int nIconIndex, int cxIcon, int cyIcon, HICON *phicon, UINT *piconid, UINT nIcons, UINT flags);
__attribute__((dllimport)) HICON CreateIcon(HINSTANCE hInstance, int nWidth, int nHeight, BYTE cPlanes, BYTE cBitsPixel, const BYTE *lpbANDbits, const BYTE *lpbXORbits);
__attribute__((dllimport)) WINBOOL DestroyIcon(HICON hIcon);
__attribute__((dllimport)) int LookupIconIdFromDirectory(PBYTE presbits, WINBOOL fIcon);
__attribute__((dllimport)) int LookupIconIdFromDirectoryEx(PBYTE presbits, WINBOOL fIcon, int cxDesired, int cyDesired, UINT Flags);
__attribute__((dllimport)) HICON CreateIconFromResource(PBYTE presbits, DWORD dwResSize, WINBOOL fIcon, DWORD dwVer);
__attribute__((dllimport)) HICON CreateIconFromResourceEx(PBYTE presbits, DWORD dwResSize, WINBOOL fIcon, DWORD dwVer, int cxDesired, int cyDesired, UINT Flags);
typedef struct tagCURSORSHAPE
{
int xHotSpot;
int yHotSpot;
int cx;
int cy;
int cbWidth;
BYTE Planes;
BYTE BitsPixel;
} CURSORSHAPE, *LPCURSORSHAPE;
__attribute__((dllimport)) HANDLE LoadImageA(HINSTANCE hInst, LPCSTR name, UINT type, int cx, int cy, UINT fuLoad);
__attribute__((dllimport)) HANDLE LoadImageW(HINSTANCE hInst, LPCWSTR name, UINT type, int cx, int cy, UINT fuLoad);
__attribute__((dllimport)) HANDLE CopyImage(HANDLE h, UINT type, int cx, int cy, UINT flags);
__attribute__((dllimport)) WINBOOL DrawIconEx(HDC hdc, int xLeft, int yTop, HICON hIcon, int cxWidth, int cyWidth, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags);
__attribute__((dllimport)) HICON CreateIconIndirect(PICONINFO piconinfo);
__attribute__((dllimport)) HICON CopyIcon(HICON hIcon);
__attribute__((dllimport)) WINBOOL GetIconInfo(HICON hIcon, PICONINFO piconinfo);
typedef struct _ICONINFOEXA
{
DWORD cbSize;
WINBOOL fIcon;
DWORD xHotspot;
DWORD yHotspot;
HBITMAP hbmMask;
HBITMAP hbmColor;
WORD wResID;
CHAR szModName[260];
CHAR szResName[260];
} ICONINFOEXA, *PICONINFOEXA;
typedef struct _ICONINFOEXW
{
DWORD cbSize;
WINBOOL fIcon;
DWORD xHotspot;
DWORD yHotspot;
HBITMAP hbmMask;
HBITMAP hbmColor;
WORD wResID;
WCHAR szModName[260];
WCHAR szResName[260];
} ICONINFOEXW, *PICONINFOEXW;
typedef ICONINFOEXW ICONINFOEX;
;
typedef PICONINFOEXW PICONINFOEX;
;
__attribute__((dllimport)) WINBOOL GetIconInfoExA(HICON hicon, PICONINFOEXA piconinfo);
__attribute__((dllimport)) WINBOOL GetIconInfoExW(HICON hicon, PICONINFOEXW piconinfo);
__attribute__((dllimport)) WINBOOL IsDialogMessageA(HWND hDlg, LPMSG lpMsg);
__attribute__((dllimport)) WINBOOL IsDialogMessageW(HWND hDlg, LPMSG lpMsg);
__attribute__((dllimport)) WINBOOL MapDialogRect(HWND hDlg, LPRECT lpRect);
__attribute__((dllimport)) int DlgDirListA(HWND hDlg, LPSTR lpPathSpec, int nIDListBox, int nIDStaticPath, UINT uFileType);
__attribute__((dllimport)) int DlgDirListW(HWND hDlg, LPWSTR lpPathSpec, int nIDListBox, int nIDStaticPath, UINT uFileType);
__attribute__((dllimport)) WINBOOL DlgDirSelectExA(HWND hwndDlg, LPSTR lpString, int chCount, int idListBox);
__attribute__((dllimport)) WINBOOL DlgDirSelectExW(HWND hwndDlg, LPWSTR lpString, int chCount, int idListBox);
__attribute__((dllimport)) int DlgDirListComboBoxA(HWND hDlg, LPSTR lpPathSpec, int nIDComboBox, int nIDStaticPath, UINT uFiletype);
__attribute__((dllimport)) int DlgDirListComboBoxW(HWND hDlg, LPWSTR lpPathSpec, int nIDComboBox, int nIDStaticPath, UINT uFiletype);
__attribute__((dllimport)) WINBOOL DlgDirSelectComboBoxExA(HWND hwndDlg, LPSTR lpString, int cchOut, int idComboBox);
__attribute__((dllimport)) WINBOOL DlgDirSelectComboBoxExW(HWND hwndDlg, LPWSTR lpString, int cchOut, int idComboBox);
typedef struct tagSCROLLINFO
{
UINT cbSize;
UINT fMask;
int nMin;
int nMax;
UINT nPage;
int nPos;
int nTrackPos;
} SCROLLINFO, *LPSCROLLINFO;
typedef SCROLLINFO const *LPCSCROLLINFO;
__attribute__((dllimport)) int SetScrollInfo(HWND hwnd, int nBar, LPCSCROLLINFO lpsi, WINBOOL redraw);
__attribute__((dllimport)) WINBOOL GetScrollInfo(HWND hwnd, int nBar, LPSCROLLINFO lpsi);
typedef struct tagMDICREATESTRUCTA
{
LPCSTR szClass;
LPCSTR szTitle;
HANDLE hOwner;
int x;
int y;
int cx;
int cy;
DWORD style;
LPARAM lParam;
} MDICREATESTRUCTA, *LPMDICREATESTRUCTA;
typedef struct tagMDICREATESTRUCTW
{
LPCWSTR szClass;
LPCWSTR szTitle;
HANDLE hOwner;
int x;
int y;
int cx;
int cy;
DWORD style;
LPARAM lParam;
} MDICREATESTRUCTW, *LPMDICREATESTRUCTW;
typedef MDICREATESTRUCTW MDICREATESTRUCT;
typedef LPMDICREATESTRUCTW LPMDICREATESTRUCT;
typedef struct tagCLIENTCREATESTRUCT
{
HANDLE hWindowMenu;
UINT idFirstChild;
} CLIENTCREATESTRUCT, *LPCLIENTCREATESTRUCT;
__attribute__((dllimport)) LRESULT DefFrameProcA(HWND hWnd, HWND hWndMDIClient, UINT uMsg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) LRESULT DefFrameProcW(HWND hWnd, HWND hWndMDIClient, UINT uMsg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) LRESULT DefMDIChildProcA(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) LRESULT DefMDIChildProcW(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
__attribute__((dllimport)) WINBOOL TranslateMDISysAccel(HWND hWndClient, LPMSG lpMsg);
__attribute__((dllimport)) UINT ArrangeIconicWindows(HWND hWnd);
__attribute__((dllimport)) HWND CreateMDIWindowA(LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HINSTANCE hInstance, LPARAM lParam);
__attribute__((dllimport)) HWND CreateMDIWindowW(LPCWSTR lpClassName, LPCWSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HINSTANCE hInstance, LPARAM lParam);
__attribute__((dllimport)) WORD TileWindows(HWND hwndParent, UINT wHow, const RECT *lpRect, UINT cKids, const HWND *lpKids);
__attribute__((dllimport)) WORD CascadeWindows(HWND hwndParent, UINT wHow, const RECT *lpRect, UINT cKids, const HWND *lpKids);
typedef DWORD HELPPOLY;
typedef struct tagMULTIKEYHELPA
{
DWORD mkSize;
CHAR mkKeylist;
CHAR szKeyphrase[1];
} MULTIKEYHELPA, *PMULTIKEYHELPA, *LPMULTIKEYHELPA;
typedef struct tagMULTIKEYHELPW
{
DWORD mkSize;
WCHAR mkKeylist;
WCHAR szKeyphrase[1];
} MULTIKEYHELPW, *PMULTIKEYHELPW, *LPMULTIKEYHELPW;
typedef MULTIKEYHELPW MULTIKEYHELP;
typedef PMULTIKEYHELPW PMULTIKEYHELP;
typedef LPMULTIKEYHELPW LPMULTIKEYHELP;
typedef struct tagHELPWININFOA
{
int wStructSize;
int x;
int y;
int dx;
int dy;
int wMax;
CHAR rgchMember[2];
} HELPWININFOA, *PHELPWININFOA, *LPHELPWININFOA;
typedef struct tagHELPWININFOW
{
int wStructSize;
int x;
int y;
int dx;
int dy;
int wMax;
WCHAR rgchMember[2];
} HELPWININFOW, *PHELPWININFOW, *LPHELPWININFOW;
typedef HELPWININFOW HELPWININFO;
typedef PHELPWININFOW PHELPWININFO;
typedef LPHELPWININFOW LPHELPWININFO;
__attribute__((dllimport)) WINBOOL WinHelpA(HWND hWndMain, LPCSTR lpszHelp, UINT uCommand, ULONG_PTR dwData);
__attribute__((dllimport)) WINBOOL WinHelpW(HWND hWndMain, LPCWSTR lpszHelp, UINT uCommand, ULONG_PTR dwData);
__attribute__((dllimport)) DWORD GetGuiResources(HANDLE hProcess, DWORD uiFlags);
typedef struct tagNONCLIENTMETRICSA
{
UINT cbSize;
int iBorderWidth;
int iScrollWidth;
int iScrollHeight;
int iCaptionWidth;
int iCaptionHeight;
LOGFONTA lfCaptionFont;
int iSmCaptionWidth;
int iSmCaptionHeight;
LOGFONTA lfSmCaptionFont;
int iMenuWidth;
int iMenuHeight;
LOGFONTA lfMenuFont;
LOGFONTA lfStatusFont;
LOGFONTA lfMessageFont;
int iPaddedBorderWidth;
} NONCLIENTMETRICSA, *PNONCLIENTMETRICSA, *LPNONCLIENTMETRICSA;
typedef struct tagNONCLIENTMETRICSW
{
UINT cbSize;
int iBorderWidth;
int iScrollWidth;
int iScrollHeight;
int iCaptionWidth;
int iCaptionHeight;
LOGFONTW lfCaptionFont;
int iSmCaptionWidth;
int iSmCaptionHeight;
LOGFONTW lfSmCaptionFont;
int iMenuWidth;
int iMenuHeight;
LOGFONTW lfMenuFont;
LOGFONTW lfStatusFont;
LOGFONTW lfMessageFont;
int iPaddedBorderWidth;
} NONCLIENTMETRICSW, *PNONCLIENTMETRICSW, *LPNONCLIENTMETRICSW;
typedef NONCLIENTMETRICSW NONCLIENTMETRICS;
typedef PNONCLIENTMETRICSW PNONCLIENTMETRICS;
typedef LPNONCLIENTMETRICSW LPNONCLIENTMETRICS;
typedef struct tagMINIMIZEDMETRICS
{
UINT cbSize;
int iWidth;
int iHorzGap;
int iVertGap;
int iArrange;
} MINIMIZEDMETRICS, *PMINIMIZEDMETRICS, *LPMINIMIZEDMETRICS;
typedef struct tagICONMETRICSA
{
UINT cbSize;
int iHorzSpacing;
int iVertSpacing;
int iTitleWrap;
LOGFONTA lfFont;
} ICONMETRICSA, *PICONMETRICSA, *LPICONMETRICSA;
typedef struct tagICONMETRICSW
{
UINT cbSize;
int iHorzSpacing;
int iVertSpacing;
int iTitleWrap;
LOGFONTW lfFont;
} ICONMETRICSW, *PICONMETRICSW, *LPICONMETRICSW;
typedef ICONMETRICSW ICONMETRICS;
typedef PICONMETRICSW PICONMETRICS;
typedef LPICONMETRICSW LPICONMETRICS;
typedef struct tagANIMATIONINFO
{
UINT cbSize;
int iMinAnimate;
} ANIMATIONINFO, *LPANIMATIONINFO;
typedef struct tagSERIALKEYSA
{
UINT cbSize;
DWORD dwFlags;
LPSTR lpszActivePort;
LPSTR lpszPort;
UINT iBaudRate;
UINT iPortState;
UINT iActive;
} SERIALKEYSA, *LPSERIALKEYSA;
typedef struct tagSERIALKEYSW
{
UINT cbSize;
DWORD dwFlags;
LPWSTR lpszActivePort;
LPWSTR lpszPort;
UINT iBaudRate;
UINT iPortState;
UINT iActive;
} SERIALKEYSW, *LPSERIALKEYSW;
typedef SERIALKEYSW SERIALKEYS;
typedef LPSERIALKEYSW LPSERIALKEYS;
typedef struct tagHIGHCONTRASTA
{
UINT cbSize;
DWORD dwFlags;
LPSTR lpszDefaultScheme;
} HIGHCONTRASTA, *LPHIGHCONTRASTA;
typedef struct tagHIGHCONTRASTW
{
UINT cbSize;
DWORD dwFlags;
LPWSTR lpszDefaultScheme;
} HIGHCONTRASTW, *LPHIGHCONTRASTW;
typedef HIGHCONTRASTW HIGHCONTRAST;
typedef LPHIGHCONTRASTW LPHIGHCONTRAST;
typedef struct _VIDEOPARAMETERS
{
GUID Guid;
ULONG 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;
UCHAR bOEMCopyProtection[256];
} VIDEOPARAMETERS, *PVIDEOPARAMETERS, *LPVIDEOPARAMETERS;
__attribute__((dllimport)) LONG ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags);
__attribute__((dllimport)) LONG ChangeDisplaySettingsW(LPDEVMODEW lpDevMode, DWORD dwFlags);
__attribute__((dllimport)) LONG ChangeDisplaySettingsExA(LPCSTR lpszDeviceName, LPDEVMODEA lpDevMode, HWND hwnd, DWORD dwflags, LPVOID lParam);
__attribute__((dllimport)) LONG ChangeDisplaySettingsExW(LPCWSTR lpszDeviceName, LPDEVMODEW lpDevMode, HWND hwnd, DWORD dwflags, LPVOID lParam);
__attribute__((dllimport)) WINBOOL EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEA lpDevMode);
__attribute__((dllimport)) WINBOOL EnumDisplaySettingsW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode);
__attribute__((dllimport)) WINBOOL EnumDisplaySettingsExA(LPCSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEA lpDevMode, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL EnumDisplaySettingsExW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL EnumDisplayDevicesA(LPCSTR lpDevice, DWORD iDevNum, PDISPLAY_DEVICEA lpDisplayDevice, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL EnumDisplayDevicesW(LPCWSTR lpDevice, DWORD iDevNum, PDISPLAY_DEVICEW lpDisplayDevice, DWORD dwFlags);
__attribute__((dllimport)) LONG GetDisplayConfigBufferSizes(UINT32 flags, UINT32 *numPathArrayElements, UINT32 *numModeInfoArrayElements);
__attribute__((dllimport)) LONG SetDisplayConfig(UINT32 numPathArrayElements, DISPLAYCONFIG_PATH_INFO *pathArray, UINT32 numModeInfoArrayElements, DISPLAYCONFIG_MODE_INFO *modeInfoArray, UINT32 flags);
__attribute__((dllimport)) LONG QueryDisplayConfig(UINT32 flags, UINT32 *numPathArrayElements, DISPLAYCONFIG_PATH_INFO *pathArray, UINT32 *numModeInfoArrayElements, DISPLAYCONFIG_MODE_INFO *modeInfoArray, DISPLAYCONFIG_TOPOLOGY_ID *currentTopologyId);
__attribute__((dllimport)) LONG DisplayConfigGetDeviceInfo(DISPLAYCONFIG_DEVICE_INFO_HEADER *requestPacket);
__attribute__((dllimport)) LONG DisplayConfigSetDeviceInfo(DISPLAYCONFIG_DEVICE_INFO_HEADER *setPacket);
__attribute__((dllimport)) WINBOOL SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni);
__attribute__((dllimport)) WINBOOL SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni);
typedef struct tagFILTERKEYS
{
UINT cbSize;
DWORD dwFlags;
DWORD iWaitMSec;
DWORD iDelayMSec;
DWORD iRepeatMSec;
DWORD iBounceMSec;
} FILTERKEYS, *LPFILTERKEYS;
typedef struct tagSTICKYKEYS
{
UINT cbSize;
DWORD dwFlags;
} STICKYKEYS, *LPSTICKYKEYS;
typedef struct tagMOUSEKEYS
{
UINT cbSize;
DWORD dwFlags;
DWORD iMaxSpeed;
DWORD iTimeToMaxSpeed;
DWORD iCtrlSpeed;
DWORD dwReserved1;
DWORD dwReserved2;
} MOUSEKEYS, *LPMOUSEKEYS;
typedef struct tagACCESSTIMEOUT
{
UINT cbSize;
DWORD dwFlags;
DWORD iTimeOutMSec;
} ACCESSTIMEOUT, *LPACCESSTIMEOUT;
typedef struct tagSOUNDSENTRYA
{
UINT cbSize;
DWORD dwFlags;
DWORD iFSTextEffect;
DWORD iFSTextEffectMSec;
DWORD iFSTextEffectColorBits;
DWORD iFSGrafEffect;
DWORD iFSGrafEffectMSec;
DWORD iFSGrafEffectColor;
DWORD iWindowsEffect;
DWORD iWindowsEffectMSec;
LPSTR lpszWindowsEffectDLL;
DWORD iWindowsEffectOrdinal;
} SOUNDSENTRYA, *LPSOUNDSENTRYA;
typedef struct tagSOUNDSENTRYW
{
UINT cbSize;
DWORD dwFlags;
DWORD iFSTextEffect;
DWORD iFSTextEffectMSec;
DWORD iFSTextEffectColorBits;
DWORD iFSGrafEffect;
DWORD iFSGrafEffectMSec;
DWORD iFSGrafEffectColor;
DWORD iWindowsEffect;
DWORD iWindowsEffectMSec;
LPWSTR lpszWindowsEffectDLL;
DWORD iWindowsEffectOrdinal;
} SOUNDSENTRYW, *LPSOUNDSENTRYW;
typedef SOUNDSENTRYW SOUNDSENTRY;
typedef LPSOUNDSENTRYW LPSOUNDSENTRY;
typedef struct tagTOGGLEKEYS
{
UINT cbSize;
DWORD dwFlags;
} TOGGLEKEYS, *LPTOGGLEKEYS;
typedef struct tagMONITORINFO
{
DWORD cbSize;
RECT rcMonitor;
RECT rcWork;
DWORD dwFlags;
} MONITORINFO, *LPMONITORINFO;
typedef struct tagAUDIODESCRIPTION
{
UINT cbSize;
WINBOOL Enabled;
LCID Locale;
} AUDIODESCRIPTION, *LPAUDIODESCRIPTION;
typedef struct tagMONITORINFOEXA
{
__extension__ struct
{
DWORD cbSize;
RECT rcMonitor;
RECT rcWork;
DWORD dwFlags;
};
CHAR szDevice[32];
} MONITORINFOEXA, *LPMONITORINFOEXA;
typedef struct tagMONITORINFOEXW
{
__extension__ struct
{
DWORD cbSize;
RECT rcMonitor;
RECT rcWork;
DWORD dwFlags;
};
WCHAR szDevice[32];
} MONITORINFOEXW, *LPMONITORINFOEXW;
typedef MONITORINFOEXW MONITORINFOEX;
typedef LPMONITORINFOEXW LPMONITORINFOEX;
typedef WINBOOL (*MONITORENUMPROC)(HMONITOR, HDC, LPRECT, LPARAM);
__attribute__((dllimport)) void SetDebugErrorLevel(DWORD dwLevel);
__attribute__((dllimport)) void SetLastErrorEx(DWORD dwErrCode, DWORD dwType);
__attribute__((dllimport)) int InternalGetWindowText(HWND hWnd, LPWSTR pString, int cchMaxCount);
__attribute__((dllimport)) WINBOOL CancelShutdown(void);
__attribute__((dllimport)) HMONITOR MonitorFromPoint(POINT pt, DWORD dwFlags);
__attribute__((dllimport)) HMONITOR MonitorFromRect(LPCRECT lprc, DWORD dwFlags);
__attribute__((dllimport)) HMONITOR MonitorFromWindow(HWND hwnd, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL EndTask(HWND hWnd, WINBOOL fShutDown, WINBOOL fForce);
__attribute__((dllimport)) WINBOOL SoundSentry(void);
__attribute__((dllimport)) WINBOOL GetMonitorInfoA(HMONITOR hMonitor, LPMONITORINFO lpmi);
__attribute__((dllimport)) WINBOOL GetMonitorInfoW(HMONITOR hMonitor, LPMONITORINFO lpmi);
__attribute__((dllimport)) WINBOOL EnumDisplayMonitors(HDC hdc, LPCRECT lprcClip, MONITORENUMPROC lpfnEnum, LPARAM dwData);
typedef void (*WINEVENTPROC)(HWINEVENTHOOK hWinEventHook, DWORD event, HWND hwnd, LONG idObject, LONG idChild, DWORD idEventThread, DWORD dwmsEventTime);
__attribute__((dllimport)) void NotifyWinEvent(DWORD event, HWND hwnd, LONG idObject, LONG idChild);
__attribute__((dllimport)) HWINEVENTHOOK SetWinEventHook(DWORD eventMin, DWORD eventMax, HMODULE hmodWinEventProc, WINEVENTPROC pfnWinEventProc, DWORD idProcess, DWORD idThread, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL IsWinEventHookInstalled(DWORD event);
__attribute__((dllimport)) WINBOOL UnhookWinEvent(HWINEVENTHOOK hWinEventHook);
typedef struct tagGUITHREADINFO
{
DWORD cbSize;
DWORD flags;
HWND hwndActive;
HWND hwndFocus;
HWND hwndCapture;
HWND hwndMenuOwner;
HWND hwndMoveSize;
HWND hwndCaret;
RECT rcCaret;
} GUITHREADINFO, *PGUITHREADINFO, *LPGUITHREADINFO;
__attribute__((dllimport)) WINBOOL GetGUIThreadInfo(DWORD idThread, PGUITHREADINFO pgui);
__attribute__((dllimport)) WINBOOL BlockInput(WINBOOL fBlockIt);
__attribute__((dllimport)) UINT GetWindowModuleFileNameA(HWND hwnd, LPSTR pszFileName, UINT cchFileNameMax);
__attribute__((dllimport)) UINT GetWindowModuleFileNameW(HWND hwnd, LPWSTR pszFileName, UINT cchFileNameMax);
__attribute__((dllimport)) WINBOOL SetProcessDPIAware(void);
__attribute__((dllimport)) WINBOOL IsProcessDPIAware(void);
typedef struct tagCURSORINFO
{
DWORD cbSize;
DWORD flags;
HCURSOR hCursor;
POINT ptScreenPos;
} CURSORINFO, *PCURSORINFO, *LPCURSORINFO;
__attribute__((dllimport)) WINBOOL GetCursorInfo(PCURSORINFO pci);
typedef struct tagWINDOWINFO
{
DWORD cbSize;
RECT rcWindow;
RECT rcClient;
DWORD dwStyle;
DWORD dwExStyle;
DWORD dwWindowStatus;
UINT cxWindowBorders;
UINT cyWindowBorders;
ATOM atomWindowType;
WORD wCreatorVersion;
} WINDOWINFO, *PWINDOWINFO, *LPWINDOWINFO;
__attribute__((dllimport)) WINBOOL GetWindowInfo(HWND hwnd, PWINDOWINFO pwi);
typedef struct tagTITLEBARINFO
{
DWORD cbSize;
RECT rcTitleBar;
DWORD rgstate[5 + 1];
} TITLEBARINFO, *PTITLEBARINFO, *LPTITLEBARINFO;
__attribute__((dllimport)) WINBOOL GetTitleBarInfo(HWND hwnd, PTITLEBARINFO pti);
typedef struct tagTITLEBARINFOEX
{
DWORD cbSize;
RECT rcTitleBar;
DWORD rgstate[5 + 1];
RECT rgrect[5 + 1];
} TITLEBARINFOEX, *PTITLEBARINFOEX, *LPTITLEBARINFOEX;
typedef struct tagMENUBARINFO
{
DWORD cbSize;
RECT rcBar;
HMENU hMenu;
HWND hwndMenu;
WINBOOL fBarFocused : 1;
WINBOOL fFocused : 1;
} MENUBARINFO, *PMENUBARINFO, *LPMENUBARINFO;
__attribute__((dllimport)) WINBOOL GetMenuBarInfo(HWND hwnd, LONG idObject, LONG idItem, PMENUBARINFO pmbi);
typedef struct tagSCROLLBARINFO
{
DWORD cbSize;
RECT rcScrollBar;
int dxyLineButton;
int xyThumbTop;
int xyThumbBottom;
int reserved;
DWORD rgstate[5 + 1];
} SCROLLBARINFO, *PSCROLLBARINFO, *LPSCROLLBARINFO;
__attribute__((dllimport)) WINBOOL GetScrollBarInfo(HWND hwnd, LONG idObject, PSCROLLBARINFO psbi);
typedef struct tagCOMBOBOXINFO
{
DWORD cbSize;
RECT rcItem;
RECT rcButton;
DWORD stateButton;
HWND hwndCombo;
HWND hwndItem;
HWND hwndList;
} COMBOBOXINFO, *PCOMBOBOXINFO, *LPCOMBOBOXINFO;
__attribute__((dllimport)) WINBOOL GetComboBoxInfo(HWND hwndCombo, PCOMBOBOXINFO pcbi);
__attribute__((dllimport)) HWND GetAncestor(HWND hwnd, UINT gaFlags);
__attribute__((dllimport)) HWND RealChildWindowFromPoint(HWND hwndParent, POINT ptParentClientCoords);
__attribute__((dllimport)) UINT RealGetWindowClassA(HWND hwnd, LPSTR ptszClassName, UINT cchClassNameMax);
__attribute__((dllimport)) UINT RealGetWindowClassW(HWND hwnd, LPWSTR ptszClassName, UINT cchClassNameMax);
typedef struct tagALTTABINFO
{
DWORD cbSize;
int cItems;
int cColumns;
int cRows;
int iColFocus;
int iRowFocus;
int cxItem;
int cyItem;
POINT ptStart;
} ALTTABINFO, *PALTTABINFO, *LPALTTABINFO;
__attribute__((dllimport)) WINBOOL GetAltTabInfoA(HWND hwnd, int iItem, PALTTABINFO pati, LPSTR pszItemText, UINT cchItemText);
__attribute__((dllimport)) WINBOOL GetAltTabInfoW(HWND hwnd, int iItem, PALTTABINFO pati, LPWSTR pszItemText, UINT cchItemText);
__attribute__((dllimport)) DWORD GetListBoxInfo(HWND hwnd);
__attribute__((dllimport)) WINBOOL LockWorkStation(void);
__attribute__((dllimport)) WINBOOL UserHandleGrantAccess(HANDLE hUserHandle, HANDLE hJob, WINBOOL bGrant);
struct HRAWINPUT__
{
int unused;
};
typedef struct HRAWINPUT__ *HRAWINPUT;
typedef struct tagRAWINPUTHEADER
{
DWORD dwType;
DWORD dwSize;
HANDLE hDevice;
WPARAM wParam;
} RAWINPUTHEADER, *PRAWINPUTHEADER, *LPRAWINPUTHEADER;
typedef struct tagRAWMOUSE
{
USHORT usFlags;
__extension__ union {
ULONG ulButtons;
__extension__ struct
{
USHORT usButtonFlags;
USHORT usButtonData;
};
};
ULONG ulRawButtons;
LONG lLastX;
LONG lLastY;
ULONG ulExtraInformation;
} RAWMOUSE, *PRAWMOUSE, *LPRAWMOUSE;
typedef struct tagRAWKEYBOARD
{
USHORT MakeCode;
USHORT Flags;
USHORT Reserved;
USHORT VKey;
UINT Message;
ULONG ExtraInformation;
} RAWKEYBOARD, *PRAWKEYBOARD, *LPRAWKEYBOARD;
typedef struct tagRAWHID
{
DWORD dwSizeHid;
DWORD dwCount;
BYTE bRawData[1];
} RAWHID, *PRAWHID, *LPRAWHID;
typedef struct tagRAWINPUT
{
RAWINPUTHEADER header;
union {
RAWMOUSE mouse;
RAWKEYBOARD keyboard;
RAWHID hid;
} data;
} RAWINPUT, *PRAWINPUT, *LPRAWINPUT;
__attribute__((dllimport)) UINT GetRawInputData(HRAWINPUT hRawInput, UINT uiCommand, LPVOID pData, PUINT pcbSize, UINT cbSizeHeader);
typedef struct tagRID_DEVICE_INFO_MOUSE
{
DWORD dwId;
DWORD dwNumberOfButtons;
DWORD dwSampleRate;
WINBOOL fHasHorizontalWheel;
} RID_DEVICE_INFO_MOUSE, *PRID_DEVICE_INFO_MOUSE;
typedef struct tagRID_DEVICE_INFO_KEYBOARD
{
DWORD dwType;
DWORD dwSubType;
DWORD dwKeyboardMode;
DWORD dwNumberOfFunctionKeys;
DWORD dwNumberOfIndicators;
DWORD dwNumberOfKeysTotal;
} RID_DEVICE_INFO_KEYBOARD, *PRID_DEVICE_INFO_KEYBOARD;
typedef struct tagRID_DEVICE_INFO_HID
{
DWORD dwVendorId;
DWORD dwProductId;
DWORD dwVersionNumber;
USHORT usUsagePage;
USHORT usUsage;
} RID_DEVICE_INFO_HID, *PRID_DEVICE_INFO_HID;
typedef struct tagRID_DEVICE_INFO
{
DWORD cbSize;
DWORD dwType;
__extension__ union {
RID_DEVICE_INFO_MOUSE mouse;
RID_DEVICE_INFO_KEYBOARD keyboard;
RID_DEVICE_INFO_HID hid;
};
} RID_DEVICE_INFO, *PRID_DEVICE_INFO, *LPRID_DEVICE_INFO;
__attribute__((dllimport)) UINT GetRawInputDeviceInfoA(HANDLE hDevice, UINT uiCommand, LPVOID pData, PUINT pcbSize);
__attribute__((dllimport)) UINT GetRawInputDeviceInfoW(HANDLE hDevice, UINT uiCommand, LPVOID pData, PUINT pcbSize);
__attribute__((dllimport)) UINT GetRawInputBuffer(PRAWINPUT pData, PUINT pcbSize, UINT cbSizeHeader);
typedef struct tagRAWINPUTDEVICE
{
USHORT usUsagePage;
USHORT usUsage;
DWORD dwFlags;
HWND hwndTarget;
} RAWINPUTDEVICE, *PRAWINPUTDEVICE, *LPRAWINPUTDEVICE;
typedef const RAWINPUTDEVICE *PCRAWINPUTDEVICE;
typedef struct tagRAWINPUTDEVICELIST
{
HANDLE hDevice;
DWORD dwType;
} RAWINPUTDEVICELIST, *PRAWINPUTDEVICELIST;
__attribute__((dllimport)) WINBOOL RegisterRawInputDevices(PCRAWINPUTDEVICE pRawInputDevices, UINT uiNumDevices, UINT cbSize);
__attribute__((dllimport)) UINT GetRegisteredRawInputDevices(PRAWINPUTDEVICE pRawInputDevices, PUINT puiNumDevices, UINT cbSize);
__attribute__((dllimport)) UINT GetRawInputDeviceList(PRAWINPUTDEVICELIST pRawInputDeviceList, PUINT puiNumDevices, UINT cbSize);
__attribute__((dllimport)) LRESULT DefRawInputProc(PRAWINPUT *paRawInput, INT nInput, UINT cbSizeHeader);
__attribute__((dllimport)) WINBOOL ChangeWindowMessageFilter(UINT message, DWORD dwFlag);
typedef struct tagCHANGEFILTERSTRUCT
{
DWORD cbSize;
DWORD ExtStatus;
} CHANGEFILTERSTRUCT, *PCHANGEFILTERSTRUCT;
__attribute__((dllimport)) WINBOOL ChangeWindowMessageFilterEx(HWND hwnd, UINT message, DWORD action, PCHANGEFILTERSTRUCT pChangeFilterStruct);
struct HGESTUREINFO__
{
int unused;
};
typedef struct HGESTUREINFO__ *HGESTUREINFO;
typedef struct tagGESTUREINFO
{
UINT cbSize;
DWORD dwFlags;
DWORD dwID;
HWND hwndTarget;
POINTS ptsLocation;
DWORD dwInstanceID;
DWORD dwSequenceID;
ULONGLONG ullArguments;
UINT cbExtraArgs;
} GESTUREINFO, *PGESTUREINFO;
typedef GESTUREINFO const *PCGESTUREINFO;
typedef struct tagGESTURENOTIFYSTRUCT
{
UINT cbSize;
DWORD dwFlags;
HWND hwndTarget;
POINTS ptsLocation;
DWORD dwInstanceID;
} GESTURENOTIFYSTRUCT, *PGESTURENOTIFYSTRUCT;
__attribute__((dllimport)) WINBOOL GetGestureInfo(HGESTUREINFO hGestureInfo, PGESTUREINFO pGestureInfo);
__attribute__((dllimport)) WINBOOL GetGestureExtraArgs(HGESTUREINFO hGestureInfo, UINT cbExtraArgs, PBYTE pExtraArgs);
__attribute__((dllimport)) WINBOOL CloseGestureInfoHandle(HGESTUREINFO hGestureInfo);
typedef struct tagGESTURECONFIG
{
DWORD dwID;
DWORD dwWant;
DWORD dwBlock;
} GESTURECONFIG, *PGESTURECONFIG;
__attribute__((dllimport)) WINBOOL SetGestureConfig(HWND hwnd, DWORD dwReserved, UINT cIDs, PGESTURECONFIG pGestureConfig, UINT cbSize);
__attribute__((dllimport)) WINBOOL GetGestureConfig(HWND hwnd, DWORD dwReserved, DWORD dwFlags, PUINT pcIDs, PGESTURECONFIG pGestureConfig, UINT cbSize);
__attribute__((dllimport)) WINBOOL ShutdownBlockReasonCreate(HWND hWnd, LPCWSTR pwszReason);
__attribute__((dllimport)) WINBOOL ShutdownBlockReasonQuery(HWND hWnd, LPWSTR pwszBuff, DWORD *pcchBuff);
__attribute__((dllimport)) WINBOOL ShutdownBlockReasonDestroy(HWND hWnd);
typedef enum tagINPUT_MESSAGE_DEVICE_TYPE
{
IMDT_UNAVAILABLE = 0x00000000,
IMDT_KEYBOARD = 0x00000001,
IMDT_MOUSE = 0x00000002,
IMDT_TOUCH = 0x00000004,
IMDT_PEN = 0x00000008,
} INPUT_MESSAGE_DEVICE_TYPE;
typedef enum tagINPUT_MESSAGE_ORIGIN_ID
{
IMO_UNAVAILABLE = 0x00000000,
IMO_HARDWARE = 0x00000001,
IMO_INJECTED = 0x00000002,
IMO_SYSTEM = 0x00000004,
} INPUT_MESSAGE_ORIGIN_ID;
typedef struct tagINPUT_MESSAGE_SOURCE
{
INPUT_MESSAGE_DEVICE_TYPE deviceType;
INPUT_MESSAGE_ORIGIN_ID originId;
} INPUT_MESSAGE_SOURCE;
__attribute__((dllimport)) WINBOOL GetCurrentInputMessageSource(INPUT_MESSAGE_SOURCE *inputMessageSource);
__attribute__((dllimport)) WINBOOL GetCIMSSM(INPUT_MESSAGE_SOURCE *inputMessageSource);
typedef enum tagAR_STATE
{
AR_ENABLED = 0x0,
AR_DISABLED = 0x1,
AR_SUPPRESSED = 0x2,
AR_REMOTESESSION = 0x4,
AR_MULTIMON = 0x8,
AR_NOSENSOR = 0x10,
AR_NOT_SUPPORTED = 0x20,
AR_DOCKED = 0x40,
AR_LAPTOP = 0x80
} AR_STATE,
*PAR_STATE;
;
typedef enum ORIENTATION_PREFERENCE
{
ORIENTATION_PREFERENCE_NONE = 0x0,
ORIENTATION_PREFERENCE_LANDSCAPE = 0x1,
ORIENTATION_PREFERENCE_PORTRAIT = 0x2,
ORIENTATION_PREFERENCE_LANDSCAPE_FLIPPED = 0x4,
ORIENTATION_PREFERENCE_PORTRAIT_FLIPPED = 0x8
} ORIENTATION_PREFERENCE;
;
__attribute__((dllimport)) WINBOOL GetAutoRotationState(PAR_STATE pState);
__attribute__((dllimport)) WINBOOL GetDisplayAutoRotationPreferences(ORIENTATION_PREFERENCE *pOrientation);
__attribute__((dllimport)) WINBOOL GetDisplayAutoRotationPreferencesByProcessId(DWORD dwProcessId, ORIENTATION_PREFERENCE *pOrientation, WINBOOL *fRotateScreen);
__attribute__((dllimport)) WINBOOL SetDisplayAutoRotationPreferences(ORIENTATION_PREFERENCE orientation);
__attribute__((dllimport)) WINBOOL IsImmersiveProcess(HANDLE hProcess);
__attribute__((dllimport)) WINBOOL SetProcessRestrictionExemption(WINBOOL fEnableExemption);
__attribute__((dllimport)) int GetTimeFormatEx(LPCWSTR lpLocaleName, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpTimeStr, int cchTime);
__attribute__((dllimport)) int GetDateFormatEx(LPCWSTR lpLocaleName, DWORD dwFlags, const SYSTEMTIME *lpDate, LPCWSTR lpFormat, LPWSTR lpDateStr, int cchDate, LPCWSTR lpCalendar);
__attribute__((dllimport)) int GetDateFormatA(LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpDate, LPCSTR lpFormat, LPSTR lpDateStr, int cchDate);
__attribute__((dllimport)) int GetDateFormatW(LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpDate, LPCWSTR lpFormat, LPWSTR lpDateStr, int cchDate);
__attribute__((dllimport)) int GetTimeFormatA(LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCSTR lpFormat, LPSTR lpTimeStr, int cchTime);
__attribute__((dllimport)) int GetTimeFormatW(LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpTimeStr, int cchTime);
typedef DWORD LGRPID;
typedef DWORD LCTYPE;
typedef DWORD CALTYPE;
typedef DWORD CALID;
typedef struct _cpinfo
{
UINT MaxCharSize;
BYTE DefaultChar[2];
BYTE LeadByte[12];
} CPINFO, *LPCPINFO;
typedef struct _cpinfoexA
{
UINT MaxCharSize;
BYTE DefaultChar[2];
BYTE LeadByte[12];
WCHAR UnicodeDefaultChar;
UINT CodePage;
CHAR CodePageName[260];
} CPINFOEXA, *LPCPINFOEXA;
typedef struct _cpinfoexW
{
UINT MaxCharSize;
BYTE DefaultChar[2];
BYTE LeadByte[12];
WCHAR UnicodeDefaultChar;
UINT CodePage;
WCHAR CodePageName[260];
} CPINFOEXW, *LPCPINFOEXW;
typedef CPINFOEXW CPINFOEX;
typedef LPCPINFOEXW LPCPINFOEX;
typedef struct _numberfmtA
{
UINT NumDigits;
UINT LeadingZero;
UINT Grouping;
LPSTR lpDecimalSep;
LPSTR lpThousandSep;
UINT NegativeOrder;
} NUMBERFMTA, *LPNUMBERFMTA;
typedef struct _numberfmtW
{
UINT NumDigits;
UINT LeadingZero;
UINT Grouping;
LPWSTR lpDecimalSep;
LPWSTR lpThousandSep;
UINT NegativeOrder;
} NUMBERFMTW, *LPNUMBERFMTW;
typedef NUMBERFMTW NUMBERFMT;
typedef LPNUMBERFMTW LPNUMBERFMT;
typedef struct _currencyfmtA
{
UINT NumDigits;
UINT LeadingZero;
UINT Grouping;
LPSTR lpDecimalSep;
LPSTR lpThousandSep;
UINT NegativeOrder;
UINT PositiveOrder;
LPSTR lpCurrencySymbol;
} CURRENCYFMTA, *LPCURRENCYFMTA;
typedef struct _currencyfmtW
{
UINT NumDigits;
UINT LeadingZero;
UINT Grouping;
LPWSTR lpDecimalSep;
LPWSTR lpThousandSep;
UINT NegativeOrder;
UINT PositiveOrder;
LPWSTR lpCurrencySymbol;
} CURRENCYFMTW, *LPCURRENCYFMTW;
typedef CURRENCYFMTW CURRENCYFMT;
typedef LPCURRENCYFMTW LPCURRENCYFMT;
enum SYSNLS_FUNCTION
{
COMPARE_STRING = 0x1
};
typedef DWORD NLS_FUNCTION;
typedef struct _nlsversioninfo
{
DWORD dwNLSVersionInfoSize;
DWORD dwNLSVersion;
DWORD dwDefinedVersion;
} NLSVERSIONINFO, *LPNLSVERSIONINFO;
typedef struct _nlsversioninfoex
{
DWORD dwNLSVersionInfoSize;
DWORD dwNLSVersion;
DWORD dwDefinedVersion;
DWORD dwEffectiveId;
GUID guidCustomVersion;
} NLSVERSIONINFOEX, *LPNLSVERSIONINFOEX;
typedef LONG GEOID;
typedef DWORD GEOTYPE;
typedef DWORD GEOCLASS;
enum SYSGEOTYPE
{
GEO_NATION = 0x0001,
GEO_LATITUDE = 0x0002,
GEO_LONGITUDE = 0x0003,
GEO_ISO2 = 0x0004,
GEO_ISO3 = 0x0005,
GEO_RFC1766 = 0x0006,
GEO_LCID = 0x0007,
GEO_FRIENDLYNAME = 0x0008,
GEO_OFFICIALNAME = 0x0009,
GEO_TIMEZONES = 0x000a,
GEO_OFFICIALLANGUAGES = 0x000b,
GEO_ISO_UN_NUMBER = 0x000c,
GEO_PARENT = 0x000d
};
enum SYSGEOCLASS
{
GEOCLASS_NATION = 16,
GEOCLASS_REGION = 14,
GEOCLASS_ALL = 0
};
typedef enum _NORM_FORM
{
NormalizationOther = 0,
NormalizationC = 0x1,
NormalizationD = 0x2,
NormalizationKC = 0x5,
NormalizationKD = 0x6
} NORM_FORM;
typedef WINBOOL (*LANGUAGEGROUP_ENUMPROCA)(LGRPID, LPSTR, LPSTR, DWORD, LONG_PTR);
typedef WINBOOL (*LANGGROUPLOCALE_ENUMPROCA)(LGRPID, LCID, LPSTR, LONG_PTR);
typedef WINBOOL (*UILANGUAGE_ENUMPROCA)(LPSTR, LONG_PTR);
typedef WINBOOL (*CODEPAGE_ENUMPROCA)(LPSTR);
typedef WINBOOL (*DATEFMT_ENUMPROCA)(LPSTR);
typedef WINBOOL (*DATEFMT_ENUMPROCEXA)(LPSTR, CALID);
typedef WINBOOL (*TIMEFMT_ENUMPROCA)(LPSTR);
typedef WINBOOL (*CALINFO_ENUMPROCA)(LPSTR);
typedef WINBOOL (*CALINFO_ENUMPROCEXA)(LPSTR, CALID);
typedef WINBOOL (*LOCALE_ENUMPROCA)(LPSTR);
typedef WINBOOL (*LOCALE_ENUMPROCW)(LPWSTR);
typedef WINBOOL (*LANGUAGEGROUP_ENUMPROCW)(LGRPID, LPWSTR, LPWSTR, DWORD, LONG_PTR);
typedef WINBOOL (*LANGGROUPLOCALE_ENUMPROCW)(LGRPID, LCID, LPWSTR, LONG_PTR);
typedef WINBOOL (*UILANGUAGE_ENUMPROCW)(LPWSTR, LONG_PTR);
typedef WINBOOL (*CODEPAGE_ENUMPROCW)(LPWSTR);
typedef WINBOOL (*DATEFMT_ENUMPROCW)(LPWSTR);
typedef WINBOOL (*DATEFMT_ENUMPROCEXW)(LPWSTR, CALID);
typedef WINBOOL (*TIMEFMT_ENUMPROCW)(LPWSTR);
typedef WINBOOL (*CALINFO_ENUMPROCW)(LPWSTR);
typedef WINBOOL (*CALINFO_ENUMPROCEXW)(LPWSTR, CALID);
typedef WINBOOL (*GEO_ENUMPROC)(GEOID);
typedef struct _FILEMUIINFO
{
DWORD dwSize;
DWORD dwVersion;
DWORD dwFileType;
BYTE pChecksum[16];
BYTE pServiceChecksum[16];
DWORD dwLanguageNameOffset;
DWORD dwTypeIDMainSize;
DWORD dwTypeIDMainOffset;
DWORD dwTypeNameMainOffset;
DWORD dwTypeIDMUISize;
DWORD dwTypeIDMUIOffset;
DWORD dwTypeNameMUIOffset;
BYTE abBuffer[8];
} FILEMUIINFO, *PFILEMUIINFO;
__attribute__((dllimport)) int CompareStringW(LCID Locale, DWORD dwCmpFlags, PCNZWCH lpString1, int cchCount1, PCNZWCH lpString2, int cchCount2);
__attribute__((dllimport)) int FoldStringW(DWORD dwMapFlags, LPCWCH lpSrcStr, int cchSrc, LPWSTR lpDestStr, int cchDest);
__attribute__((dllimport)) WINBOOL GetStringTypeExW(LCID Locale, DWORD dwInfoType, LPCWCH lpSrcStr, int cchSrc, LPWORD lpCharType);
__attribute__((dllimport)) int CompareStringEx(LPCWSTR lpLocaleName, DWORD dwCmpFlags, LPCWCH lpString1, int cchCount1, LPCWCH lpString2, int cchCount2, LPNLSVERSIONINFO lpVersionInformation, LPVOID lpReserved, LPARAM lParam);
__attribute__((dllimport)) int CompareStringOrdinal(LPCWCH lpString1, int cchCount1, LPCWCH lpString2, int cchCount2, WINBOOL bIgnoreCase);
__attribute__((dllimport)) WINBOOL GetStringTypeW(DWORD dwInfoType, LPCWCH lpSrcStr, int cchSrc, LPWORD lpCharType);
__attribute__((dllimport)) int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCCH lpMultiByteStr, int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar);
__attribute__((dllimport)) int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWCH lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, LPCCH lpDefaultChar, LPBOOL lpUsedDefaultChar);
__attribute__((dllimport)) WINBOOL IsValidCodePage(UINT CodePage);
__attribute__((dllimport)) UINT GetACP(void);
__attribute__((dllimport)) WINBOOL IsDBCSLeadByteEx(UINT CodePage, BYTE TestChar);
__attribute__((dllimport)) UINT GetOEMCP(void);
__attribute__((dllimport)) int CompareStringA(LCID Locale, DWORD dwCmpFlags, PCNZCH lpString1, int cchCount1, PCNZCH lpString2, int cchCount2);
__attribute__((dllimport)) int LCMapStringW(LCID Locale, DWORD dwMapFlags, LPCWSTR lpSrcStr, int cchSrc, LPWSTR lpDestStr, int cchDest);
__attribute__((dllimport)) int LCMapStringA(LCID Locale, DWORD dwMapFlags, LPCSTR lpSrcStr, int cchSrc, LPSTR lpDestStr, int cchDest);
__attribute__((dllimport)) int GetLocaleInfoW(LCID Locale, LCTYPE LCType, LPWSTR lpLCData, int cchData);
__attribute__((dllimport)) int GetLocaleInfoA(LCID Locale, LCTYPE LCType, LPSTR lpLCData, int cchData);
__attribute__((dllimport)) WINBOOL IsDBCSLeadByte(BYTE TestChar);
__attribute__((dllimport)) int GetNumberFormatA(LCID Locale, DWORD dwFlags, LPCSTR lpValue, const NUMBERFMTA *lpFormat, LPSTR lpNumberStr, int cchNumber);
__attribute__((dllimport)) int GetNumberFormatW(LCID Locale, DWORD dwFlags, LPCWSTR lpValue, const NUMBERFMTW *lpFormat, LPWSTR lpNumberStr, int cchNumber);
__attribute__((dllimport)) int GetCurrencyFormatA(LCID Locale, DWORD dwFlags, LPCSTR lpValue, const CURRENCYFMTA *lpFormat, LPSTR lpCurrencyStr, int cchCurrency);
__attribute__((dllimport)) int GetCurrencyFormatW(LCID Locale, DWORD dwFlags, LPCWSTR lpValue, const CURRENCYFMTW *lpFormat, LPWSTR lpCurrencyStr, int cchCurrency);
__attribute__((dllimport)) WINBOOL EnumCalendarInfoA(CALINFO_ENUMPROCA lpCalInfoEnumProc, LCID Locale, CALID Calendar, CALTYPE CalType);
__attribute__((dllimport)) WINBOOL EnumCalendarInfoW(CALINFO_ENUMPROCW lpCalInfoEnumProc, LCID Locale, CALID Calendar, CALTYPE CalType);
__attribute__((dllimport)) WINBOOL EnumCalendarInfoExA(CALINFO_ENUMPROCEXA lpCalInfoEnumProcEx, LCID Locale, CALID Calendar, CALTYPE CalType);
__attribute__((dllimport)) WINBOOL EnumCalendarInfoExW(CALINFO_ENUMPROCEXW lpCalInfoEnumProcEx, LCID Locale, CALID Calendar, CALTYPE CalType);
__attribute__((dllimport)) WINBOOL EnumTimeFormatsA(TIMEFMT_ENUMPROCA lpTimeFmtEnumProc, LCID Locale, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL EnumTimeFormatsW(TIMEFMT_ENUMPROCW lpTimeFmtEnumProc, LCID Locale, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL EnumDateFormatsA(DATEFMT_ENUMPROCA lpDateFmtEnumProc, LCID Locale, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL EnumDateFormatsW(DATEFMT_ENUMPROCW lpDateFmtEnumProc, LCID Locale, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL EnumDateFormatsExA(DATEFMT_ENUMPROCEXA lpDateFmtEnumProcEx, LCID Locale, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL EnumDateFormatsExW(DATEFMT_ENUMPROCEXW lpDateFmtEnumProcEx, LCID Locale, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL IsValidLanguageGroup(LGRPID LanguageGroup, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL GetNLSVersion(NLS_FUNCTION Function, LCID Locale, LPNLSVERSIONINFO lpVersionInformation);
__attribute__((dllimport)) WINBOOL IsNLSDefinedString(NLS_FUNCTION Function, DWORD dwFlags, LPNLSVERSIONINFO lpVersionInformation, LPCWSTR lpString, INT cchStr);
__attribute__((dllimport)) WINBOOL IsValidLocale(LCID Locale, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL SetLocaleInfoA(LCID Locale, LCTYPE LCType, LPCSTR lpLCData);
__attribute__((dllimport)) WINBOOL SetLocaleInfoW(LCID Locale, LCTYPE LCType, LPCWSTR lpLCData);
__attribute__((dllimport)) int GetCalendarInfoA(LCID Locale, CALID Calendar, CALTYPE CalType, LPSTR lpCalData, int cchData, LPDWORD lpValue);
__attribute__((dllimport)) int GetCalendarInfoW(LCID Locale, CALID Calendar, CALTYPE CalType, LPWSTR lpCalData, int cchData, LPDWORD lpValue);
__attribute__((dllimport)) WINBOOL SetCalendarInfoA(LCID Locale, CALID Calendar, CALTYPE CalType, LPCSTR lpCalData);
__attribute__((dllimport)) WINBOOL SetCalendarInfoW(LCID Locale, CALID Calendar, CALTYPE CalType, LPCWSTR lpCalData);
__attribute__((dllimport)) int GetDurationFormat(LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpDuration, ULONGLONG ullDuration, LPCWSTR lpFormat, LPWSTR lpDurationStr, int cchDuration);
__attribute__((dllimport)) int FindNLSString(LCID Locale, DWORD dwFindNLSStringFlags, LPCWSTR lpStringSource, int cchSource, LPCWSTR lpStringValue, int cchValue, LPINT pcchFound);
__attribute__((dllimport)) WINBOOL LoadStringByReference(DWORD Flags, PCWSTR Language, PCWSTR SourceString, PWSTR Buffer, ULONG cchBuffer, PCWSTR Directory, PULONG pcchBufferOut);
__attribute__((dllimport)) int GetGeoInfoA(GEOID Location, GEOTYPE GeoType, LPSTR lpGeoData, int cchData, LANGID LangId);
__attribute__((dllimport)) int GetGeoInfoW(GEOID Location, GEOTYPE GeoType, LPWSTR lpGeoData, int cchData, LANGID LangId);
__attribute__((dllimport)) WINBOOL EnumSystemGeoID(GEOCLASS GeoClass, GEOID ParentGeoId, GEO_ENUMPROC lpGeoEnumProc);
__attribute__((dllimport)) GEOID GetUserGeoID(GEOCLASS GeoClass);
__attribute__((dllimport)) WINBOOL GetCPInfo(UINT CodePage, LPCPINFO lpCPInfo);
__attribute__((dllimport)) WINBOOL GetCPInfoExA(UINT CodePage, DWORD dwFlags, LPCPINFOEXA lpCPInfoEx);
__attribute__((dllimport)) WINBOOL GetCPInfoExW(UINT CodePage, DWORD dwFlags, LPCPINFOEXW lpCPInfoEx);
__attribute__((dllimport)) int LCIDToLocaleName(LCID Locale, LPWSTR lpName, int cchName, DWORD dwFlags);
__attribute__((dllimport)) LCID LocaleNameToLCID(LPCWSTR lpName, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL SetUserGeoID(GEOID GeoId);
__attribute__((dllimport)) LCID ConvertDefaultLocale(LCID Locale);
__attribute__((dllimport)) LCID GetThreadLocale(void);
__attribute__((dllimport)) WINBOOL SetThreadLocale(LCID Locale);
__attribute__((dllimport)) LANGID GetSystemDefaultUILanguage(void);
__attribute__((dllimport)) LANGID GetUserDefaultUILanguage(void);
__attribute__((dllimport)) LANGID GetSystemDefaultLangID(void);
__attribute__((dllimport)) LANGID GetUserDefaultLangID(void);
__attribute__((dllimport)) LCID GetSystemDefaultLCID(void);
__attribute__((dllimport)) LCID GetUserDefaultLCID(void);
__attribute__((dllimport)) LANGID SetThreadUILanguage(LANGID LangId);
__attribute__((dllimport)) WINBOOL GetStringTypeExA(LCID Locale, DWORD dwInfoType, LPCSTR lpSrcStr, int cchSrc, LPWORD lpCharType);
__attribute__((dllimport)) WINBOOL GetStringTypeA(LCID Locale, DWORD dwInfoType, LPCSTR lpSrcStr, int cchSrc, LPWORD lpCharType);
__attribute__((dllimport)) int FoldStringA(DWORD dwMapFlags, LPCSTR lpSrcStr, int cchSrc, LPSTR lpDestStr, int cchDest);
__attribute__((dllimport)) WINBOOL EnumSystemLocalesA(LOCALE_ENUMPROCA lpLocaleEnumProc, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL EnumSystemLocalesW(LOCALE_ENUMPROCW lpLocaleEnumProc, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL EnumSystemLanguageGroupsA(LANGUAGEGROUP_ENUMPROCA lpLanguageGroupEnumProc, DWORD dwFlags, LONG_PTR lParam);
__attribute__((dllimport)) WINBOOL EnumSystemLanguageGroupsW(LANGUAGEGROUP_ENUMPROCW lpLanguageGroupEnumProc, DWORD dwFlags, LONG_PTR lParam);
__attribute__((dllimport)) WINBOOL EnumLanguageGroupLocalesA(LANGGROUPLOCALE_ENUMPROCA lpLangGroupLocaleEnumProc, LGRPID LanguageGroup, DWORD dwFlags, LONG_PTR lParam);
__attribute__((dllimport)) WINBOOL EnumLanguageGroupLocalesW(LANGGROUPLOCALE_ENUMPROCW lpLangGroupLocaleEnumProc, LGRPID LanguageGroup, DWORD dwFlags, LONG_PTR lParam);
__attribute__((dllimport)) WINBOOL EnumUILanguagesA(UILANGUAGE_ENUMPROCA lpUILanguageEnumProc, DWORD dwFlags, LONG_PTR lParam);
__attribute__((dllimport)) WINBOOL EnumUILanguagesW(UILANGUAGE_ENUMPROCW lpUILanguageEnumProc, DWORD dwFlags, LONG_PTR lParam);
__attribute__((dllimport)) LANGID GetThreadUILanguage(void);
__attribute__((dllimport)) WINBOOL GetProcessPreferredUILanguages(DWORD dwFlags, PULONG pulNumLanguages, PZZWSTR pwszLanguagesBuffer, PULONG pcchLanguagesBuffer);
__attribute__((dllimport)) WINBOOL SetProcessPreferredUILanguages(DWORD dwFlags, PCZZWSTR pwszLanguagesBuffer, PULONG pulNumLanguages);
__attribute__((dllimport)) WINBOOL GetUserPreferredUILanguages(DWORD dwFlags, PULONG pulNumLanguages, PZZWSTR pwszLanguagesBuffer, PULONG pcchLanguagesBuffer);
__attribute__((dllimport)) WINBOOL GetSystemPreferredUILanguages(DWORD dwFlags, PULONG pulNumLanguages, PZZWSTR pwszLanguagesBuffer, PULONG pcchLanguagesBuffer);
__attribute__((dllimport)) WINBOOL GetThreadPreferredUILanguages(DWORD dwFlags, PULONG pulNumLanguages, PZZWSTR pwszLanguagesBuffer, PULONG pcchLanguagesBuffer);
__attribute__((dllimport)) WINBOOL SetThreadPreferredUILanguages(DWORD dwFlags, PCZZWSTR pwszLanguagesBuffer, PULONG pulNumLanguages);
__attribute__((dllimport)) WINBOOL GetFileMUIInfo(DWORD dwFlags, PCWSTR pcwszFilePath, PFILEMUIINFO pFileMUIInfo, DWORD *pcbFileMUIInfo);
__attribute__((dllimport)) WINBOOL GetFileMUIPath(DWORD dwFlags, PCWSTR pcwszFilePath, PWSTR pwszLanguage, PULONG pcchLanguage, PWSTR pwszFileMUIPath, PULONG pcchFileMUIPath, PULONGLONG pululEnumerator);
__attribute__((dllimport)) WINBOOL GetUILanguageInfo(DWORD dwFlags, PCZZWSTR pwmszLanguage, PZZWSTR pwszFallbackLanguages, PDWORD pcchFallbackLanguages, PDWORD pAttributes);
__attribute__((dllimport)) WINBOOL NotifyUILanguageChange(DWORD dwFlags, PCWSTR pcwstrNewLanguage, PCWSTR pcwstrPreviousLanguage, DWORD dwReserved, PDWORD pdwStatusRtrn);
__attribute__((dllimport)) WINBOOL EnumSystemCodePagesA(CODEPAGE_ENUMPROCA lpCodePageEnumProc, DWORD dwFlags);
__attribute__((dllimport)) WINBOOL EnumSystemCodePagesW(CODEPAGE_ENUMPROCW lpCodePageEnumProc, DWORD dwFlags);
typedef WINBOOL (*CALINFO_ENUMPROCEXEX)(LPWSTR, CALID, LPWSTR, LPARAM);
typedef WINBOOL (*DATEFMT_ENUMPROCEXEX)(LPWSTR, CALID, LPARAM);
typedef WINBOOL (*TIMEFMT_ENUMPROCEX)(LPWSTR, LPARAM);
typedef WINBOOL (*LOCALE_ENUMPROCEX)(LPWSTR, DWORD, LPARAM);
__attribute__((dllimport)) int NormalizeString(NORM_FORM NormForm, LPCWSTR lpSrcString, int cwSrcLength, LPWSTR lpDstString, int cwDstLength);
__attribute__((dllimport)) WINBOOL IsNormalizedString(NORM_FORM NormForm, LPCWSTR lpString, int cwLength);
__attribute__((dllimport)) int IdnToAscii(DWORD dwFlags, LPCWSTR lpUnicodeCharStr, int cchUnicodeChar, LPWSTR lpASCIICharStr, int cchASCIIChar);
__attribute__((dllimport)) int IdnToNameprepUnicode(DWORD dwFlags, LPCWSTR lpUnicodeCharStr, int cchUnicodeChar, LPWSTR lpNameprepCharStr, int cchNameprepChar);
__attribute__((dllimport)) int IdnToUnicode(DWORD dwFlags, LPCWSTR lpASCIICharStr, int cchASCIIChar, LPWSTR lpUnicodeCharStr, int cchUnicodeChar);
__attribute__((dllimport)) WINBOOL VerifyScripts(DWORD dwFlags, LPCWSTR lpLocaleScripts, int cchLocaleScripts, LPCWSTR lpTestScripts, int cchTestScripts);
__attribute__((dllimport)) int GetStringScripts(DWORD dwFlags, LPCWSTR lpString, int cchString, LPWSTR lpScripts, int cchScripts);
__attribute__((dllimport)) int GetLocaleInfoEx(LPCWSTR lpLocaleName, LCTYPE LCType, LPWSTR lpLCData, int cchData);
__attribute__((dllimport)) int GetCalendarInfoEx(LPCWSTR lpLocaleName, CALID Calendar, LPCWSTR lpReserved, CALTYPE CalType, LPWSTR lpCalData, int cchData, LPDWORD lpValue);
__attribute__((dllimport)) int GetDurationFormatEx(LPCWSTR lpLocaleName, DWORD dwFlags, const SYSTEMTIME *lpDuration, ULONGLONG ullDuration, LPCWSTR lpFormat, LPWSTR lpDurationStr, int cchDuration);
__attribute__((dllimport)) int GetNumberFormatEx(LPCWSTR lpLocaleName, DWORD dwFlags, LPCWSTR lpValue, const NUMBERFMTW *lpFormat, LPWSTR lpNumberStr, int cchNumber);
__attribute__((dllimport)) int GetCurrencyFormatEx(LPCWSTR lpLocaleName, DWORD dwFlags, LPCWSTR lpValue, const CURRENCYFMTW *lpFormat, LPWSTR lpCurrencyStr, int cchCurrency);
__attribute__((dllimport)) int GetUserDefaultLocaleName(LPWSTR lpLocaleName, int cchLocaleName);
__attribute__((dllimport)) int GetSystemDefaultLocaleName(LPWSTR lpLocaleName, int cchLocaleName);
__attribute__((dllimport)) WINBOOL GetNLSVersionEx(NLS_FUNCTION function, LPCWSTR lpLocaleName, LPNLSVERSIONINFOEX lpVersionInformation);
__attribute__((dllimport)) int FindNLSStringEx(LPCWSTR lpLocaleName, DWORD dwFindNLSStringFlags, LPCWSTR lpStringSource, int cchSource, LPCWSTR lpStringValue, int cchValue, LPINT pcchFound, LPNLSVERSIONINFO lpVersionInformation, LPVOID lpReserved, LPARAM sortHandle);
__attribute__((dllimport)) int LCMapStringEx(LPCWSTR lpLocaleName, DWORD dwMapFlags, LPCWSTR lpSrcStr, int cchSrc, LPWSTR lpDestStr, int cchDest, LPNLSVERSIONINFO lpVersionInformation, LPVOID lpReserved, LPARAM sortHandle);
__attribute__((dllimport)) WINBOOL IsValidLocaleName(LPCWSTR lpLocaleName);
__attribute__((dllimport)) WINBOOL EnumCalendarInfoExEx(CALINFO_ENUMPROCEXEX pCalInfoEnumProcExEx, LPCWSTR lpLocaleName, CALID Calendar, LPCWSTR lpReserved, CALTYPE CalType, LPARAM lParam);
__attribute__((dllimport)) WINBOOL EnumDateFormatsExEx(DATEFMT_ENUMPROCEXEX lpDateFmtEnumProcExEx, LPCWSTR lpLocaleName, DWORD dwFlags, LPARAM lParam);
__attribute__((dllimport)) WINBOOL EnumTimeFormatsEx(TIMEFMT_ENUMPROCEX lpTimeFmtEnumProcEx, LPCWSTR lpLocaleName, DWORD dwFlags, LPARAM lParam);
__attribute__((dllimport)) WINBOOL EnumSystemLocalesEx(LOCALE_ENUMPROCEX lpLocaleEnumProcEx, DWORD dwFlags, LPARAM lParam, LPVOID lpReserved);
__attribute__((dllimport)) int ResolveLocaleName(LPCWSTR lpNameToResolve, LPWSTR lpLocaleName, int cchLocaleName);
typedef struct _COORD
{
SHORT X;
SHORT Y;
} COORD, *PCOORD;
typedef struct _SMALL_RECT
{
SHORT Left;
SHORT Top;
SHORT Right;
SHORT Bottom;
} SMALL_RECT, *PSMALL_RECT;
typedef struct _KEY_EVENT_RECORD
{
WINBOOL bKeyDown;
WORD wRepeatCount;
WORD wVirtualKeyCode;
WORD wVirtualScanCode;
union {
WCHAR UnicodeChar;
CHAR AsciiChar;
} uChar;
DWORD dwControlKeyState;
} KEY_EVENT_RECORD, *PKEY_EVENT_RECORD;
typedef struct _MOUSE_EVENT_RECORD
{
COORD dwMousePosition;
DWORD dwButtonState;
DWORD dwControlKeyState;
DWORD dwEventFlags;
} MOUSE_EVENT_RECORD, *PMOUSE_EVENT_RECORD;
typedef struct _WINDOW_BUFFER_SIZE_RECORD
{
COORD dwSize;
} WINDOW_BUFFER_SIZE_RECORD, *PWINDOW_BUFFER_SIZE_RECORD;
typedef struct _MENU_EVENT_RECORD
{
UINT dwCommandId;
} MENU_EVENT_RECORD, *PMENU_EVENT_RECORD;
typedef struct _FOCUS_EVENT_RECORD
{
WINBOOL bSetFocus;
} FOCUS_EVENT_RECORD, *PFOCUS_EVENT_RECORD;
typedef struct _INPUT_RECORD
{
WORD EventType;
union {
KEY_EVENT_RECORD KeyEvent;
MOUSE_EVENT_RECORD MouseEvent;
WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
MENU_EVENT_RECORD MenuEvent;
FOCUS_EVENT_RECORD FocusEvent;
} Event;
} INPUT_RECORD, *PINPUT_RECORD;
typedef struct _CHAR_INFO
{
union {
WCHAR UnicodeChar;
CHAR AsciiChar;
} Char;
WORD Attributes;
} CHAR_INFO, *PCHAR_INFO;
typedef struct _CONSOLE_SCREEN_BUFFER_INFO
{
COORD dwSize;
COORD dwCursorPosition;
WORD wAttributes;
SMALL_RECT srWindow;
COORD dwMaximumWindowSize;
} CONSOLE_SCREEN_BUFFER_INFO, *PCONSOLE_SCREEN_BUFFER_INFO;
typedef struct _CONSOLE_CURSOR_INFO
{
DWORD dwSize;
WINBOOL bVisible;
} CONSOLE_CURSOR_INFO, *PCONSOLE_CURSOR_INFO;
typedef struct _CONSOLE_FONT_INFO
{
DWORD nFont;
COORD dwFontSize;
} CONSOLE_FONT_INFO, *PCONSOLE_FONT_INFO;
typedef struct _CONSOLE_SELECTION_INFO
{
DWORD dwFlags;
COORD dwSelectionAnchor;
SMALL_RECT srSelection;
} CONSOLE_SELECTION_INFO, *PCONSOLE_SELECTION_INFO;
typedef WINBOOL (*PHANDLER_ROUTINE)(DWORD CtrlType);
__attribute__((dllimport)) WINBOOL PeekConsoleInputA(HANDLE hConsoleInput, PINPUT_RECORD lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsRead);
__attribute__((dllimport)) WINBOOL PeekConsoleInputW(HANDLE hConsoleInput, PINPUT_RECORD lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsRead);
__attribute__((dllimport)) WINBOOL ReadConsoleInputA(HANDLE hConsoleInput, PINPUT_RECORD lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsRead);
__attribute__((dllimport)) WINBOOL ReadConsoleInputW(HANDLE hConsoleInput, PINPUT_RECORD lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsRead);
__attribute__((dllimport)) WINBOOL WriteConsoleInputA(HANDLE hConsoleInput, const INPUT_RECORD *lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsWritten);
__attribute__((dllimport)) WINBOOL WriteConsoleInputW(HANDLE hConsoleInput, const INPUT_RECORD *lpBuffer, DWORD nLength, LPDWORD lpNumberOfEventsWritten);
__attribute__((dllimport)) WINBOOL ReadConsoleOutputA(HANDLE hConsoleOutput, PCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, PSMALL_RECT lpReadRegion);
__attribute__((dllimport)) WINBOOL ReadConsoleOutputW(HANDLE hConsoleOutput, PCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, PSMALL_RECT lpReadRegion);
__attribute__((dllimport)) WINBOOL WriteConsoleOutputA(HANDLE hConsoleOutput, const CHAR_INFO *lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, PSMALL_RECT lpWriteRegion);
__attribute__((dllimport)) WINBOOL WriteConsoleOutputW(HANDLE hConsoleOutput, const CHAR_INFO *lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, PSMALL_RECT lpWriteRegion);
__attribute__((dllimport)) WINBOOL ReadConsoleOutputCharacterA(HANDLE hConsoleOutput, LPSTR lpCharacter, DWORD nLength, COORD dwReadCoord, LPDWORD lpNumberOfCharsRead);
__attribute__((dllimport)) WINBOOL ReadConsoleOutputCharacterW(HANDLE hConsoleOutput, LPWSTR lpCharacter, DWORD nLength, COORD dwReadCoord, LPDWORD lpNumberOfCharsRead);
__attribute__((dllimport)) WINBOOL ReadConsoleOutputAttribute(HANDLE hConsoleOutput, LPWORD lpAttribute, DWORD nLength, COORD dwReadCoord, LPDWORD lpNumberOfAttrsRead);
__attribute__((dllimport)) WINBOOL WriteConsoleOutputCharacterA(HANDLE hConsoleOutput, LPCSTR lpCharacter, DWORD nLength, COORD dwWriteCoord, LPDWORD lpNumberOfCharsWritten);
__attribute__((dllimport)) WINBOOL WriteConsoleOutputCharacterW(HANDLE hConsoleOutput, LPCWSTR lpCharacter, DWORD nLength, COORD dwWriteCoord, LPDWORD lpNumberOfCharsWritten);
__attribute__((dllimport)) WINBOOL WriteConsoleOutputAttribute(HANDLE hConsoleOutput, const WORD *lpAttribute, DWORD nLength, COORD dwWriteCoord, LPDWORD lpNumberOfAttrsWritten);
__attribute__((dllimport)) WINBOOL FillConsoleOutputCharacterA(HANDLE hConsoleOutput, CHAR cCharacter, DWORD nLength, COORD dwWriteCoord, LPDWORD lpNumberOfCharsWritten);
__attribute__((dllimport)) WINBOOL FillConsoleOutputCharacterW(HANDLE hConsoleOutput, WCHAR cCharacter, DWORD nLength, COORD dwWriteCoord, LPDWORD lpNumberOfCharsWritten);
__attribute__((dllimport)) WINBOOL FillConsoleOutputAttribute(HANDLE hConsoleOutput, WORD wAttribute, DWORD nLength, COORD dwWriteCoord, LPDWORD lpNumberOfAttrsWritten);
__attribute__((dllimport)) WINBOOL GetConsoleMode(HANDLE hConsoleHandle, LPDWORD lpMode);
__attribute__((dllimport)) WINBOOL GetNumberOfConsoleInputEvents(HANDLE hConsoleInput, LPDWORD lpNumberOfEvents);
__attribute__((dllimport)) WINBOOL GetConsoleScreenBufferInfo(HANDLE hConsoleOutput, PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo);
__attribute__((dllimport)) COORD GetLargestConsoleWindowSize(HANDLE hConsoleOutput);
__attribute__((dllimport)) WINBOOL GetConsoleCursorInfo(HANDLE hConsoleOutput, PCONSOLE_CURSOR_INFO lpConsoleCursorInfo);
__attribute__((dllimport)) WINBOOL GetCurrentConsoleFont(HANDLE hConsoleOutput, WINBOOL bMaximumWindow, PCONSOLE_FONT_INFO lpConsoleCurrentFont);
__attribute__((dllimport)) COORD GetConsoleFontSize(HANDLE hConsoleOutput, DWORD nFont);
__attribute__((dllimport)) WINBOOL GetConsoleSelectionInfo(PCONSOLE_SELECTION_INFO lpConsoleSelectionInfo);
__attribute__((dllimport)) WINBOOL GetNumberOfConsoleMouseButtons(LPDWORD lpNumberOfMouseButtons);
__attribute__((dllimport)) WINBOOL SetConsoleMode(HANDLE hConsoleHandle, DWORD dwMode);
__attribute__((dllimport)) WINBOOL SetConsoleActiveScreenBuffer(HANDLE hConsoleOutput);
__attribute__((dllimport)) WINBOOL FlushConsoleInputBuffer(HANDLE hConsoleInput);
__attribute__((dllimport)) WINBOOL SetConsoleScreenBufferSize(HANDLE hConsoleOutput, COORD dwSize);
__attribute__((dllimport)) WINBOOL SetConsoleCursorPosition(HANDLE hConsoleOutput, COORD dwCursorPosition);
__attribute__((dllimport)) WINBOOL SetConsoleCursorInfo(HANDLE hConsoleOutput, const CONSOLE_CURSOR_INFO *lpConsoleCursorInfo);
__attribute__((dllimport)) WINBOOL ScrollConsoleScreenBufferA(HANDLE hConsoleOutput, const SMALL_RECT *lpScrollRectangle, const SMALL_RECT *lpClipRectangle, COORD dwDestinationOrigin, const CHAR_INFO *lpFill);
__attribute__((dllimport)) WINBOOL ScrollConsoleScreenBufferW(HANDLE hConsoleOutput, const SMALL_RECT *lpScrollRectangle, const SMALL_RECT *lpClipRectangle, COORD dwDestinationOrigin, const CHAR_INFO *lpFill);
__attribute__((dllimport)) WINBOOL SetConsoleWindowInfo(HANDLE hConsoleOutput, WINBOOL bAbsolute, const SMALL_RECT *lpConsoleWindow);
__attribute__((dllimport)) WINBOOL SetConsoleTextAttribute(HANDLE hConsoleOutput, WORD wAttributes);
__attribute__((dllimport)) WINBOOL SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine, WINBOOL Add);
__attribute__((dllimport)) WINBOOL GenerateConsoleCtrlEvent(DWORD dwCtrlEvent, DWORD dwProcessGroupId);
__attribute__((dllimport)) WINBOOL AllocConsole(void);
__attribute__((dllimport)) WINBOOL FreeConsole(void);
__attribute__((dllimport)) WINBOOL AttachConsole(DWORD dwProcessId);
__attribute__((dllimport)) DWORD GetConsoleTitleA(LPSTR lpConsoleTitle, DWORD nSize);
__attribute__((dllimport)) DWORD GetConsoleTitleW(LPWSTR lpConsoleTitle, DWORD nSize);
__attribute__((dllimport)) WINBOOL SetConsoleTitleA(LPCSTR lpConsoleTitle);
__attribute__((dllimport)) WINBOOL SetConsoleTitleW(LPCWSTR lpConsoleTitle);
__attribute__((dllimport)) WINBOOL ReadConsoleA(HANDLE hConsoleInput, LPVOID lpBuffer, DWORD nNumberOfCharsToRead, LPDWORD lpNumberOfCharsRead, LPVOID lpReserved);
__attribute__((dllimport)) WINBOOL ReadConsoleW(HANDLE hConsoleInput, LPVOID lpBuffer, DWORD nNumberOfCharsToRead, LPDWORD lpNumberOfCharsRead, LPVOID lpReserved);
__attribute__((dllimport)) WINBOOL WriteConsoleA(HANDLE hConsoleOutput, const void *lpBuffer, DWORD nNumberOfCharsToWrite, LPDWORD lpNumberOfCharsWritten, LPVOID lpReserved);
__attribute__((dllimport)) WINBOOL WriteConsoleW(HANDLE hConsoleOutput, const void *lpBuffer, DWORD nNumberOfCharsToWrite, LPDWORD lpNumberOfCharsWritten, LPVOID lpReserved);
__attribute__((dllimport)) HANDLE CreateConsoleScreenBuffer(DWORD dwDesiredAccess, DWORD dwShareMode, const SECURITY_ATTRIBUTES *lpSecurityAttributes, DWORD dwFlags, LPVOID lpScreenBufferData);
__attribute__((dllimport)) UINT GetConsoleCP(void);
__attribute__((dllimport)) WINBOOL SetConsoleCP(UINT wCodePageID);
__attribute__((dllimport)) UINT GetConsoleOutputCP(void);
__attribute__((dllimport)) WINBOOL SetConsoleOutputCP(UINT wCodePageID);
__attribute__((dllimport)) WINBOOL GetConsoleDisplayMode(LPDWORD lpModeFlags);
__attribute__((dllimport)) WINBOOL SetConsoleDisplayMode(HANDLE hConsoleOutput, DWORD dwFlags, PCOORD lpNewScreenBufferDimensions);
__attribute__((dllimport)) HWND GetConsoleWindow(void);
__attribute__((dllimport)) DWORD GetConsoleProcessList(LPDWORD lpdwProcessList, DWORD dwProcessCount);
__attribute__((dllimport)) WINBOOL AddConsoleAliasA(LPSTR Source, LPSTR Target, LPSTR ExeName);
__attribute__((dllimport)) WINBOOL AddConsoleAliasW(LPWSTR Source, LPWSTR Target, LPWSTR ExeName);
__attribute__((dllimport)) DWORD GetConsoleAliasA(LPSTR Source, LPSTR TargetBuffer, DWORD TargetBufferLength, LPSTR ExeName);
__attribute__((dllimport)) DWORD GetConsoleAliasW(LPWSTR Source, LPWSTR TargetBuffer, DWORD TargetBufferLength, LPWSTR ExeName);
__attribute__((dllimport)) DWORD GetConsoleAliasesLengthA(LPSTR ExeName);
__attribute__((dllimport)) DWORD GetConsoleAliasesLengthW(LPWSTR ExeName);
__attribute__((dllimport)) DWORD GetConsoleAliasExesLengthA(void);
__attribute__((dllimport)) DWORD GetConsoleAliasExesLengthW(void);
__attribute__((dllimport)) DWORD GetConsoleAliasesA(LPSTR AliasBuffer, DWORD AliasBufferLength, LPSTR ExeName);
__attribute__((dllimport)) DWORD GetConsoleAliasesW(LPWSTR AliasBuffer, DWORD AliasBufferLength, LPWSTR ExeName);
__attribute__((dllimport)) DWORD GetConsoleAliasExesA(LPSTR ExeNameBuffer, DWORD ExeNameBufferLength);
__attribute__((dllimport)) DWORD GetConsoleAliasExesW(LPWSTR ExeNameBuffer, DWORD ExeNameBufferLength);
typedef struct _CONSOLE_FONT_INFOEX
{
ULONG cbSize;
DWORD nFont;
COORD dwFontSize;
UINT FontFamily;
UINT FontWeight;
WCHAR FaceName[32];
} CONSOLE_FONT_INFOEX, *PCONSOLE_FONT_INFOEX;
typedef struct _CONSOLE_HISTORY_INFO
{
UINT cbSize;
UINT HistoryBufferSize;
UINT NumberOfHistoryBuffers;
DWORD dwFlags;
} CONSOLE_HISTORY_INFO, *PCONSOLE_HISTORY_INFO;
typedef struct _CONSOLE_READCONSOLE_CONTROL
{
ULONG nLength;
ULONG nInitialChars;
ULONG dwCtrlWakeupMask;
ULONG dwControlKeyState;
} CONSOLE_READCONSOLE_CONTROL, *PCONSOLE_READCONSOLE_CONTROL;
typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX
{
ULONG cbSize;
COORD dwSize;
COORD dwCursorPosition;
WORD wAttributes;
SMALL_RECT srWindow;
COORD dwMaximumWindowSize;
WORD wPopupAttributes;
WINBOOL bFullscreenSupported;
COLORREF ColorTable[16];
} CONSOLE_SCREEN_BUFFER_INFOEX, *PCONSOLE_SCREEN_BUFFER_INFOEX;
WINBOOL GetConsoleHistoryInfo(
PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo);
__attribute__((dllimport)) DWORD GetConsoleOriginalTitleA(
LPSTR lpConsoleTitle,
DWORD nSize);
__attribute__((dllimport)) DWORD GetConsoleOriginalTitleW(
LPWSTR lpConsoleTitle,
DWORD nSize);
__attribute__((dllimport)) WINBOOL GetConsoleScreenBufferInfoEx(
HANDLE hConsoleOutput,
PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx);
__attribute__((dllimport)) WINBOOL GetCurrentConsoleFontEx(
HANDLE hConsoleOutput,
WINBOOL bMaximumWindow,
PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx);
__attribute__((dllimport)) WINBOOL SetConsoleHistoryInfo(
PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo);
__attribute__((dllimport)) WINBOOL SetConsoleScreenBufferInfoEx(
HANDLE hConsoleOutput,
PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx);
__attribute__((dllimport)) WINBOOL SetCurrentConsoleFontEx(
HANDLE hConsoleOutput,
WINBOOL bMaximumWindow,
PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx);
typedef struct tagVS_FIXEDFILEINFO
{
DWORD 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;
} VS_FIXEDFILEINFO;
DWORD VerFindFileA(DWORD uFlags, LPSTR szFileName, LPSTR szWinDir, LPSTR szAppDir, LPSTR szCurDir, PUINT lpuCurDirLen, LPSTR szDestDir, PUINT lpuDestDirLen);
DWORD VerFindFileW(DWORD uFlags, LPWSTR szFileName, LPWSTR szWinDir, LPWSTR szAppDir, LPWSTR szCurDir, PUINT lpuCurDirLen, LPWSTR szDestDir, PUINT lpuDestDirLen);
DWORD VerInstallFileA(DWORD uFlags, LPSTR szSrcFileName, LPSTR szDestFileName, LPSTR szSrcDir, LPSTR szDestDir, LPSTR szCurDir, LPSTR szTmpFile, PUINT lpuTmpFileLen);
DWORD VerInstallFileW(DWORD uFlags, LPWSTR szSrcFileName, LPWSTR szDestFileName, LPWSTR szSrcDir, LPWSTR szDestDir, LPWSTR szCurDir, LPWSTR szTmpFile, PUINT lpuTmpFileLen);
DWORD GetFileVersionInfoSizeA(LPCSTR lptstrFilename, LPDWORD lpdwHandle);
DWORD GetFileVersionInfoSizeW(LPCWSTR lptstrFilename, LPDWORD lpdwHandle);
WINBOOL GetFileVersionInfoA(LPCSTR lptstrFilename, DWORD dwHandle, DWORD dwLen, LPVOID lpData);
WINBOOL GetFileVersionInfoW(LPCWSTR lptstrFilename, DWORD dwHandle, DWORD dwLen, LPVOID lpData);
DWORD VerLanguageNameA(DWORD wLang, LPSTR szLang, DWORD nSize);
DWORD VerLanguageNameW(DWORD wLang, LPWSTR szLang, DWORD nSize);
WINBOOL VerQueryValueA(LPCVOID pBlock, LPCSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen);
WINBOOL VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen);
typedef ACCESS_MASK REGSAM;
typedef LONG LSTATUS;
struct val_context
{
int valuelen;
LPVOID value_context;
LPVOID val_buff_ptr;
};
typedef struct val_context *PVALCONTEXT;
typedef struct pvalueA
{
LPSTR pv_valuename;
int pv_valuelen;
LPVOID pv_value_context;
DWORD pv_type;
} PVALUEA, *PPVALUEA;
typedef struct pvalueW
{
LPWSTR pv_valuename;
int pv_valuelen;
LPVOID pv_value_context;
DWORD pv_type;
} PVALUEW, *PPVALUEW;
typedef PVALUEW PVALUE;
typedef PPVALUEW PPVALUE;
typedef DWORD __attribute__((__cdecl__)) QUERYHANDLER(LPVOID keycontext, PVALCONTEXT val_list, DWORD num_vals, LPVOID outputbuffer, DWORD *total_outlen, DWORD input_blen);
typedef QUERYHANDLER *PQUERYHANDLER;
typedef struct provider_info
{
PQUERYHANDLER pi_R0_1val;
PQUERYHANDLER pi_R0_allvals;
PQUERYHANDLER pi_R3_1val;
PQUERYHANDLER pi_R3_allvals;
DWORD pi_flags;
LPVOID pi_key_context;
} REG_PROVIDER;
typedef struct provider_info *PPROVIDER;
typedef struct value_entA
{
LPSTR ve_valuename;
DWORD ve_valuelen;
DWORD_PTR ve_valueptr;
DWORD ve_type;
} VALENTA, *PVALENTA;
typedef struct value_entW
{
LPWSTR ve_valuename;
DWORD ve_valuelen;
DWORD_PTR ve_valueptr;
DWORD ve_type;
} VALENTW, *PVALENTW;
typedef VALENTW VALENT;
typedef PVALENTW PVALENT;
__attribute__((dllimport)) LONG RegCloseKey(HKEY hKey);
__attribute__((dllimport)) LONG RegOverridePredefKey(HKEY hKey, HKEY hNewHKey);
__attribute__((dllimport)) LONG RegOpenUserClassesRoot(HANDLE hToken, DWORD dwOptions, REGSAM samDesired, PHKEY phkResult);
__attribute__((dllimport)) LONG RegOpenCurrentUser(REGSAM samDesired, PHKEY phkResult);
__attribute__((dllimport)) LONG RegDisablePredefinedCache(void);
__attribute__((dllimport)) LONG RegDisablePredefinedCacheEx(void);
__attribute__((dllimport)) LONG RegConnectRegistryA(LPCSTR lpMachineName, HKEY hKey, PHKEY phkResult);
__attribute__((dllimport)) LONG RegConnectRegistryW(LPCWSTR lpMachineName, HKEY hKey, PHKEY phkResult);
__attribute__((dllimport)) LONG RegConnectRegistryExA(LPCSTR lpMachineName, HKEY hKey, ULONG Flags, PHKEY phkResult);
__attribute__((dllimport)) LONG RegConnectRegistryExW(LPCWSTR lpMachineName, HKEY hKey, ULONG Flags, PHKEY phkResult);
__attribute__((dllimport)) LONG RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult);
__attribute__((dllimport)) LONG RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult);
__attribute__((dllimport)) LONG RegCreateKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD Reserved, LPSTR lpClass, DWORD dwOptions, REGSAM samDesired, LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, LPDWORD lpdwDisposition);
__attribute__((dllimport)) LONG RegCreateKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD Reserved, LPWSTR lpClass, DWORD dwOptions, REGSAM samDesired, LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, LPDWORD lpdwDisposition);
__attribute__((dllimport)) LONG RegDeleteKeyA(HKEY hKey, LPCSTR lpSubKey);
__attribute__((dllimport)) LONG RegDeleteKeyW(HKEY hKey, LPCWSTR lpSubKey);
__attribute__((dllimport)) LONG RegDeleteKeyExA(HKEY hKey, LPCSTR lpSubKey, REGSAM samDesired, DWORD Reserved);
__attribute__((dllimport)) LONG RegDeleteKeyExW(HKEY hKey, LPCWSTR lpSubKey, REGSAM samDesired, DWORD Reserved);
__attribute__((dllimport)) LONG RegDisableReflectionKey(HKEY hBase);
__attribute__((dllimport)) LONG RegEnableReflectionKey(HKEY hBase);
__attribute__((dllimport)) LONG RegQueryReflectionKey(HKEY hBase, WINBOOL *bIsReflectionDisabled);
__attribute__((dllimport)) LONG RegDeleteValueA(HKEY hKey, LPCSTR lpValueName);
__attribute__((dllimport)) LONG RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName);
__attribute__((dllimport)) LONG RegEnumKeyA(HKEY hKey, DWORD dwIndex, LPSTR lpName, DWORD cchName);
__attribute__((dllimport)) LONG RegEnumKeyW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, DWORD cchName);
__attribute__((dllimport)) LONG RegEnumKeyExA(HKEY hKey, DWORD dwIndex, LPSTR lpName, LPDWORD lpcchName, LPDWORD lpReserved, LPSTR lpClass, LPDWORD lpcchClass, PFILETIME lpftLastWriteTime);
__attribute__((dllimport)) LONG RegEnumKeyExW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, LPDWORD lpcchName, LPDWORD lpReserved, LPWSTR lpClass, LPDWORD lpcchClass, PFILETIME lpftLastWriteTime);
__attribute__((dllimport)) LONG RegEnumValueA(HKEY hKey, DWORD dwIndex, LPSTR lpValueName, LPDWORD lpcchValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData);
__attribute__((dllimport)) LONG RegEnumValueW(HKEY hKey, DWORD dwIndex, LPWSTR lpValueName, LPDWORD lpcchValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData);
__attribute__((dllimport)) LONG RegFlushKey(HKEY hKey);
__attribute__((dllimport)) LONG RegGetKeySecurity(HKEY hKey, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor, LPDWORD lpcbSecurityDescriptor);
__attribute__((dllimport)) LONG RegLoadKeyA(HKEY hKey, LPCSTR lpSubKey, LPCSTR lpFile);
__attribute__((dllimport)) LONG RegLoadKeyW(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpFile);
__attribute__((dllimport)) LONG RegNotifyChangeKeyValue(HKEY hKey, WINBOOL bWatchSubtree, DWORD dwNotifyFilter, HANDLE hEvent, WINBOOL fAsynchronous);
__attribute__((dllimport)) LONG RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult);
__attribute__((dllimport)) LONG RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult);
__attribute__((dllimport)) LONG RegOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult);
__attribute__((dllimport)) LONG RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult);
__attribute__((dllimport)) LONG RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, LPDWORD lpcchClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcbMaxSubKeyLen, LPDWORD lpcbMaxClassLen, LPDWORD lpcValues, LPDWORD lpcbMaxValueNameLen, LPDWORD lpcbMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime);
__attribute__((dllimport)) LONG RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcchClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcbMaxSubKeyLen, LPDWORD lpcbMaxClassLen, LPDWORD lpcValues, LPDWORD lpcbMaxValueNameLen, LPDWORD lpcbMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime);
__attribute__((dllimport)) LONG RegQueryValueA(HKEY hKey, LPCSTR lpSubKey, LPSTR lpData, PLONG lpcbData);
__attribute__((dllimport)) LONG RegQueryValueW(HKEY hKey, LPCWSTR lpSubKey, LPWSTR lpData, PLONG lpcbData);
__attribute__((dllimport)) LONG RegQueryMultipleValuesA(HKEY hKey, PVALENTA val_list, DWORD num_vals, LPSTR lpValueBuf, LPDWORD ldwTotsize);
__attribute__((dllimport)) LONG RegQueryMultipleValuesW(HKEY hKey, PVALENTW val_list, DWORD num_vals, LPWSTR lpValueBuf, LPDWORD ldwTotsize);
__attribute__((dllimport)) LONG RegQueryValueExA(HKEY hKey, LPCSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData);
__attribute__((dllimport)) LONG RegQueryValueExW(HKEY hKey, LPCWSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData);
__attribute__((dllimport)) LONG RegReplaceKeyA(HKEY hKey, LPCSTR lpSubKey, LPCSTR lpNewFile, LPCSTR lpOldFile);
__attribute__((dllimport)) LONG RegReplaceKeyW(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewFile, LPCWSTR lpOldFile);
__attribute__((dllimport)) LONG RegRestoreKeyA(HKEY hKey, LPCSTR lpFile, DWORD dwFlags);
__attribute__((dllimport)) LONG RegRestoreKeyW(HKEY hKey, LPCWSTR lpFile, DWORD dwFlags);
__attribute__((dllimport)) LONG RegSaveKeyA(HKEY hKey, LPCSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
__attribute__((dllimport)) LONG RegSaveKeyW(HKEY hKey, LPCWSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes);
__attribute__((dllimport)) LONG RegSetKeySecurity(HKEY hKey, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor);
__attribute__((dllimport)) LONG RegSetValueA(HKEY hKey, LPCSTR lpSubKey, DWORD dwType, LPCSTR lpData, DWORD cbData);
__attribute__((dllimport)) LONG RegSetValueW(HKEY hKey, LPCWSTR lpSubKey, DWORD dwType, LPCWSTR lpData, DWORD cbData);
__attribute__((dllimport)) LONG RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, const BYTE *lpData, DWORD cbData);
__attribute__((dllimport)) LONG RegSetValueExW(HKEY hKey, LPCWSTR lpValueName, DWORD Reserved, DWORD dwType, const BYTE *lpData, DWORD cbData);
__attribute__((dllimport)) LONG RegUnLoadKeyA(HKEY hKey, LPCSTR lpSubKey);
__attribute__((dllimport)) LONG RegUnLoadKeyW(HKEY hKey, LPCWSTR lpSubKey);
__attribute__((dllimport)) LONG RegGetValueA(HKEY hkey, LPCSTR lpSubKey, LPCSTR lpValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData);
__attribute__((dllimport)) LONG RegGetValueW(HKEY hkey, LPCWSTR lpSubKey, LPCWSTR lpValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData);
__attribute__((dllimport)) WINBOOL InitiateSystemShutdownA(LPSTR lpMachineName, LPSTR lpMessage, DWORD dwTimeout, WINBOOL bForceAppsClosed, WINBOOL bRebootAfterShutdown);
__attribute__((dllimport)) WINBOOL InitiateSystemShutdownW(LPWSTR lpMachineName, LPWSTR lpMessage, DWORD dwTimeout, WINBOOL bForceAppsClosed, WINBOOL bRebootAfterShutdown);
__attribute__((dllimport)) WINBOOL AbortSystemShutdownA(LPSTR lpMachineName);
__attribute__((dllimport)) WINBOOL AbortSystemShutdownW(LPWSTR lpMachineName);
__attribute__((dllimport)) WINBOOL InitiateSystemShutdownExA(LPSTR lpMachineName, LPSTR lpMessage, DWORD dwTimeout, WINBOOL bForceAppsClosed, WINBOOL bRebootAfterShutdown, DWORD dwReason);
__attribute__((dllimport)) WINBOOL InitiateSystemShutdownExW(LPWSTR lpMachineName, LPWSTR lpMessage, DWORD dwTimeout, WINBOOL bForceAppsClosed, WINBOOL bRebootAfterShutdown, DWORD dwReason);
__attribute__((dllimport)) LONG RegSaveKeyExA(HKEY hKey, LPCSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD Flags);
__attribute__((dllimport)) LONG RegSaveKeyExW(HKEY hKey, LPCWSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD Flags);
__attribute__((dllimport)) LONG Wow64Win32ApiEntry(DWORD dwFuncNumber, DWORD dwFlag, DWORD dwRes);
__attribute__((dllimport)) LONG RegCopyTreeA(
HKEY hKeySrc,
LPCSTR lpSubKey,
HKEY hKeyDest);
__attribute__((dllimport)) LONG RegCopyTreeW(
HKEY hKeySrc,
LPCWSTR lpSubKey,
HKEY hKeyDest);
__attribute__((dllimport)) LONG RegCreateKeyTransactedA(
HKEY hKey,
LPCSTR lpSubKey,
DWORD Reserved,
LPSTR lpClass,
DWORD dwOptions,
REGSAM samDesired,
const LPSECURITY_ATTRIBUTES lpSecurityAttributes,
PHKEY phkResult,
LPDWORD lpdwDisposition,
HANDLE hTransaction,
PVOID pExtendedParemeter);
__attribute__((dllimport)) LONG RegCreateKeyTransactedW(
HKEY hKey,
LPCWSTR lpSubKey,
DWORD Reserved,
LPWSTR lpClass,
DWORD dwOptions,
REGSAM samDesired,
const LPSECURITY_ATTRIBUTES lpSecurityAttributes,
PHKEY phkResult,
LPDWORD lpdwDisposition,
HANDLE hTransaction,
PVOID pExtendedParemeter);
__attribute__((dllimport)) LONG RegDeleteKeyTransactedA(
HKEY hKey,
LPCSTR lpSubKey,
REGSAM samDesired,
DWORD Reserved,
HANDLE hTransaction,
PVOID pExtendedParameter);
__attribute__((dllimport)) LONG RegDeleteKeyTransactedW(
HKEY hKey,
LPCWSTR lpSubKey,
REGSAM samDesired,
DWORD Reserved,
HANDLE hTransaction,
PVOID pExtendedParameter);
__attribute__((dllimport)) LONG RegDeleteKeyValueA(
HKEY hKey,
LPCSTR lpSubKey,
LPCSTR lpValueName);
__attribute__((dllimport)) LONG RegDeleteKeyValueW(
HKEY hKey,
LPCWSTR lpSubKey,
LPCWSTR lpValueName);
__attribute__((dllimport)) LONG RegDeleteTreeA(
HKEY hKey,
LPCSTR lpSubKey);
__attribute__((dllimport)) LONG RegDeleteTreeW(
HKEY hKey,
LPCWSTR lpSubKey);
__attribute__((dllimport)) LONG RegLoadAppKeyA(
LPCSTR lpFile,
PHKEY phkResult,
REGSAM samDesired,
DWORD dwOptions,
DWORD Reserved);
__attribute__((dllimport)) LONG RegLoadAppKeyW(
LPCWSTR lpFile,
PHKEY phkResult,
REGSAM samDesired,
DWORD dwOptions,
DWORD Reserved);
__attribute__((dllimport)) LONG RegLoadMUIStringA(HKEY hKey, LPCSTR pszValue, LPSTR pszOutBuf, DWORD cbOutBuf, LPDWORD pcbData, DWORD Flags, LPCSTR pszDirectory);
__attribute__((dllimport)) LONG RegLoadMUIStringW(HKEY hKey, LPCWSTR pszValue, LPWSTR pszOutBuf, DWORD cbOutBuf, LPDWORD pcbData, DWORD Flags, LPCWSTR pszDirectory);
__attribute__((dllimport)) LONG RegOpenKeyTransactedA(
HKEY hKey,
LPCSTR lpSubKey,
DWORD ulOptions,
REGSAM samDesired,
PHKEY phkResult,
HANDLE hTransaction,
PVOID pExtendedParameter);
__attribute__((dllimport)) LONG RegOpenKeyTransactedW(
HKEY hKey,
LPCWSTR lpSubKey,
DWORD ulOptions,
REGSAM samDesired,
PHKEY phkResult,
HANDLE hTransaction,
PVOID pExtendedParameter);
__attribute__((dllimport)) LONG RegRenameKey(
HKEY hKey,
LPCWSTR lpSubKeyName,
LPCWSTR lpNewKeyName);
__attribute__((dllimport)) LONG RegSetKeyValueA(
HKEY hKey,
LPCSTR lpSubKey,
LPCSTR lpValueName,
DWORD dwType,
LPCVOID lpData,
DWORD cbData);
__attribute__((dllimport)) LONG RegSetKeyValueW(
HKEY hKey,
LPCWSTR lpSubKey,
LPCWSTR lpValueName,
DWORD dwType,
LPCVOID lpData,
DWORD cbData);
__attribute__((dllimport)) DWORD InitiateShutdownA(
LPSTR lpMachineName,
LPSTR lpMessage,
DWORD dwGracePeriod,
DWORD dwShutdownFlags,
DWORD dwReason);
__attribute__((dllimport)) DWORD InitiateShutdownW(
LPWSTR lpMachineName,
LPWSTR lpMessage,
DWORD dwGracePeriod,
DWORD dwShutdownFlags,
DWORD dwReason);
__attribute__((dllimport)) DWORD CheckForHiberboot(
PBOOLEAN pHiberboot,
BOOLEAN bClearFlag);
typedef struct _NETRESOURCEA
{
DWORD dwScope;
DWORD dwType;
DWORD dwDisplayType;
DWORD dwUsage;
LPSTR lpLocalName;
LPSTR lpRemoteName;
LPSTR lpComment;
LPSTR lpProvider;
} NETRESOURCEA, *LPNETRESOURCEA;
typedef struct _NETRESOURCEW
{
DWORD dwScope;
DWORD dwType;
DWORD dwDisplayType;
DWORD dwUsage;
LPWSTR lpLocalName;
LPWSTR lpRemoteName;
LPWSTR lpComment;
LPWSTR lpProvider;
} NETRESOURCEW, *LPNETRESOURCEW;
typedef NETRESOURCEW NETRESOURCE;
typedef LPNETRESOURCEW LPNETRESOURCE;
DWORD WNetAddConnectionA(LPCSTR lpRemoteName, LPCSTR lpPassword, LPCSTR lpLocalName);
DWORD WNetAddConnectionW(LPCWSTR lpRemoteName, LPCWSTR lpPassword, LPCWSTR lpLocalName);
DWORD WNetAddConnection2A(LPNETRESOURCEA lpNetResource, LPCSTR lpPassword, LPCSTR lpUserName, DWORD dwFlags);
DWORD WNetAddConnection2W(LPNETRESOURCEW lpNetResource, LPCWSTR lpPassword, LPCWSTR lpUserName, DWORD dwFlags);
DWORD WNetAddConnection3A(HWND hwndOwner, LPNETRESOURCEA lpNetResource, LPCSTR lpPassword, LPCSTR lpUserName, DWORD dwFlags);
DWORD WNetAddConnection3W(HWND hwndOwner, LPNETRESOURCEW lpNetResource, LPCWSTR lpPassword, LPCWSTR lpUserName, DWORD dwFlags);
DWORD WNetCancelConnectionA(LPCSTR lpName, WINBOOL fForce);
DWORD WNetCancelConnectionW(LPCWSTR lpName, WINBOOL fForce);
DWORD WNetCancelConnection2A(LPCSTR lpName, DWORD dwFlags, WINBOOL fForce);
DWORD WNetCancelConnection2W(LPCWSTR lpName, DWORD dwFlags, WINBOOL fForce);
DWORD WNetGetConnectionA(LPCSTR lpLocalName, LPSTR lpRemoteName, LPDWORD lpnLength);
DWORD WNetGetConnectionW(LPCWSTR lpLocalName, LPWSTR lpRemoteName, LPDWORD lpnLength);
DWORD WNetRestoreConnectionA(HWND hwndParent, LPCSTR lpDevice);
DWORD WNetUseConnectionA(HWND hwndOwner, LPNETRESOURCEA lpNetResource, LPCSTR lpPassword, LPCSTR lpUserID, DWORD dwFlags, LPSTR lpAccessName, LPDWORD lpBufferSize, LPDWORD lpResult);
DWORD WNetUseConnectionW(HWND hwndOwner, LPNETRESOURCEW lpNetResource, LPCWSTR lpPassword, LPCWSTR lpUserID, DWORD dwFlags, LPWSTR lpAccessName, LPDWORD lpBufferSize, LPDWORD lpResult);
DWORD WNetConnectionDialog(HWND hwnd, DWORD dwType);
DWORD WNetDisconnectDialog(HWND hwnd, DWORD dwType);
DWORD WNetRestoreSingleConnectionW(HWND hwndParent, LPCWSTR lpDevice, WINBOOL fUseUI);
typedef struct _CONNECTDLGSTRUCTA
{
DWORD cbStructure;
HWND hwndOwner;
LPNETRESOURCEA lpConnRes;
DWORD dwFlags;
DWORD dwDevNum;
} CONNECTDLGSTRUCTA, *LPCONNECTDLGSTRUCTA;
typedef struct _CONNECTDLGSTRUCTW
{
DWORD cbStructure;
HWND hwndOwner;
LPNETRESOURCEW lpConnRes;
DWORD dwFlags;
DWORD dwDevNum;
} CONNECTDLGSTRUCTW, *LPCONNECTDLGSTRUCTW;
typedef CONNECTDLGSTRUCTW CONNECTDLGSTRUCT;
typedef LPCONNECTDLGSTRUCTW LPCONNECTDLGSTRUCT;
DWORD WNetConnectionDialog1A(LPCONNECTDLGSTRUCTA lpConnDlgStruct);
DWORD WNetConnectionDialog1W(LPCONNECTDLGSTRUCTW lpConnDlgStruct);
typedef struct _DISCDLGSTRUCTA
{
DWORD cbStructure;
HWND hwndOwner;
LPSTR lpLocalName;
LPSTR lpRemoteName;
DWORD dwFlags;
} DISCDLGSTRUCTA, *LPDISCDLGSTRUCTA;
typedef struct _DISCDLGSTRUCTW
{
DWORD cbStructure;
HWND hwndOwner;
LPWSTR lpLocalName;
LPWSTR lpRemoteName;
DWORD dwFlags;
} DISCDLGSTRUCTW, *LPDISCDLGSTRUCTW;
typedef DISCDLGSTRUCTW DISCDLGSTRUCT;
typedef LPDISCDLGSTRUCTW LPDISCDLGSTRUCT;
DWORD WNetDisconnectDialog1A(LPDISCDLGSTRUCTA lpConnDlgStruct);
DWORD WNetDisconnectDialog1W(LPDISCDLGSTRUCTW lpConnDlgStruct);
DWORD WNetOpenEnumA(DWORD dwScope, DWORD dwType, DWORD dwUsage, LPNETRESOURCEA lpNetResource, LPHANDLE lphEnum);
DWORD WNetOpenEnumW(DWORD dwScope, DWORD dwType, DWORD dwUsage, LPNETRESOURCEW lpNetResource, LPHANDLE lphEnum);
DWORD WNetEnumResourceA(HANDLE hEnum, LPDWORD lpcCount, LPVOID lpBuffer, LPDWORD lpBufferSize);
DWORD WNetEnumResourceW(HANDLE hEnum, LPDWORD lpcCount, LPVOID lpBuffer, LPDWORD lpBufferSize);
DWORD WNetCloseEnum(HANDLE hEnum);
DWORD WNetGetResourceParentA(LPNETRESOURCEA lpNetResource, LPVOID lpBuffer, LPDWORD lpcbBuffer);
DWORD WNetGetResourceParentW(LPNETRESOURCEW lpNetResource, LPVOID lpBuffer, LPDWORD lpcbBuffer);
DWORD WNetGetResourceInformationA(LPNETRESOURCEA lpNetResource, LPVOID lpBuffer, LPDWORD lpcbBuffer, LPSTR *lplpSystem);
DWORD WNetGetResourceInformationW(LPNETRESOURCEW lpNetResource, LPVOID lpBuffer, LPDWORD lpcbBuffer, LPWSTR *lplpSystem);
typedef struct _UNIVERSAL_NAME_INFOA
{
LPSTR lpUniversalName;
} UNIVERSAL_NAME_INFOA, *LPUNIVERSAL_NAME_INFOA;
typedef struct _UNIVERSAL_NAME_INFOW
{
LPWSTR lpUniversalName;
} UNIVERSAL_NAME_INFOW, *LPUNIVERSAL_NAME_INFOW;
typedef UNIVERSAL_NAME_INFOW UNIVERSAL_NAME_INFO;
typedef LPUNIVERSAL_NAME_INFOW LPUNIVERSAL_NAME_INFO;
typedef struct _REMOTE_NAME_INFOA
{
LPSTR lpUniversalName;
LPSTR lpConnectionName;
LPSTR lpRemainingPath;
} REMOTE_NAME_INFOA, *LPREMOTE_NAME_INFOA;
typedef struct _REMOTE_NAME_INFOW
{
LPWSTR lpUniversalName;
LPWSTR lpConnectionName;
LPWSTR lpRemainingPath;
} REMOTE_NAME_INFOW, *LPREMOTE_NAME_INFOW;
typedef REMOTE_NAME_INFOW REMOTE_NAME_INFO;
typedef LPREMOTE_NAME_INFOW LPREMOTE_NAME_INFO;
DWORD WNetGetUniversalNameA(LPCSTR lpLocalPath, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpBufferSize);
DWORD WNetGetUniversalNameW(LPCWSTR lpLocalPath, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpBufferSize);
DWORD WNetGetUserA(LPCSTR lpName, LPSTR lpUserName, LPDWORD lpnLength);
DWORD WNetGetUserW(LPCWSTR lpName, LPWSTR lpUserName, LPDWORD lpnLength);
DWORD WNetGetProviderNameA(DWORD dwNetType, LPSTR lpProviderName, LPDWORD lpBufferSize);
DWORD WNetGetProviderNameW(DWORD dwNetType, LPWSTR lpProviderName, LPDWORD lpBufferSize);
typedef struct _NETINFOSTRUCT
{
DWORD cbStructure;
DWORD dwProviderVersion;
DWORD dwStatus;
DWORD dwCharacteristics;
ULONG_PTR dwHandle;
WORD wNetType;
DWORD dwPrinters;
DWORD dwDrives;
} NETINFOSTRUCT, *LPNETINFOSTRUCT;
DWORD WNetGetNetworkInformationA(LPCSTR lpProvider, LPNETINFOSTRUCT lpNetInfoStruct);
DWORD WNetGetNetworkInformationW(LPCWSTR lpProvider, LPNETINFOSTRUCT lpNetInfoStruct);
typedef UINT (*PFNGETPROFILEPATHA)(LPCSTR pszUsername, LPSTR pszBuffer, UINT cbBuffer);
typedef UINT (*PFNGETPROFILEPATHW)(LPCWSTR pszUsername, LPWSTR pszBuffer, UINT cbBuffer);
typedef UINT (*PFNRECONCILEPROFILEA)(LPCSTR pszCentralFile, LPCSTR pszLocalFile, DWORD dwFlags);
typedef UINT (*PFNRECONCILEPROFILEW)(LPCWSTR pszCentralFile, LPCWSTR pszLocalFile, DWORD dwFlags);
typedef WINBOOL (*PFNPROCESSPOLICIESA)(HWND hwnd, LPCSTR pszPath, LPCSTR pszUsername, LPCSTR pszComputerName, DWORD dwFlags);
typedef WINBOOL (*PFNPROCESSPOLICIESW)(HWND hwnd, LPCWSTR pszPath, LPCWSTR pszUsername, LPCWSTR pszComputerName, DWORD dwFlags);
DWORD WNetGetLastErrorA(LPDWORD lpError, LPSTR lpErrorBuf, DWORD nErrorBufSize, LPSTR lpNameBuf, DWORD nNameBufSize);
DWORD WNetGetLastErrorW(LPDWORD lpError, LPWSTR lpErrorBuf, DWORD nErrorBufSize, LPWSTR lpNameBuf, DWORD nNameBufSize);
typedef struct _NETCONNECTINFOSTRUCT
{
DWORD cbStructure;
DWORD dwFlags;
DWORD dwSpeed;
DWORD dwDelay;
DWORD dwOptDataSize;
} NETCONNECTINFOSTRUCT, *LPNETCONNECTINFOSTRUCT;
DWORD MultinetGetConnectionPerformanceA(LPNETRESOURCEA lpNetResource, LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct);
DWORD MultinetGetConnectionPerformanceW(LPNETRESOURCEW lpNetResource, LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct);
typedef enum _ATTACH_VIRTUAL_DISK_FLAG
{
ATTACH_VIRTUAL_DISK_FLAG_NONE = 0x00000000,
ATTACH_VIRTUAL_DISK_FLAG_READ_ONLY = 0x00000001,
ATTACH_VIRTUAL_DISK_FLAG_NO_DRIVE_LETTER = 0x00000002,
ATTACH_VIRTUAL_DISK_FLAG_PERMANENT_LIFETIME = 0x00000004,
ATTACH_VIRTUAL_DISK_FLAG_NO_LOCAL_HOST = 0x00000008
} ATTACH_VIRTUAL_DISK_FLAG;
typedef enum _ATTACH_VIRTUAL_DISK_VERSION
{
ATTACH_VIRTUAL_DISK_VERSION_UNSPECIFIED = 0,
ATTACH_VIRTUAL_DISK_VERSION_1 = 1
} ATTACH_VIRTUAL_DISK_VERSION;
typedef enum _COMPACT_VIRTUAL_DISK_FLAG
{
COMPACT_VIRTUAL_DISK_FLAG_NONE = 0x00000000
} COMPACT_VIRTUAL_DISK_FLAG;
typedef enum _COMPACT_VIRTUAL_DISK_VERSION
{
COMPACT_VIRTUAL_DISK_VERSION_UNSPECIFIED = 0,
COMPACT_VIRTUAL_DISK_VERSION_1 = 1
} COMPACT_VIRTUAL_DISK_VERSION;
typedef enum _CREATE_VIRTUAL_DISK_FLAG
{
CREATE_VIRTUAL_DISK_FLAG_NONE = 0x00000000,
CREATE_VIRTUAL_DISK_FLAG_FULL_PHYSICAL_ALLOCATION = 0x00000001
} CREATE_VIRTUAL_DISK_FLAG;
typedef enum _CREATE_VIRTUAL_DISK_VERSION
{
CREATE_VIRTUAL_DISK_VERSION_UNSPECIFIED = 0,
CREATE_VIRTUAL_DISK_VERSION_1 = 1
} CREATE_VIRTUAL_DISK_VERSION;
typedef enum _DEPENDENT_DISK_FLAG
{
DEPENDENT_DISK_FLAG_NONE = 0x00000000,
DEPENDENT_DISK_FLAG_MULT_BACKING_FILES = 0x00000001,
DEPENDENT_DISK_FLAG_FULLY_ALLOCATED = 0x00000002,
DEPENDENT_DISK_FLAG_READ_ONLY = 0x00000004,
DEPENDENT_DISK_FLAG_REMOTE = 0x00000008,
DEPENDENT_DISK_FLAG_SYSTEM_VOLUME = 0x00000010,
DEPENDENT_DISK_FLAG_SYSTEM_VOLUME_PARENT = 0x00000020,
DEPENDENT_DISK_FLAG_REMOVABLE = 0x00000040,
DEPENDENT_DISK_FLAG_NO_DRIVE_LETTER = 0x00000080,
DEPENDENT_DISK_FLAG_PARENT = 0x00000100,
DEPENDENT_DISK_FLAG_NO_HOST_DISK = 0x00000200,
DEPENDENT_DISK_FLAG_PERMANENT_LIFETIME = 0x00000400
} DEPENDENT_DISK_FLAG;
typedef enum _EXPAND_VIRTUAL_DISK_VERSION
{
EXPAND_VIRTUAL_DISK_VERSION_UNSPECIFIED = 0,
EXPAND_VIRTUAL_DISK_VERSION_1 = 1
} EXPAND_VIRTUAL_DISK_VERSION;
typedef enum _DETACH_VIRTUAL_DISK_FLAG
{
DETACH_VIRTUAL_DISK_FLAG_NONE = 0x00000000
} DETACH_VIRTUAL_DISK_FLAG;
typedef enum _EXPAND_VIRTUAL_DISK_FLAG
{
EXPAND_VIRTUAL_DISK_FLAG_NONE = 0x00000000
} EXPAND_VIRTUAL_DISK_FLAG;
typedef enum _GET_STORAGE_DEPENDENCY_FLAG
{
GET_STORAGE_DEPENDENCY_FLAG_NONE = 0x00000000,
GET_STORAGE_DEPENDENCY_FLAG_HOST_VOLUMES = 0x00000001,
GET_STORAGE_DEPENDENCY_FLAG_DISK_HANDLE = 0x00000002
} GET_STORAGE_DEPENDENCY_FLAG;
typedef enum _GET_VIRTUAL_DISK_INFO_VERSION
{
GET_VIRTUAL_DISK_INFO_UNSPECIFIED = 0,
GET_VIRTUAL_DISK_INFO_SIZE = 1,
GET_VIRTUAL_DISK_INFO_IDENTIFIER = 2,
GET_VIRTUAL_DISK_INFO_PARENT_LOCATION = 3,
GET_VIRTUAL_DISK_INFO_PARENT_IDENTIFIER = 4,
GET_VIRTUAL_DISK_INFO_PARENT_TIMESTAMP = 5,
GET_VIRTUAL_DISK_INFO_VIRTUAL_STORAGE_TYPE = 6,
GET_VIRTUAL_DISK_INFO_PROVIDER_SUBTYPE = 7
} GET_VIRTUAL_DISK_INFO_VERSION;
typedef enum _MIRROR_VIRTUAL_DISK_FLAG
{
MIRROR_VIRTUAL_DISK_FLAG_NONE = 0x00000000,
MIRROR_VIRTUAL_DISK_FLAG_EXISTING_FILE = 0x00000001
} MIRROR_VIRTUAL_DISK_FLAG;
typedef enum _MIRROR_VIRTUAL_DISK_VERSION
{
MIRROR_VIRTUAL_DISK_VERSION_UNSPECIFIED = 0,
MIRROR_VIRTUAL_DISK_VERSION_1 = 1
} MIRROR_VIRTUAL_DISK_VERSION;
typedef enum _MERGE_VIRTUAL_DISK_FLAG
{
MERGE_VIRTUAL_DISK_FLAG_NONE = 0x00000000
} MERGE_VIRTUAL_DISK_FLAG;
typedef enum _MERGE_VIRTUAL_DISK_VERSION
{
MERGE_VIRTUAL_DISK_VERSION_UNSPECIFIED = 0,
MERGE_VIRTUAL_DISK_VERSION_1 = 1
} MERGE_VIRTUAL_DISK_VERSION;
typedef enum _OPEN_VIRTUAL_DISK_FLAG
{
OPEN_VIRTUAL_DISK_FLAG_NONE = 0x00000000,
OPEN_VIRTUAL_DISK_FLAG_NO_PARENTS = 0x00000001,
OPEN_VIRTUAL_DISK_FLAG_BLANK_FILE = 0x00000002,
OPEN_VIRTUAL_DISK_FLAG_BOOT_DRIVE = 0x00000004
} OPEN_VIRTUAL_DISK_FLAG;
typedef enum _OPEN_VIRTUAL_DISK_VERSION
{
OPEN_VIRTUAL_DISK_VERSION_UNSPECIFIED = 0,
OPEN_VIRTUAL_DISK_VERSION_1 = 1
} OPEN_VIRTUAL_DISK_VERSION;
typedef enum _SET_VIRTUAL_DISK_INFO_VERSION
{
SET_VIRTUAL_DISK_INFO_UNSPECIFIED = 0,
SET_VIRTUAL_DISK_INFO_PARENT_PATH = 1,
SET_VIRTUAL_DISK_INFO_IDENTIFIER = 2
} SET_VIRTUAL_DISK_INFO_VERSION;
typedef enum _STORAGE_DEPENDENCY_INFO_VERSION
{
STORAGE_DEPENDENCY_INFO_VERSION_UNSPECIFIED = 0,
STORAGE_DEPENDENCY_INFO_VERSION_1 = 1,
STORAGE_DEPENDENCY_INFO_VERSION_2 = 2
} STORAGE_DEPENDENCY_INFO_VERSION;
typedef enum _VIRTUAL_DISK_ACCESS_MASK
{
VIRTUAL_DISK_ACCESS_NONE = 0x00000000,
VIRTUAL_DISK_ACCESS_ATTACH_RO = 0x00010000,
VIRTUAL_DISK_ACCESS_ATTACH_RW = 0x00020000,
VIRTUAL_DISK_ACCESS_DETACH = 0x00040000,
VIRTUAL_DISK_ACCESS_GET_INFO = 0x00080000,
VIRTUAL_DISK_ACCESS_CREATE = 0x00100000,
VIRTUAL_DISK_ACCESS_METAOPS = 0x00200000,
VIRTUAL_DISK_ACCESS_READ = 0x000d0000,
VIRTUAL_DISK_ACCESS_ALL = 0x003f0000,
VIRTUAL_DISK_ACCESS_WRITABLE = 0x00320000
} VIRTUAL_DISK_ACCESS_MASK;
typedef struct _VIRTUAL_STORAGE_TYPE
{
ULONG DeviceId;
GUID VendorId;
} VIRTUAL_STORAGE_TYPE, *PVIRTUAL_STORAGE_TYPE;
typedef struct _ATTACH_VIRTUAL_DISK_PARAMETERS
{
ATTACH_VIRTUAL_DISK_VERSION Version;
__extension__ union {
struct
{
ULONG Reserved;
} Version1;
};
} ATTACH_VIRTUAL_DISK_PARAMETERS, *PATTACH_VIRTUAL_DISK_PARAMETERS;
typedef struct _COMPACT_VIRTUAL_DISK_PARAMETERS
{
COMPACT_VIRTUAL_DISK_VERSION Version;
__extension__ union {
struct
{
ULONG Reserved;
} Version1;
};
} COMPACT_VIRTUAL_DISK_PARAMETERS, *PCOMPACT_VIRTUAL_DISK_PARAMETERS;
typedef struct _CREATE_VIRTUAL_DISK_PARAMETERS
{
CREATE_VIRTUAL_DISK_VERSION Version;
__extension__ union {
struct
{
GUID UniqueId;
ULONGLONG MaximumSize;
ULONG BlockSizeInBytes;
ULONG SectorSizeInBytes;
PCWSTR ParentPath;
PCWSTR SourcePath;
} Version1;
};
} CREATE_VIRTUAL_DISK_PARAMETERS, *PCREATE_VIRTUAL_DISK_PARAMETERS;
typedef struct _EXPAND_VIRTUAL_DISK_PARAMETERS
{
EXPAND_VIRTUAL_DISK_VERSION Version;
__extension__ union {
struct
{
ULONGLONG NewSize;
} Version1;
};
} EXPAND_VIRTUAL_DISK_PARAMETERS, *PEXPAND_VIRTUAL_DISK_PARAMETERS;
typedef struct _GET_VIRTUAL_DISK_INFO
{
GET_VIRTUAL_DISK_INFO_VERSION Version;
__extension__ union {
struct
{
ULONGLONG VirtualSize;
ULONGLONG PhysicalSize;
ULONG BlockSize;
ULONG SectorSize;
} Size;
GUID Identifier;
struct
{
WINBOOL ParentResolved;
WCHAR ParentLocationBuffer[1];
} ParentLocation;
GUID ParentIdentifier;
ULONG ParentTimestamp;
VIRTUAL_STORAGE_TYPE VirtualStorageType;
ULONG ProviderSubtype;
};
} GET_VIRTUAL_DISK_INFO, *PGET_VIRTUAL_DISK_INFO;
typedef struct _MERGE_VIRTUAL_DISK_PARAMETERS
{
MERGE_VIRTUAL_DISK_VERSION Version;
__extension__ union {
struct
{
ULONG MergeDepth;
} Version1;
};
} MERGE_VIRTUAL_DISK_PARAMETERS, *PMERGE_VIRTUAL_DISK_PARAMETERS;
typedef struct _OPEN_VIRTUAL_DISK_PARAMETERS
{
OPEN_VIRTUAL_DISK_VERSION Version;
__extension__ union {
struct
{
ULONG RWDepth;
} Version1;
};
} OPEN_VIRTUAL_DISK_PARAMETERS, *POPEN_VIRTUAL_DISK_PARAMETERS;
typedef struct _SET_VIRTUAL_DISK_INFO
{
SET_VIRTUAL_DISK_INFO_VERSION Version;
__extension__ union {
PCWSTR ParentFilePath;
GUID UniqueIdentifier;
};
} SET_VIRTUAL_DISK_INFO, *PSET_VIRTUAL_DISK_INFO;
typedef struct _STORAGE_DEPENDENCY_INFO_TYPE_1
{
DEPENDENT_DISK_FLAG DependencyTypeFlags;
ULONG ProviderSpecificFlags;
VIRTUAL_STORAGE_TYPE VirtualStorageType;
} STORAGE_DEPENDENCY_INFO_TYPE_1, *PSTORAGE_DEPENDENCY_INFO_TYPE_1;
typedef struct _STORAGE_DEPENDENCY_INFO_TYPE_2
{
DEPENDENT_DISK_FLAG DependencyTypeFlags;
ULONG ProviderSpecificFlags;
VIRTUAL_STORAGE_TYPE VirtualStorageType;
ULONG AncestorLevel;
PWSTR DependencyDeviceName;
PWSTR HostVolumeName;
PWSTR DependentVolumeName;
PWSTR DependentVolumeRelativePath;
} STORAGE_DEPENDENCY_INFO_TYPE_2, *PSTORAGE_DEPENDENCY_INFO_TYPE_2;
typedef struct _STORAGE_DEPENDENCY_INFO
{
STORAGE_DEPENDENCY_INFO_VERSION Version;
ULONG NumberEntries;
__extension__ union {
STORAGE_DEPENDENCY_INFO_TYPE_1 Version1Entries[1];
STORAGE_DEPENDENCY_INFO_TYPE_2 Version2Entries[1];
};
} STORAGE_DEPENDENCY_INFO, *PSTORAGE_DEPENDENCY_INFO;
typedef struct _VIRTUAL_DISK_PROGRESS
{
DWORD OperationStatus;
ULONGLONG CurrentValue;
ULONGLONG CompletionValue;
} VIRTUAL_DISK_PROGRESS, *PVIRTUAL_DISK_PROGRESS;
extern const GUID VIRTUAL_STORAGE_TYPE_VENDOR_UNKNOWN;
extern const GUID VIRTUAL_STORAGE_TYPE_VENDOR_MICROSOFT;
__attribute__((dllimport)) DWORD AttachVirtualDisk(HANDLE VirtualDiskHandle, PSECURITY_DESCRIPTOR SecurityDescriptor, ATTACH_VIRTUAL_DISK_FLAG Flags, ULONG ProviderSpecificFlags, PATTACH_VIRTUAL_DISK_PARAMETERS Parameters, LPOVERLAPPED Overlapped);
__attribute__((dllimport)) DWORD CompactVirtualDisk(HANDLE VirtualDiskHandle, COMPACT_VIRTUAL_DISK_FLAG Flags, PCOMPACT_VIRTUAL_DISK_PARAMETERS Parameters, LPOVERLAPPED Overlapped);
__attribute__((dllimport)) DWORD CreateVirtualDisk(PVIRTUAL_STORAGE_TYPE VirtualStorageType, PCWSTR Path, VIRTUAL_DISK_ACCESS_MASK VirtualDiskAccessMask, PSECURITY_DESCRIPTOR SecurityDescriptor, CREATE_VIRTUAL_DISK_FLAG Flags, ULONG ProviderSpecificFlags, PCREATE_VIRTUAL_DISK_PARAMETERS Parameters, LPOVERLAPPED Overlapped, PHANDLE Handle);
__attribute__((dllimport)) DWORD DetachVirtualDisk(HANDLE VirtualDiskHandle, DETACH_VIRTUAL_DISK_FLAG Flags, ULONG ProviderSpecificFlags);
__attribute__((dllimport)) DWORD ExpandVirtualDisk(HANDLE VirtualDiskHandle, EXPAND_VIRTUAL_DISK_FLAG Flags, PEXPAND_VIRTUAL_DISK_PARAMETERS Parameters, LPOVERLAPPED Overlapped);
__attribute__((dllimport)) DWORD GetStorageDependencyInformation(HANDLE ObjectHandle, GET_STORAGE_DEPENDENCY_FLAG Flags, ULONG StorageDependencyInfoSize, PSTORAGE_DEPENDENCY_INFO StorageDependencyInfo, PULONG SizeUsed);
__attribute__((dllimport)) DWORD GetVirtualDiskInformation(HANDLE VirtualDiskHandle, PULONG VirtualDiskInfoSize, PGET_VIRTUAL_DISK_INFO VirtualDiskInfo, PULONG SizeUsed);
__attribute__((dllimport)) DWORD GetVirtualDiskOperationProgress(HANDLE VirtualDiskHandle, LPOVERLAPPED Overlapped, PVIRTUAL_DISK_PROGRESS Progress);
__attribute__((dllimport)) DWORD GetVirtualDiskPhysicalPath(HANDLE VirtualDiskHandle, PULONG DiskPathSizeInBytes, PWSTR DiskPath);
__attribute__((dllimport)) DWORD MergeVirtualDisk(HANDLE VirtualDiskHandle, MERGE_VIRTUAL_DISK_FLAG Flags, PMERGE_VIRTUAL_DISK_PARAMETERS Parameters, LPOVERLAPPED Overlapped);
__attribute__((dllimport)) DWORD OpenVirtualDisk(PVIRTUAL_STORAGE_TYPE VirtualStorageType, PCWSTR Path, VIRTUAL_DISK_ACCESS_MASK VirtualDiskAccessMask, OPEN_VIRTUAL_DISK_FLAG Flags, POPEN_VIRTUAL_DISK_PARAMETERS Parameters, PHANDLE Handle);
__attribute__((dllimport)) DWORD SetVirtualDiskInformation(HANDLE VirtualDiskHandle, PSET_VIRTUAL_DISK_INFO VirtualDiskInfo);
LPUWSTR uaw_CharUpperW(LPUWSTR String);
int uaw_lstrcmpW(PCUWSTR String1, PCUWSTR String2);
int uaw_lstrcmpiW(PCUWSTR String1, PCUWSTR String2);
int uaw_lstrlenW(LPCUWSTR String);
PUWSTR __attribute__((__cdecl__)) uaw_wcschr(PCUWSTR String, WCHAR Character);
PUWSTR __attribute__((__cdecl__)) uaw_wcscpy(PUWSTR Destination, PCUWSTR Source);
int __attribute__((__cdecl__)) uaw_wcsicmp(PCUWSTR String1, PCUWSTR String2);
size_t __attribute__((__cdecl__)) uaw_wcslen(PCUWSTR String);
PUWSTR __attribute__((__cdecl__)) uaw_wcsrchr(PCUWSTR String, WCHAR Character);
LPUWSTR ua_CharUpperW(LPUWSTR String);
int ua_lstrcmpW(LPCUWSTR String1, LPCUWSTR String2);
int ua_lstrcmpiW(LPCUWSTR String1, LPCUWSTR String2);
int ua_lstrlenW(LPCUWSTR String);
typedef WCHAR *PUWSTR_C;
PUWSTR_C ua_wcschr(PCUWSTR String, WCHAR Character);
PUWSTR_C ua_wcsrchr(PCUWSTR String, WCHAR Character);
PUWSTR ua_wcscpy(PUWSTR Destination, PCUWSTR Source);
size_t ua_wcslen(PCUWSTR String);
int ua_wcsicmp(LPCUWSTR String1, LPCUWSTR String2);
typedef struct _SERVICE_DESCRIPTIONA
{
LPSTR lpDescription;
} SERVICE_DESCRIPTIONA, *LPSERVICE_DESCRIPTIONA;
typedef struct _SERVICE_DESCRIPTIONW
{
LPWSTR lpDescription;
} SERVICE_DESCRIPTIONW, *LPSERVICE_DESCRIPTIONW;
typedef SERVICE_DESCRIPTIONW SERVICE_DESCRIPTION;
typedef LPSERVICE_DESCRIPTIONW LPSERVICE_DESCRIPTION;
typedef enum _SC_ACTION_TYPE
{
SC_ACTION_NONE = 0,
SC_ACTION_RESTART = 1,
SC_ACTION_REBOOT = 2,
SC_ACTION_RUN_COMMAND = 3
} SC_ACTION_TYPE;
typedef struct _SC_ACTION
{
SC_ACTION_TYPE Type;
DWORD Delay;
} SC_ACTION, *LPSC_ACTION;
typedef struct _SERVICE_FAILURE_ACTIONSA
{
DWORD dwResetPeriod;
LPSTR lpRebootMsg;
LPSTR lpCommand;
DWORD cActions;
SC_ACTION *lpsaActions;
} SERVICE_FAILURE_ACTIONSA, *LPSERVICE_FAILURE_ACTIONSA;
typedef struct _SERVICE_FAILURE_ACTIONSW
{
DWORD dwResetPeriod;
LPWSTR lpRebootMsg;
LPWSTR lpCommand;
DWORD cActions;
SC_ACTION *lpsaActions;
} SERVICE_FAILURE_ACTIONSW, *LPSERVICE_FAILURE_ACTIONSW;
typedef SERVICE_FAILURE_ACTIONSW SERVICE_FAILURE_ACTIONS;
typedef LPSERVICE_FAILURE_ACTIONSW LPSERVICE_FAILURE_ACTIONS;
struct SC_HANDLE__
{
int unused;
};
typedef struct SC_HANDLE__ *SC_HANDLE;
typedef SC_HANDLE *LPSC_HANDLE;
struct SERVICE_STATUS_HANDLE__
{
int unused;
};
typedef struct SERVICE_STATUS_HANDLE__ *SERVICE_STATUS_HANDLE;
typedef enum _SC_STATUS_TYPE
{
SC_STATUS_PROCESS_INFO = 0
} SC_STATUS_TYPE;
typedef enum _SC_ENUM_TYPE
{
SC_ENUM_PROCESS_INFO = 0
} SC_ENUM_TYPE;
typedef struct _SERVICE_STATUS
{
DWORD dwServiceType;
DWORD dwCurrentState;
DWORD dwControlsAccepted;
DWORD dwWin32ExitCode;
DWORD dwServiceSpecificExitCode;
DWORD dwCheckPoint;
DWORD dwWaitHint;
} SERVICE_STATUS, *LPSERVICE_STATUS;
typedef struct _SERVICE_STATUS_PROCESS
{
DWORD dwServiceType;
DWORD dwCurrentState;
DWORD dwControlsAccepted;
DWORD dwWin32ExitCode;
DWORD dwServiceSpecificExitCode;
DWORD dwCheckPoint;
DWORD dwWaitHint;
DWORD dwProcessId;
DWORD dwServiceFlags;
} SERVICE_STATUS_PROCESS, *LPSERVICE_STATUS_PROCESS;
typedef struct _ENUM_SERVICE_STATUSA
{
LPSTR lpServiceName;
LPSTR lpDisplayName;
SERVICE_STATUS ServiceStatus;
} ENUM_SERVICE_STATUSA, *LPENUM_SERVICE_STATUSA;
typedef struct _ENUM_SERVICE_STATUSW
{
LPWSTR lpServiceName;
LPWSTR lpDisplayName;
SERVICE_STATUS ServiceStatus;
} ENUM_SERVICE_STATUSW, *LPENUM_SERVICE_STATUSW;
typedef ENUM_SERVICE_STATUSW ENUM_SERVICE_STATUS;
typedef LPENUM_SERVICE_STATUSW LPENUM_SERVICE_STATUS;
typedef struct _ENUM_SERVICE_STATUS_PROCESSA
{
LPSTR lpServiceName;
LPSTR lpDisplayName;
SERVICE_STATUS_PROCESS ServiceStatusProcess;
} ENUM_SERVICE_STATUS_PROCESSA, *LPENUM_SERVICE_STATUS_PROCESSA;
typedef struct _ENUM_SERVICE_STATUS_PROCESSW
{
LPWSTR lpServiceName;
LPWSTR lpDisplayName;
SERVICE_STATUS_PROCESS ServiceStatusProcess;
} ENUM_SERVICE_STATUS_PROCESSW, *LPENUM_SERVICE_STATUS_PROCESSW;
typedef ENUM_SERVICE_STATUS_PROCESSW ENUM_SERVICE_STATUS_PROCESS;
typedef LPENUM_SERVICE_STATUS_PROCESSW LPENUM_SERVICE_STATUS_PROCESS;
typedef LPVOID SC_LOCK;
typedef struct _QUERY_SERVICE_LOCK_STATUSA
{
DWORD fIsLocked;
LPSTR lpLockOwner;
DWORD dwLockDuration;
} QUERY_SERVICE_LOCK_STATUSA, *LPQUERY_SERVICE_LOCK_STATUSA;
typedef struct _QUERY_SERVICE_LOCK_STATUSW
{
DWORD fIsLocked;
LPWSTR lpLockOwner;
DWORD dwLockDuration;
} QUERY_SERVICE_LOCK_STATUSW, *LPQUERY_SERVICE_LOCK_STATUSW;
typedef QUERY_SERVICE_LOCK_STATUSW QUERY_SERVICE_LOCK_STATUS;
typedef LPQUERY_SERVICE_LOCK_STATUSW LPQUERY_SERVICE_LOCK_STATUS;
typedef struct _QUERY_SERVICE_CONFIGA
{
DWORD dwServiceType;
DWORD dwStartType;
DWORD dwErrorControl;
LPSTR lpBinaryPathName;
LPSTR lpLoadOrderGroup;
DWORD dwTagId;
LPSTR lpDependencies;
LPSTR lpServiceStartName;
LPSTR lpDisplayName;
} QUERY_SERVICE_CONFIGA, *LPQUERY_SERVICE_CONFIGA;
typedef struct _QUERY_SERVICE_CONFIGW
{
DWORD dwServiceType;
DWORD dwStartType;
DWORD dwErrorControl;
LPWSTR lpBinaryPathName;
LPWSTR lpLoadOrderGroup;
DWORD dwTagId;
LPWSTR lpDependencies;
LPWSTR lpServiceStartName;
LPWSTR lpDisplayName;
} QUERY_SERVICE_CONFIGW, *LPQUERY_SERVICE_CONFIGW;
typedef QUERY_SERVICE_CONFIGW QUERY_SERVICE_CONFIG;
typedef LPQUERY_SERVICE_CONFIGW LPQUERY_SERVICE_CONFIG;
typedef void (*LPSERVICE_MAIN_FUNCTIONW)(DWORD dwNumServicesArgs, LPWSTR *lpServiceArgVectors);
typedef void (*LPSERVICE_MAIN_FUNCTIONA)(DWORD dwNumServicesArgs, LPSTR *lpServiceArgVectors);
typedef struct _SERVICE_TABLE_ENTRYA
{
LPSTR lpServiceName;
LPSERVICE_MAIN_FUNCTIONA lpServiceProc;
} SERVICE_TABLE_ENTRYA, *LPSERVICE_TABLE_ENTRYA;
typedef struct _SERVICE_TABLE_ENTRYW
{
LPWSTR lpServiceName;
LPSERVICE_MAIN_FUNCTIONW lpServiceProc;
} SERVICE_TABLE_ENTRYW, *LPSERVICE_TABLE_ENTRYW;
typedef SERVICE_TABLE_ENTRYW SERVICE_TABLE_ENTRY;
typedef LPSERVICE_TABLE_ENTRYW LPSERVICE_TABLE_ENTRY;
typedef void (*LPHANDLER_FUNCTION)(DWORD dwControl);
typedef DWORD (*LPHANDLER_FUNCTION_EX)(DWORD dwControl, DWORD dwEventType, LPVOID lpEventData, LPVOID lpContext);
__attribute__((dllimport)) WINBOOL ChangeServiceConfigA(SC_HANDLE hService, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCSTR lpBinaryPathName, LPCSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCSTR lpDependencies, LPCSTR lpServiceStartName, LPCSTR lpPassword, LPCSTR lpDisplayName);
__attribute__((dllimport)) WINBOOL ChangeServiceConfigW(SC_HANDLE hService, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCWSTR lpBinaryPathName, LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCWSTR lpDependencies, LPCWSTR lpServiceStartName, LPCWSTR lpPassword, LPCWSTR lpDisplayName);
__attribute__((dllimport)) WINBOOL ChangeServiceConfig2A(SC_HANDLE hService, DWORD dwInfoLevel, LPVOID lpInfo);
__attribute__((dllimport)) WINBOOL ChangeServiceConfig2W(SC_HANDLE hService, DWORD dwInfoLevel, LPVOID lpInfo);
__attribute__((dllimport)) WINBOOL CloseServiceHandle(SC_HANDLE hSCObject);
__attribute__((dllimport)) WINBOOL ControlService(SC_HANDLE hService, DWORD dwControl, LPSERVICE_STATUS lpServiceStatus);
__attribute__((dllimport)) SC_HANDLE CreateServiceA(SC_HANDLE hSCManager, LPCSTR lpServiceName, LPCSTR lpDisplayName, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCSTR lpBinaryPathName, LPCSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCSTR lpDependencies, LPCSTR lpServiceStartName, LPCSTR lpPassword);
__attribute__((dllimport)) SC_HANDLE CreateServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, LPCWSTR lpDisplayName, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCWSTR lpBinaryPathName, LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCWSTR lpDependencies, LPCWSTR lpServiceStartName, LPCWSTR lpPassword);
__attribute__((dllimport)) WINBOOL DeleteService(SC_HANDLE hService);
__attribute__((dllimport)) WINBOOL EnumDependentServicesA(SC_HANDLE hService, DWORD dwServiceState, LPENUM_SERVICE_STATUSA lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned);
__attribute__((dllimport)) WINBOOL EnumDependentServicesW(SC_HANDLE hService, DWORD dwServiceState, LPENUM_SERVICE_STATUSW lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned);
__attribute__((dllimport)) WINBOOL EnumServicesStatusA(SC_HANDLE hSCManager, DWORD dwServiceType, DWORD dwServiceState, LPENUM_SERVICE_STATUSA lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned, LPDWORD lpResumeHandle);
__attribute__((dllimport)) WINBOOL EnumServicesStatusW(SC_HANDLE hSCManager, DWORD dwServiceType, DWORD dwServiceState, LPENUM_SERVICE_STATUSW lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned, LPDWORD lpResumeHandle);
__attribute__((dllimport)) WINBOOL EnumServicesStatusExA(SC_HANDLE hSCManager, SC_ENUM_TYPE InfoLevel, DWORD dwServiceType, DWORD dwServiceState, LPBYTE lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned, LPDWORD lpResumeHandle, LPCSTR pszGroupName);
__attribute__((dllimport)) WINBOOL EnumServicesStatusExW(SC_HANDLE hSCManager, SC_ENUM_TYPE InfoLevel, DWORD dwServiceType, DWORD dwServiceState, LPBYTE lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned, LPDWORD lpResumeHandle, LPCWSTR pszGroupName);
__attribute__((dllimport)) WINBOOL GetServiceKeyNameA(SC_HANDLE hSCManager, LPCSTR lpDisplayName, LPSTR lpServiceName, LPDWORD lpcchBuffer);
__attribute__((dllimport)) WINBOOL GetServiceKeyNameW(SC_HANDLE hSCManager, LPCWSTR lpDisplayName, LPWSTR lpServiceName, LPDWORD lpcchBuffer);
__attribute__((dllimport)) WINBOOL GetServiceDisplayNameA(SC_HANDLE hSCManager, LPCSTR lpServiceName, LPSTR lpDisplayName, LPDWORD lpcchBuffer);
__attribute__((dllimport)) WINBOOL GetServiceDisplayNameW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, LPWSTR lpDisplayName, LPDWORD lpcchBuffer);
__attribute__((dllimport)) SC_LOCK LockServiceDatabase(SC_HANDLE hSCManager);
__attribute__((dllimport)) WINBOOL NotifyBootConfigStatus(WINBOOL BootAcceptable);
__attribute__((dllimport)) SC_HANDLE OpenSCManagerA(LPCSTR lpMachineName, LPCSTR lpDatabaseName, DWORD dwDesiredAccess);
__attribute__((dllimport)) SC_HANDLE OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess);
__attribute__((dllimport)) SC_HANDLE OpenServiceA(SC_HANDLE hSCManager, LPCSTR lpServiceName, DWORD dwDesiredAccess);
__attribute__((dllimport)) SC_HANDLE OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess);
__attribute__((dllimport)) WINBOOL QueryServiceConfigA(SC_HANDLE hService, LPQUERY_SERVICE_CONFIGA lpServiceConfig, DWORD cbBufSize, LPDWORD pcbBytesNeeded);
__attribute__((dllimport)) WINBOOL QueryServiceConfigW(SC_HANDLE hService, LPQUERY_SERVICE_CONFIGW lpServiceConfig, DWORD cbBufSize, LPDWORD pcbBytesNeeded);
__attribute__((dllimport)) WINBOOL QueryServiceConfig2A(SC_HANDLE hService, DWORD dwInfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded);
__attribute__((dllimport)) WINBOOL QueryServiceConfig2W(SC_HANDLE hService, DWORD dwInfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded);
__attribute__((dllimport)) WINBOOL QueryServiceLockStatusA(SC_HANDLE hSCManager, LPQUERY_SERVICE_LOCK_STATUSA lpLockStatus, DWORD cbBufSize, LPDWORD pcbBytesNeeded);
__attribute__((dllimport)) WINBOOL QueryServiceLockStatusW(SC_HANDLE hSCManager, LPQUERY_SERVICE_LOCK_STATUSW lpLockStatus, DWORD cbBufSize, LPDWORD pcbBytesNeeded);
__attribute__((dllimport)) WINBOOL QueryServiceObjectSecurity(SC_HANDLE hService, SECURITY_INFORMATION dwSecurityInformation, PSECURITY_DESCRIPTOR lpSecurityDescriptor, DWORD cbBufSize, LPDWORD pcbBytesNeeded);
__attribute__((dllimport)) WINBOOL QueryServiceStatus(SC_HANDLE hService, LPSERVICE_STATUS lpServiceStatus);
__attribute__((dllimport)) WINBOOL QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded);
__attribute__((dllimport)) SERVICE_STATUS_HANDLE RegisterServiceCtrlHandlerA(LPCSTR lpServiceName, LPHANDLER_FUNCTION lpHandlerProc);
__attribute__((dllimport)) SERVICE_STATUS_HANDLE RegisterServiceCtrlHandlerW(LPCWSTR lpServiceName, LPHANDLER_FUNCTION lpHandlerProc);
__attribute__((dllimport)) SERVICE_STATUS_HANDLE RegisterServiceCtrlHandlerExA(LPCSTR lpServiceName, LPHANDLER_FUNCTION_EX lpHandlerProc, LPVOID lpContext);
__attribute__((dllimport)) SERVICE_STATUS_HANDLE RegisterServiceCtrlHandlerExW(LPCWSTR lpServiceName, LPHANDLER_FUNCTION_EX lpHandlerProc, LPVOID lpContext);
__attribute__((dllimport)) WINBOOL SetServiceObjectSecurity(SC_HANDLE hService, SECURITY_INFORMATION dwSecurityInformation, PSECURITY_DESCRIPTOR lpSecurityDescriptor);
__attribute__((dllimport)) WINBOOL SetServiceStatus(SERVICE_STATUS_HANDLE hServiceStatus, LPSERVICE_STATUS lpServiceStatus);
__attribute__((dllimport)) WINBOOL StartServiceCtrlDispatcherA(const SERVICE_TABLE_ENTRYA *lpServiceStartTable);
__attribute__((dllimport)) WINBOOL StartServiceCtrlDispatcherW(const SERVICE_TABLE_ENTRYW *lpServiceStartTable);
__attribute__((dllimport)) WINBOOL StartServiceA(SC_HANDLE hService, DWORD dwNumServiceArgs, LPCSTR *lpServiceArgVectors);
__attribute__((dllimport)) WINBOOL StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs, LPCWSTR *lpServiceArgVectors);
__attribute__((dllimport)) WINBOOL UnlockServiceDatabase(SC_LOCK ScLock);
typedef void (*PFN_SC_NOTIFY_CALLBACK)(
PVOID pParameter);
typedef struct _SERVICE_CONTROL_STATUS_REASON_PARAMSA
{
DWORD dwReason;
LPSTR pszComment;
SERVICE_STATUS_PROCESS ServiceStatus;
} SERVICE_CONTROL_STATUS_REASON_PARAMSA, *PSERVICE_CONTROL_STATUS_REASON_PARAMSA;
typedef struct _SERVICE_CONTROL_STATUS_REASON_PARAMSW
{
DWORD dwReason;
LPWSTR pszComment;
SERVICE_STATUS_PROCESS ServiceStatus;
} SERVICE_CONTROL_STATUS_REASON_PARAMSW, *PSERVICE_CONTROL_STATUS_REASON_PARAMSW;
typedef SERVICE_CONTROL_STATUS_REASON_PARAMSW SERVICE_CONTROL_STATUS_REASON_PARAMS;
typedef PSERVICE_CONTROL_STATUS_REASON_PARAMSW PSERVICE_CONTROL_STATUS_REASON_PARAMS;
typedef struct _SERVICE_NOTIFYA
{
DWORD dwVersion;
PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback;
PVOID pContext;
DWORD dwNotificationStatus;
SERVICE_STATUS_PROCESS ServiceStatus;
DWORD dwNotificationTriggered;
LPSTR pszServiceNames;
} SERVICE_NOTIFYA, *PSERVICE_NOTIFYA;
typedef struct _SERVICE_NOTIFYW
{
DWORD dwVersion;
PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback;
PVOID pContext;
DWORD dwNotificationStatus;
SERVICE_STATUS_PROCESS ServiceStatus;
DWORD dwNotificationTriggered;
LPWSTR pszServiceNames;
} SERVICE_NOTIFYW, *PSERVICE_NOTIFYW;
typedef SERVICE_NOTIFYW SERVICE_NOTIFY;
typedef PSERVICE_NOTIFYW PSERVICE_NOTIFY;
typedef struct _SERVICE_DELAYED_AUTO_START_INFO
{
WINBOOL fDelayedAutostart;
} SERVICE_DELAYED_AUTO_START_INFO, *LPSERVICE_DELAYED_AUTO_START_INFO;
typedef struct _SERVICE_FAILURE_ACTIONS_FLAG
{
WINBOOL fFailureActionsOnNonCrashFailures;
} SERVICE_FAILURE_ACTIONS_FLAG, *LPSERVICE_FAILURE_ACTIONS_FLAG;
typedef struct _SERVICE_PRESHUTDOWN_INFO
{
DWORD dwPreshutdownTimeout;
} SERVICE_PRESHUTDOWN_INFO, *LPSERVICE_PRESHUTDOWN_INFO;
typedef struct _SERVICE_REQUIRED_PRIVILEGES_INFOA
{
LPSTR pmszRequiredPrivileges;
} SERVICE_REQUIRED_PRIVILEGES_INFOA, *LPSERVICE_REQUIRED_PRIVILEGES_INFOA;
typedef struct _SERVICE_REQUIRED_PRIVILEGES_INFOW
{
LPWSTR pmszRequiredPrivileges;
} SERVICE_REQUIRED_PRIVILEGES_INFOW, *LPSERVICE_REQUIRED_PRIVILEGES_INFOW;
typedef SERVICE_REQUIRED_PRIVILEGES_INFOW SERVICE_REQUIRED_PRIVILEGES_INFO;
typedef struct _SERVICE_SID_INFO
{
DWORD dwServiceSidType;
} SERVICE_SID_INFO, *LPSERVICE_SID_INFO;
__attribute__((dllimport)) WINBOOL ControlServiceExA(
SC_HANDLE hService,
DWORD dwControl,
DWORD dwInfoLevel,
PVOID pControlParams);
__attribute__((dllimport)) WINBOOL ControlServiceExW(
SC_HANDLE hService,
DWORD dwControl,
DWORD dwInfoLevel,
PVOID pControlParams);
DWORD NotifyServiceStatusChangeA(
SC_HANDLE hService,
DWORD dwNotifyMask,
PSERVICE_NOTIFYA pNotifyBuffer);
DWORD NotifyServiceStatusChangeW(
SC_HANDLE hService,
DWORD dwNotifyMask,
PSERVICE_NOTIFYW pNotifyBuffer);
typedef struct _MODEMDEVCAPS
{
DWORD 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;
BYTE abVariablePortion[1];
} MODEMDEVCAPS, *PMODEMDEVCAPS, *LPMODEMDEVCAPS;
typedef struct _MODEMSETTINGS
{
DWORD dwActualSize;
DWORD dwRequiredSize;
DWORD dwDevSpecificOffset;
DWORD dwDevSpecificSize;
DWORD dwCallSetupFailTimer;
DWORD dwInactivityTimeout;
DWORD dwSpeakerVolume;
DWORD dwSpeakerMode;
DWORD dwPreferredModemOptions;
DWORD dwNegotiatedModemOptions;
DWORD dwNegotiatedDCERate;
BYTE abVariablePortion[1];
} MODEMSETTINGS, *PMODEMSETTINGS, *LPMODEMSETTINGS;
struct HIMC__
{
int unused;
};
typedef struct HIMC__ *HIMC;
struct HIMCC__
{
int unused;
};
typedef struct HIMCC__ *HIMCC;
typedef HKL *LPHKL;
typedef UINT *LPUINT;
typedef struct tagCOMPOSITIONFORM
{
DWORD dwStyle;
POINT ptCurrentPos;
RECT rcArea;
} COMPOSITIONFORM, *PCOMPOSITIONFORM, *NPCOMPOSITIONFORM, *LPCOMPOSITIONFORM;
typedef struct tagCANDIDATEFORM
{
DWORD dwIndex;
DWORD dwStyle;
POINT ptCurrentPos;
RECT rcArea;
} CANDIDATEFORM, *PCANDIDATEFORM, *NPCANDIDATEFORM, *LPCANDIDATEFORM;
typedef struct tagCANDIDATELIST
{
DWORD dwSize;
DWORD dwStyle;
DWORD dwCount;
DWORD dwSelection;
DWORD dwPageStart;
DWORD dwPageSize;
DWORD dwOffset[1];
} CANDIDATELIST, *PCANDIDATELIST, *NPCANDIDATELIST, *LPCANDIDATELIST;
typedef struct tagREGISTERWORDA
{
LPSTR lpReading;
LPSTR lpWord;
} REGISTERWORDA, *PREGISTERWORDA, *NPREGISTERWORDA, *LPREGISTERWORDA;
typedef struct tagREGISTERWORDW
{
LPWSTR lpReading;
LPWSTR lpWord;
} REGISTERWORDW, *PREGISTERWORDW, *NPREGISTERWORDW, *LPREGISTERWORDW;
typedef REGISTERWORDW REGISTERWORD;
typedef PREGISTERWORDW PREGISTERWORD;
typedef NPREGISTERWORDW NPREGISTERWORD;
typedef LPREGISTERWORDW LPREGISTERWORD;
typedef struct tagRECONVERTSTRING
{
DWORD dwSize;
DWORD dwVersion;
DWORD dwStrLen;
DWORD dwStrOffset;
DWORD dwCompStrLen;
DWORD dwCompStrOffset;
DWORD dwTargetStrLen;
DWORD dwTargetStrOffset;
} RECONVERTSTRING, *PRECONVERTSTRING, *NPRECONVERTSTRING, *LPRECONVERTSTRING;
typedef struct tagSTYLEBUFA
{
DWORD dwStyle;
CHAR szDescription[32];
} STYLEBUFA, *PSTYLEBUFA, *NPSTYLEBUFA, *LPSTYLEBUFA;
typedef struct tagSTYLEBUFW
{
DWORD dwStyle;
WCHAR szDescription[32];
} STYLEBUFW, *PSTYLEBUFW, *NPSTYLEBUFW, *LPSTYLEBUFW;
typedef STYLEBUFW STYLEBUF;
typedef PSTYLEBUFW PSTYLEBUF;
typedef NPSTYLEBUFW NPSTYLEBUF;
typedef LPSTYLEBUFW LPSTYLEBUF;
typedef struct tagIMEMENUITEMINFOA
{
UINT cbSize;
UINT fType;
UINT fState;
UINT wID;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
DWORD dwItemData;
CHAR szString[80];
HBITMAP hbmpItem;
} IMEMENUITEMINFOA, *PIMEMENUITEMINFOA, *NPIMEMENUITEMINFOA, *LPIMEMENUITEMINFOA;
typedef struct tagIMEMENUITEMINFOW
{
UINT cbSize;
UINT fType;
UINT fState;
UINT wID;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
DWORD dwItemData;
WCHAR szString[80];
HBITMAP hbmpItem;
} IMEMENUITEMINFOW, *PIMEMENUITEMINFOW, *NPIMEMENUITEMINFOW, *LPIMEMENUITEMINFOW;
typedef IMEMENUITEMINFOW IMEMENUITEMINFO;
typedef PIMEMENUITEMINFOW PIMEMENUITEMINFO;
typedef NPIMEMENUITEMINFOW NPIMEMENUITEMINFO;
typedef LPIMEMENUITEMINFOW LPIMEMENUITEMINFO;
typedef struct tagIMECHARPOSITION
{
DWORD dwSize;
DWORD dwCharPos;
POINT pt;
UINT cLineHeight;
RECT rcDocument;
} IMECHARPOSITION, *PIMECHARPOSITION, *NPIMECHARPOSITION, *LPIMECHARPOSITION;
typedef WINBOOL (*IMCENUMPROC)(HIMC, LPARAM);
HKL ImmInstallIMEA(LPCSTR lpszIMEFileName, LPCSTR lpszLayoutText);
HKL ImmInstallIMEW(LPCWSTR lpszIMEFileName, LPCWSTR lpszLayoutText);
HWND ImmGetDefaultIMEWnd(HWND);
UINT ImmGetDescriptionA(HKL, LPSTR, UINT uBufLen);
UINT ImmGetDescriptionW(HKL, LPWSTR, UINT uBufLen);
UINT ImmGetIMEFileNameA(HKL, LPSTR, UINT uBufLen);
UINT ImmGetIMEFileNameW(HKL, LPWSTR, UINT uBufLen);
DWORD ImmGetProperty(HKL, DWORD);
WINBOOL ImmIsIME(HKL);
WINBOOL ImmSimulateHotKey(HWND, DWORD);
HIMC ImmCreateContext(void);
WINBOOL ImmDestroyContext(HIMC);
HIMC ImmGetContext(HWND);
WINBOOL ImmReleaseContext(HWND, HIMC);
HIMC ImmAssociateContext(HWND, HIMC);
WINBOOL ImmAssociateContextEx(HWND, HIMC, DWORD);
LONG ImmGetCompositionStringA(HIMC, DWORD, LPVOID, DWORD);
LONG ImmGetCompositionStringW(HIMC, DWORD, LPVOID, DWORD);
WINBOOL ImmSetCompositionStringA(HIMC, DWORD dwIndex, LPVOID lpComp, DWORD, LPVOID lpRead, DWORD);
WINBOOL ImmSetCompositionStringW(HIMC, DWORD dwIndex, LPVOID lpComp, DWORD, LPVOID lpRead, DWORD);
DWORD ImmGetCandidateListCountA(HIMC, LPDWORD lpdwListCount);
DWORD ImmGetCandidateListCountW(HIMC, LPDWORD lpdwListCount);
DWORD ImmGetCandidateListA(HIMC, DWORD deIndex, LPCANDIDATELIST, DWORD dwBufLen);
DWORD ImmGetCandidateListW(HIMC, DWORD deIndex, LPCANDIDATELIST, DWORD dwBufLen);
DWORD ImmGetGuideLineA(HIMC, DWORD dwIndex, LPSTR, DWORD dwBufLen);
DWORD ImmGetGuideLineW(HIMC, DWORD dwIndex, LPWSTR, DWORD dwBufLen);
WINBOOL ImmGetConversionStatus(HIMC, LPDWORD, LPDWORD);
WINBOOL ImmSetConversionStatus(HIMC, DWORD, DWORD);
WINBOOL ImmGetOpenStatus(HIMC);
WINBOOL ImmSetOpenStatus(HIMC, WINBOOL);
WINBOOL ImmGetCompositionFontA(HIMC, LPLOGFONTA);
WINBOOL ImmGetCompositionFontW(HIMC, LPLOGFONTW);
WINBOOL ImmSetCompositionFontA(HIMC, LPLOGFONTA);
WINBOOL ImmSetCompositionFontW(HIMC, LPLOGFONTW);
typedef int (*REGISTERWORDENUMPROCA)(LPCSTR, DWORD, LPCSTR, LPVOID);
typedef int (*REGISTERWORDENUMPROCW)(LPCWSTR, DWORD, LPCWSTR, LPVOID);
WINBOOL ImmConfigureIMEA(HKL, HWND, DWORD, LPVOID);
WINBOOL ImmConfigureIMEW(HKL, HWND, DWORD, LPVOID);
LRESULT ImmEscapeA(HKL, HIMC, UINT, LPVOID);
LRESULT ImmEscapeW(HKL, HIMC, UINT, LPVOID);
DWORD ImmGetConversionListA(HKL, HIMC, LPCSTR, LPCANDIDATELIST, DWORD dwBufLen, UINT uFlag);
DWORD ImmGetConversionListW(HKL, HIMC, LPCWSTR, LPCANDIDATELIST, DWORD dwBufLen, UINT uFlag);
WINBOOL ImmNotifyIME(HIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue);
WINBOOL ImmGetStatusWindowPos(HIMC, LPPOINT);
WINBOOL ImmSetStatusWindowPos(HIMC, LPPOINT);
WINBOOL ImmGetCompositionWindow(HIMC, LPCOMPOSITIONFORM);
WINBOOL ImmSetCompositionWindow(HIMC, LPCOMPOSITIONFORM);
WINBOOL ImmGetCandidateWindow(HIMC, DWORD, LPCANDIDATEFORM);
WINBOOL ImmSetCandidateWindow(HIMC, LPCANDIDATEFORM);
WINBOOL ImmIsUIMessageA(HWND, UINT, WPARAM, LPARAM);
WINBOOL ImmIsUIMessageW(HWND, UINT, WPARAM, LPARAM);
UINT ImmGetVirtualKey(HWND);
WINBOOL ImmRegisterWordA(HKL, LPCSTR lpszReading, DWORD, LPCSTR lpszRegister);
WINBOOL ImmRegisterWordW(HKL, LPCWSTR lpszReading, DWORD, LPCWSTR lpszRegister);
WINBOOL ImmUnregisterWordA(HKL, LPCSTR lpszReading, DWORD, LPCSTR lpszUnregister);
WINBOOL ImmUnregisterWordW(HKL, LPCWSTR lpszReading, DWORD, LPCWSTR lpszUnregister);
UINT ImmGetRegisterWordStyleA(HKL, UINT nItem, LPSTYLEBUFA);
UINT ImmGetRegisterWordStyleW(HKL, UINT nItem, LPSTYLEBUFW);
UINT ImmEnumRegisterWordA(HKL, REGISTERWORDENUMPROCA, LPCSTR lpszReading, DWORD, LPCSTR lpszRegister, LPVOID);
UINT ImmEnumRegisterWordW(HKL, REGISTERWORDENUMPROCW, LPCWSTR lpszReading, DWORD, LPCWSTR lpszRegister, LPVOID);
WINBOOL ImmDisableIME(DWORD);
WINBOOL ImmEnumInputContext(DWORD idThread, IMCENUMPROC lpfn, LPARAM lParam);
DWORD ImmGetImeMenuItemsA(HIMC, DWORD, DWORD, LPIMEMENUITEMINFOA, LPIMEMENUITEMINFOA, DWORD);
DWORD ImmGetImeMenuItemsW(HIMC, DWORD, DWORD, LPIMEMENUITEMINFOW, LPIMEMENUITEMINFOW, DWORD);
WINBOOL ImmDisableTextFrameService(DWORD idThread);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment