Fixed a few more pointer to integer typecast issues for 64-bit
platforms.
This commit is contained in:
parent
45ece95e51
commit
ba41fe20bc
|
@ -59,7 +59,7 @@ static HWND create_updown_control (HWND hWndEdit)
|
||||||
NULL, NULL, hinst, NULL);
|
NULL, NULL, hinst, NULL);
|
||||||
assert (hWndUpDown);
|
assert (hWndUpDown);
|
||||||
/* set the buddy. */
|
/* set the buddy. */
|
||||||
SendMessage (hWndUpDown, UDM_SETBUDDY, (LONG)hWndEdit, 0L );
|
SendMessage (hWndUpDown, UDM_SETBUDDY, (WPARAM)hWndEdit, 0L );
|
||||||
/* set the range. */
|
/* set the range. */
|
||||||
SendMessage (hWndUpDown, UDM_SETRANGE, 0L, (LPARAM) MAKELONG(32000, 0));
|
SendMessage (hWndUpDown, UDM_SETRANGE, 0L, (LPARAM) MAKELONG(32000, 0));
|
||||||
/* maybe show it. */
|
/* maybe show it. */
|
||||||
|
|
|
@ -1820,7 +1820,7 @@ BOOL WINAPI EnumSystemLocalesA( LOCALE_ENUMPROCA lpfnLocaleEnum, DWORD dwFlags )
|
||||||
TRACE("(%p,%08lx)\n", lpfnLocaleEnum, dwFlags);
|
TRACE("(%p,%08lx)\n", lpfnLocaleEnum, dwFlags);
|
||||||
EnumResourceLanguagesA( kernel32_handle, (LPSTR)RT_STRING,
|
EnumResourceLanguagesA( kernel32_handle, (LPSTR)RT_STRING,
|
||||||
(LPCSTR)LOCALE_ILANGUAGE, enum_lang_proc_a,
|
(LPCSTR)LOCALE_ILANGUAGE, enum_lang_proc_a,
|
||||||
(LONG)lpfnLocaleEnum);
|
(LONG_PTR)lpfnLocaleEnum);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1835,7 +1835,7 @@ BOOL WINAPI EnumSystemLocalesW( LOCALE_ENUMPROCW lpfnLocaleEnum, DWORD dwFlags )
|
||||||
TRACE("(%p,%08lx)\n", lpfnLocaleEnum, dwFlags);
|
TRACE("(%p,%08lx)\n", lpfnLocaleEnum, dwFlags);
|
||||||
EnumResourceLanguagesW( kernel32_handle, (LPWSTR)RT_STRING,
|
EnumResourceLanguagesW( kernel32_handle, (LPWSTR)RT_STRING,
|
||||||
(LPCWSTR)LOCALE_ILANGUAGE, enum_lang_proc_w,
|
(LPCWSTR)LOCALE_ILANGUAGE, enum_lang_proc_w,
|
||||||
(LONG)lpfnLocaleEnum);
|
(LONG_PTR)lpfnLocaleEnum);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -941,7 +941,7 @@ FARPROC WINAPI GetProcAddress( HMODULE hModule, LPCSTR function )
|
||||||
nts = LdrGetProcedureAddress( hModule, &str, 0, (void**)&fp );
|
nts = LdrGetProcedureAddress( hModule, &str, 0, (void**)&fp );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
nts = LdrGetProcedureAddress( hModule, NULL, (DWORD)function, (void**)&fp );
|
nts = LdrGetProcedureAddress( hModule, NULL, LOWORD(function), (void**)&fp );
|
||||||
if (nts != STATUS_SUCCESS)
|
if (nts != STATUS_SUCCESS)
|
||||||
{
|
{
|
||||||
SetLastError( RtlNtStatusToDosError( nts ) );
|
SetLastError( RtlNtStatusToDosError( nts ) );
|
||||||
|
|
|
@ -202,7 +202,7 @@ static DWORD NE_FindNameTableId( NE_MODULE *pModule, LPCSTR typeId, LPCSTR resId
|
||||||
TRACE("NameTable entry: type=%04x id=%04x\n",
|
TRACE("NameTable entry: type=%04x id=%04x\n",
|
||||||
pTypeInfo->type_id, pNameInfo->id );
|
pTypeInfo->type_id, pNameInfo->id );
|
||||||
handle = LoadResource16( pModule->self,
|
handle = LoadResource16( pModule->self,
|
||||||
(HRSRC16)((int)pNameInfo - (int)pModule) );
|
(HRSRC16)((char *)pNameInfo - (char *)pModule) );
|
||||||
for(p = (WORD*)LockResource16(handle); p && *p; p = (WORD *)((char*)p+*p))
|
for(p = (WORD*)LockResource16(handle); p && *p; p = (WORD *)((char*)p+*p))
|
||||||
{
|
{
|
||||||
TRACE(" type=%04x '%s' id=%04x '%s'\n",
|
TRACE(" type=%04x '%s' id=%04x '%s'\n",
|
||||||
|
@ -226,7 +226,7 @@ static DWORD NE_FindNameTableId( NE_MODULE *pModule, LPCSTR typeId, LPCSTR resId
|
||||||
if (strcasecmp( resId, (char*)(p+3)+strlen((char*)(p+3))+1 )) continue;
|
if (strcasecmp( resId, (char*)(p+3)+strlen((char*)(p+3))+1 )) continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (HIWORD(resId) || (((DWORD)resId & ~0x8000) != p[2]))
|
else if (HIWORD(resId) || ((LOWORD(resId) & ~0x8000) != p[2]))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* If we get here, we've found the entry */
|
/* If we get here, we've found the entry */
|
||||||
|
@ -507,7 +507,7 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 )
|
||||||
while (nbItems)
|
while (nbItems)
|
||||||
{
|
{
|
||||||
/* align on DWORD boundary (32-bit only) */
|
/* align on DWORD boundary (32-bit only) */
|
||||||
dialog32 = (LPVOID)((((int)dialog32) + 3) & ~3);
|
dialog32 = (LPVOID)(((UINT_PTR)dialog32 + 3) & ~3);
|
||||||
|
|
||||||
if (dialogEx)
|
if (dialogEx)
|
||||||
{
|
{
|
||||||
|
@ -636,7 +636,7 @@ WORD WINAPI GetDialog32Size16( LPVOID dialog32 )
|
||||||
while (nbItems)
|
while (nbItems)
|
||||||
{
|
{
|
||||||
/* align on DWORD boundary */
|
/* align on DWORD boundary */
|
||||||
p = (LPVOID)((((int)p) + 3) & ~3);
|
p = (LPVOID)(((UINT_PTR)p + 3) & ~3);
|
||||||
|
|
||||||
if (dialogEx)
|
if (dialogEx)
|
||||||
{
|
{
|
||||||
|
@ -736,7 +736,7 @@ VOID WINAPI ConvertMenu32To16( LPVOID menu32, DWORD size, LPVOID menu16 )
|
||||||
menu32 = (LPWSTR)menu32 + strlenW( (LPWSTR)menu32 ) + 1;
|
menu32 = (LPWSTR)menu32 + strlenW( (LPWSTR)menu32 ) + 1;
|
||||||
|
|
||||||
/* align on DWORD boundary (32-bit only) */
|
/* align on DWORD boundary (32-bit only) */
|
||||||
menu32 = (LPVOID)((((int)menu32) + 3) & ~3);
|
menu32 = (LPVOID)(((UINT_PTR)menu32 + 3) & ~3);
|
||||||
|
|
||||||
/* If popup, transfer helpid */
|
/* If popup, transfer helpid */
|
||||||
if ( flags & 1)
|
if ( flags & 1)
|
||||||
|
@ -787,7 +787,7 @@ WORD WINAPI GetMenu32Size16( LPVOID menu32 )
|
||||||
p = (LPWSTR)p + strlenW( (LPWSTR)p ) + 1;
|
p = (LPWSTR)p + strlenW( (LPWSTR)p ) + 1;
|
||||||
|
|
||||||
/* align on DWORD boundary (32-bit only) */
|
/* align on DWORD boundary (32-bit only) */
|
||||||
p = (LPVOID)((((int)p) + 3) & ~3);
|
p = (LPVOID)(((UINT_PTR)p + 3) & ~3);
|
||||||
|
|
||||||
/* If popup, skip helpid */
|
/* If popup, skip helpid */
|
||||||
if ( flags & 1)
|
if ( flags & 1)
|
||||||
|
|
|
@ -481,7 +481,7 @@ SEGPTR WINAPI MapLS( LPCVOID ptr )
|
||||||
const void *base;
|
const void *base;
|
||||||
SEGPTR ret = 0;
|
SEGPTR ret = 0;
|
||||||
|
|
||||||
if (!HIWORD(ptr)) return (SEGPTR)ptr;
|
if (!HIWORD(ptr)) return (SEGPTR)LOWORD(ptr);
|
||||||
|
|
||||||
base = (const char *)ptr - ((unsigned int)ptr & 0x7fff);
|
base = (const char *)ptr - ((unsigned int)ptr & 0x7fff);
|
||||||
HeapLock( GetProcessHeap() );
|
HeapLock( GetProcessHeap() );
|
||||||
|
|
|
@ -55,7 +55,7 @@ typedef struct
|
||||||
INT16 y;
|
INT16 y;
|
||||||
INT16 cx;
|
INT16 cx;
|
||||||
INT16 cy;
|
INT16 cy;
|
||||||
UINT id;
|
UINT_PTR id;
|
||||||
LPCWSTR className;
|
LPCWSTR className;
|
||||||
LPCWSTR windowName;
|
LPCWSTR windowName;
|
||||||
LPCVOID data;
|
LPCVOID data;
|
||||||
|
@ -244,7 +244,7 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info,
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
/* Next control is on dword boundary */
|
/* Next control is on dword boundary */
|
||||||
return (const WORD *)((((int)p) + 3) & ~3);
|
return (const WORD *)(((UINT_PTR)p + 3) & ~3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -446,7 +446,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
|
||||||
}
|
}
|
||||||
|
|
||||||
/* First control is on dword boundary */
|
/* First control is on dword boundary */
|
||||||
return (LPCSTR)((((int)p) + 3) & ~3);
|
return (LPCSTR)(((UINT_PTR)p + 3) & ~3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -73,8 +73,8 @@ typedef struct {
|
||||||
HBITMAP hCheckBit; /* Bitmap when checked. */
|
HBITMAP hCheckBit; /* Bitmap when checked. */
|
||||||
HBITMAP hUnCheckBit; /* Bitmap when unchecked. */
|
HBITMAP hUnCheckBit; /* Bitmap when unchecked. */
|
||||||
LPWSTR text; /* Item text or bitmap handle. */
|
LPWSTR text; /* Item text or bitmap handle. */
|
||||||
DWORD dwItemData; /* Application defined. */
|
ULONG_PTR dwItemData; /* Application defined. */
|
||||||
DWORD dwTypeData; /* depends on fMask */
|
LPWSTR dwTypeData; /* depends on fMask */
|
||||||
HBITMAP hbmpItem; /* bitmap in win98 style menus */
|
HBITMAP hbmpItem; /* bitmap in win98 style menus */
|
||||||
/* ----------- Wine stuff ----------- */
|
/* ----------- Wine stuff ----------- */
|
||||||
RECT rect; /* Item area (relative to menu window) */
|
RECT rect; /* Item area (relative to menu window) */
|
||||||
|
@ -863,7 +863,7 @@ static void MENU_CalcItemSize( HDC hdc, MENUITEM *lpitem, HWND hwndOwner,
|
||||||
mis.CtlType = ODT_MENU;
|
mis.CtlType = ODT_MENU;
|
||||||
mis.CtlID = 0;
|
mis.CtlID = 0;
|
||||||
mis.itemID = lpitem->wID;
|
mis.itemID = lpitem->wID;
|
||||||
mis.itemData = (DWORD)lpitem->dwItemData;
|
mis.itemData = lpitem->dwItemData;
|
||||||
mis.itemHeight = ODitemheight;
|
mis.itemHeight = ODitemheight;
|
||||||
mis.itemWidth = 0;
|
mis.itemWidth = 0;
|
||||||
SendMessageW( hwndOwner, WM_MEASUREITEM, 0, (LPARAM)&mis );
|
SendMessageW( hwndOwner, WM_MEASUREITEM, 0, (LPARAM)&mis );
|
||||||
|
@ -1188,7 +1188,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
|
||||||
dis.CtlType = ODT_MENU;
|
dis.CtlType = ODT_MENU;
|
||||||
dis.CtlID = 0;
|
dis.CtlID = 0;
|
||||||
dis.itemID = lpitem->wID;
|
dis.itemID = lpitem->wID;
|
||||||
dis.itemData = (DWORD)lpitem->dwItemData;
|
dis.itemData = lpitem->dwItemData;
|
||||||
dis.itemState = 0;
|
dis.itemState = 0;
|
||||||
if (lpitem->fState & MF_CHECKED) dis.itemState |= ODS_CHECKED;
|
if (lpitem->fState & MF_CHECKED) dis.itemState |= ODS_CHECKED;
|
||||||
if (lpitem->fState & MF_GRAYED) dis.itemState |= ODS_GRAYED|ODS_DISABLED;
|
if (lpitem->fState & MF_GRAYED) dis.itemState |= ODS_GRAYED|ODS_DISABLED;
|
||||||
|
@ -1777,7 +1777,7 @@ static BOOL MENU_SetItemData( MENUITEM *item, UINT flags, UINT_PTR id,
|
||||||
else item->text = NULL;
|
else item->text = NULL;
|
||||||
|
|
||||||
if (flags & MF_OWNERDRAW)
|
if (flags & MF_OWNERDRAW)
|
||||||
item->dwItemData = (DWORD)str;
|
item->dwItemData = (DWORD_PTR)str;
|
||||||
else
|
else
|
||||||
item->dwItemData = 0;
|
item->dwItemData = 0;
|
||||||
|
|
||||||
|
@ -1901,8 +1901,8 @@ static LPCSTR MENU_ParseResource( LPCSTR res, HMENU hMenu, BOOL unicode )
|
||||||
if (!hSubMenu) return NULL;
|
if (!hSubMenu) return NULL;
|
||||||
if (!(res = MENU_ParseResource( res, hSubMenu, unicode )))
|
if (!(res = MENU_ParseResource( res, hSubMenu, unicode )))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (!unicode) AppendMenuA( hMenu, flags, (UINT)hSubMenu, str );
|
if (!unicode) AppendMenuA( hMenu, flags, (UINT_PTR)hSubMenu, str );
|
||||||
else AppendMenuW( hMenu, flags, (UINT)hSubMenu, (LPCWSTR)str );
|
else AppendMenuW( hMenu, flags, (UINT_PTR)hSubMenu, (LPCWSTR)str );
|
||||||
}
|
}
|
||||||
else /* Not a popup */
|
else /* Not a popup */
|
||||||
{
|
{
|
||||||
|
@ -1938,11 +1938,11 @@ static LPCSTR MENUEX_ParseResource( LPCSTR res, HMENU hMenu)
|
||||||
resinfo = GET_WORD(res); /* FIXME: for 16-bit apps this is a byte. */
|
resinfo = GET_WORD(res); /* FIXME: for 16-bit apps this is a byte. */
|
||||||
res += sizeof(WORD);
|
res += sizeof(WORD);
|
||||||
/* Align the text on a word boundary. */
|
/* Align the text on a word boundary. */
|
||||||
res += (~((int)res - 1)) & 1;
|
res += (~((UINT_PTR)res - 1)) & 1;
|
||||||
mii.dwTypeData = (LPWSTR) res;
|
mii.dwTypeData = (LPWSTR) res;
|
||||||
res += (1 + strlenW(mii.dwTypeData)) * sizeof(WCHAR);
|
res += (1 + strlenW(mii.dwTypeData)) * sizeof(WCHAR);
|
||||||
/* Align the following fields on a dword boundary. */
|
/* Align the following fields on a dword boundary. */
|
||||||
res += (~((int)res - 1)) & 3;
|
res += (~((UINT_PTR)res - 1)) & 3;
|
||||||
|
|
||||||
TRACE("Menu item: [%08x,%08x,%04x,%04x,%s]\n",
|
TRACE("Menu item: [%08x,%08x,%04x,%04x,%s]\n",
|
||||||
mii.fType, mii.fState, mii.wID, resinfo, debugstr_w(mii.dwTypeData));
|
mii.fType, mii.fState, mii.wID, resinfo, debugstr_w(mii.dwTypeData));
|
||||||
|
@ -3425,8 +3425,8 @@ BOOL WINAPI InsertMenuW( HMENU hMenu, UINT pos, UINT flags,
|
||||||
if (IS_STRING_ITEM(flags) && str)
|
if (IS_STRING_ITEM(flags) && str)
|
||||||
TRACE("hMenu %p, pos %d, flags %08x, id %04x, str %s\n",
|
TRACE("hMenu %p, pos %d, flags %08x, id %04x, str %s\n",
|
||||||
hMenu, pos, flags, id, debugstr_w(str) );
|
hMenu, pos, flags, id, debugstr_w(str) );
|
||||||
else TRACE("hMenu %p, pos %d, flags %08x, id %04x, str %08lx (not a string)\n",
|
else TRACE("hMenu %p, pos %d, flags %08x, id %04x, str %p (not a string)\n",
|
||||||
hMenu, pos, flags, id, (DWORD)str );
|
hMenu, pos, flags, id, str );
|
||||||
|
|
||||||
if (!(item = MENU_InsertItem( hMenu, pos, flags ))) return FALSE;
|
if (!(item = MENU_InsertItem( hMenu, pos, flags ))) return FALSE;
|
||||||
|
|
||||||
|
@ -3552,7 +3552,7 @@ BOOL WINAPI ModifyMenuW( HMENU hMenu, UINT pos, UINT flags,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TRACE("%p %d %04x %04x %08lx\n", hMenu, pos, flags, id, (DWORD)str );
|
TRACE("%p %d %04x %04x %p\n", hMenu, pos, flags, id, str );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(item = MENU_FindItem( &hMenu, &pos, flags ))) return FALSE;
|
if (!(item = MENU_FindItem( &hMenu, &pos, flags ))) return FALSE;
|
||||||
|
|
|
@ -1280,7 +1280,7 @@ static BOOL post_dde_message( DWORD dest_tid, struct packed_message *data, const
|
||||||
{
|
{
|
||||||
void* ptr = NULL;
|
void* ptr = NULL;
|
||||||
int size = 0;
|
int size = 0;
|
||||||
UINT uiLo, uiHi;
|
UINT_PTR uiLo, uiHi;
|
||||||
LPARAM lp = 0;
|
LPARAM lp = 0;
|
||||||
HGLOBAL hunlock = 0;
|
HGLOBAL hunlock = 0;
|
||||||
int i;
|
int i;
|
||||||
|
@ -1399,7 +1399,7 @@ static BOOL post_dde_message( DWORD dest_tid, struct packed_message *data, const
|
||||||
static BOOL unpack_dde_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
|
static BOOL unpack_dde_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
|
||||||
void **buffer, size_t size )
|
void **buffer, size_t size )
|
||||||
{
|
{
|
||||||
UINT uiLo, uiHi;
|
UINT_PTR uiLo, uiHi;
|
||||||
HGLOBAL hMem = 0;
|
HGLOBAL hMem = 0;
|
||||||
void* ptr;
|
void* ptr;
|
||||||
|
|
||||||
|
@ -1413,7 +1413,7 @@ static BOOL unpack_dde_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM
|
||||||
if (!buffer || !*buffer) return FALSE;
|
if (!buffer || !*buffer) return FALSE;
|
||||||
uiLo = *lparam;
|
uiLo = *lparam;
|
||||||
memcpy( &hMem, *buffer, size );
|
memcpy( &hMem, *buffer, size );
|
||||||
uiHi = (UINT)hMem;
|
uiHi = (UINT_PTR)hMem;
|
||||||
TRACE("recv dde-ack %x mem=%x[%lx]\n", uiLo, uiHi, GlobalSize( hMem ));
|
TRACE("recv dde-ack %x mem=%x[%lx]\n", uiLo, uiHi, GlobalSize( hMem ));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1445,7 +1445,7 @@ static BOOL unpack_dde_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uiLo = (UINT)hMem;
|
uiLo = (UINT_PTR)hMem;
|
||||||
|
|
||||||
*lparam = PackDDElParam( message, uiLo, uiHi );
|
*lparam = PackDDElParam( message, uiLo, uiHi );
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -2434,7 +2434,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
|
||||||
case WM_DDE_DATA:
|
case WM_DDE_DATA:
|
||||||
case WM_DDE_POKE:
|
case WM_DDE_POKE:
|
||||||
{
|
{
|
||||||
UINT lo32, hi;
|
UINT_PTR lo32, hi;
|
||||||
HANDLE16 lo16 = 0;
|
HANDLE16 lo16 = 0;
|
||||||
|
|
||||||
*pwparam16 = HWND_16((HWND)wParam32);
|
*pwparam16 = HWND_16((HWND)wParam32);
|
||||||
|
@ -2446,7 +2446,7 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
|
||||||
return 0; /* FIXME don't know how to free allocated memory (handle) !! */
|
return 0; /* FIXME don't know how to free allocated memory (handle) !! */
|
||||||
case WM_DDE_ACK:
|
case WM_DDE_ACK:
|
||||||
{
|
{
|
||||||
UINT lo, hi;
|
UINT_PTR lo, hi;
|
||||||
int flag = 0;
|
int flag = 0;
|
||||||
char buf[2];
|
char buf[2];
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ typedef struct tagWND
|
||||||
DWORD dwStyle; /* Window style (from CreateWindow) */
|
DWORD dwStyle; /* Window style (from CreateWindow) */
|
||||||
DWORD dwExStyle; /* Extended style (from CreateWindowEx) */
|
DWORD dwExStyle; /* Extended style (from CreateWindowEx) */
|
||||||
DWORD clsStyle; /* Class style at window creation */
|
DWORD clsStyle; /* Class style at window creation */
|
||||||
UINT wIDmenu; /* ID or hmenu (from CreateWindow) */
|
UINT_PTR wIDmenu; /* ID or hmenu (from CreateWindow) */
|
||||||
DWORD helpContext; /* Help context ID */
|
DWORD helpContext; /* Help context ID */
|
||||||
UINT flags; /* Misc. flags (see below) */
|
UINT flags; /* Misc. flags (see below) */
|
||||||
HMENU hSysMenu; /* window's copy of System Menu */
|
HMENU hSysMenu; /* window's copy of System Menu */
|
||||||
|
|
|
@ -545,7 +545,7 @@ typedef struct _MEMORY_BASIC_INFORMATION
|
||||||
#define MAXDWORD 0xffffffff
|
#define MAXDWORD 0xffffffff
|
||||||
|
|
||||||
#define FIELD_OFFSET(type, field) \
|
#define FIELD_OFFSET(type, field) \
|
||||||
((LONG)(INT)&(((type *)0)->field))
|
((LONG)(INT_PTR)&(((type *)0)->field))
|
||||||
|
|
||||||
#define CONTAINING_RECORD(address, type, field) \
|
#define CONTAINING_RECORD(address, type, field) \
|
||||||
((type *)((PCHAR)(address) - (PCHAR)(&((type *)0)->field)))
|
((type *)((PCHAR)(address) - (PCHAR)(&((type *)0)->field)))
|
||||||
|
|
Loading…
Reference in New Issue