+#endif
+
+/* Copied from PNGhandler for coompilation with MingW32, RR */
+
+#ifndef GlobalAllocPtr
+#define GlobalPtrHandle(lp) \
+ ((HGLOBAL)GlobalHandle(lp))
+
+#define GlobalLockPtr(lp) \
+ ((BOOL)GlobalLock(GlobalPtrHandle(lp)))
+#define GlobalUnlockPtr(lp) \
+ GlobalUnlock(GlobalPtrHandle(lp))
+
+#define GlobalAllocPtr(flags, cb) \
+ (GlobalLock(GlobalAlloc((flags), (cb))))
+#define GlobalReAllocPtr(lp, cbNew, flags) \
+ (GlobalUnlockPtr(lp), GlobalLock(GlobalReAlloc(GlobalPtrHandle(lp) , (cbNew), (flags))))
+#define GlobalFreePtr(lp) \
+ (GlobalUnlockPtr(lp), (BOOL)GlobalFree(GlobalPtrHandle(lp)))
+#endif