#include <ntifs.h>
#include <ntddmou.h>
#include <ndk/exfuncs.h>
+#include <ndk/iofuncs.h>
#include <ndk/kdfuncs.h>
#include <ndk/kefuncs.h>
#include <ndk/mmfuncs.h>
#include <math.h>
#include <intrin.h>
+// Needed because windef.h messes up CDECL for whatever
+#undef CDECL
+#define CDECL __cdecl
+
/* Avoid type casting, by defining RECT to RECTL */
#define RECT RECTL
#define PRECT PRECTL
/* SEH support with PSEH */
#include <pseh/pseh2.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Public Win32K headers */
-#include <include/callback.h>
-#include <include/ntusrtyp.h>
-#include <include/ntuser.h>
#include <include/ntgdityp.h>
-#include <include/ntgdibad.h>
-#include <include/ntgdihdl.h>
#include <ntgdi.h>
+#include <include/ntgdihdl.h>
+#include <include/ntgdibad.h>
+
+#ifndef __cplusplus
+#include <include/ntusrtyp.h>
+#include <include/ntuser.h>
+#include <include/callback.h>
+#endif // __cplusplus
/* Undocumented user definitions */
#include <undocuser.h>
#include <ft2build.h>
#include FT_FREETYPE_H
+#define InterlockedIncrementUL(Value) InterlockedIncrement((PLONG)Value)
+#define InterlockedDecrementUL(Value) InterlockedDecrement((PLONG)Value)
+
/* Internal Win32K header */
#include "win32kp.h"
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* __W32K_H */