Define ULONG_PTR for older SDK If compiling with _WIN32_WINNT target prior 0x0500 then SDK does not define ULONG_PTR type. Such systems are only 32bit so define it explicitly to 32bit type ULONG.
diff --git a/src/dlfcn.c b/src/dlfcn.c
index 394ee19..c4f410d 100644
--- a/src/dlfcn.c
+++ b/src/dlfcn.c
@@ -33,6 +33,11 @@
#include <stdio.h>
#include <stdlib.h>
+/* Older versions do not have this type */
+#if _WIN32_WINNT < 0x0500
+typedef ULONG ULONG_PTR;
+#endif
+
/* Older SDK versions do not have these macros */
#ifndef GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
#define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x4