From 8582b28749fb51cb042a0565806d8b3f493ccc57 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Wed, 10 Jan 2001 22:42:35 +0000 Subject: [PATCH] For the Global*Ptr* set of macros, replace the 16bit version with their 32 bit equiv. --- include/windowsx.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/include/windowsx.h b/include/windowsx.h index 4ba4939a272..eae33d1e58b 100644 --- a/include/windowsx.h +++ b/include/windowsx.h @@ -93,14 +93,13 @@ extern "C" { /****** KERNEL Macro APIs ******************************************************/ -#define GetInstanceModule(hInst) (GetModuleHandle((LPCSTR)MAKELP(0, hInst))) -#define GlobalPtrHandle(lp) ((HGLOBAL)LOWORD(GlobalHandle(SELECTOROF(lp)))) -#define GlobalLockPtr(lp) ((BOOL)SELECTOROF(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))) +#define GetInstanceModule(hInst) (HMODULE)(hInst) +#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)(ULONG_PTR)GlobalFree(GlobalPtrHandle(lp))) /****** USER Macro APIs ******************************************************/