/* Handle macros */
#define GDI_HANDLE_CREATE(i, t) \
- ((HANDLE)(((i) & GDI_HANDLE_INDEX_MASK) | ((t) << 16)))
+ ((HANDLE)(((ULONG_PTR)(i) & GDI_HANDLE_INDEX_MASK) | ((t) << 16)))
#define GDI_HANDLE_GET_INDEX(h) \
(((ULONG_PTR)(h)) & GDI_HANDLE_INDEX_MASK)
(ProcessId == (HANDLE)2) )
{
if (ProcessId == (HANDLE)1 || ProcessId == (HANDLE)2 ||
- ((LONG)ProcessId & 0xfffc) == ((ULONG)pEntry->ProcessId & 0xfffc))
+ ((LONG_PTR)ProcessId & 0xfffc) == ((LONG_PTR)pEntry->ProcessId & 0xfffc))
{
handle = GDI_HANDLE_CREATE(i, pEntry->Type);
index = ListView_GetItemCount(hHandleListCtrl);
wsprintf(strText, L"%d", i);
ListView_SetItemText(hHandleListCtrl, index, 1, strText);
- wsprintf(strText, L"%#08x", handle);
+ wsprintf(strText, L"%#08Ix", handle);
ListView_SetItemText(hHandleListCtrl, index, 2, strText);
str2 = GetTypeName(handle);
ListView_SetItemText(hHandleListCtrl, index, 3, str2);
- wsprintf(strText, L"%#08x", (UINT)pEntry->ProcessId);
+ wsprintf(strText, L"%#08Ix", (UINT_PTR)pEntry->ProcessId);
ListView_SetItemText(hHandleListCtrl, index, 4, strText);
- wsprintf(strText, L"%#08x", (UINT)pEntry->KernelData);
+ wsprintf(strText, L"%#08Ix", (UINT_PTR)pEntry->KernelData);
ListView_SetItemText(hHandleListCtrl, index, 5, strText);
- wsprintf(strText, L"%#08x", (UINT)pEntry->UserData);
+ wsprintf(strText, L"%#08Ix", (UINT_PTR)pEntry->UserData);
ListView_SetItemText(hHandleListCtrl, index, 6, strText);
wsprintf(strText, L"%#08x", (UINT)pEntry->Type);
ULONG SymbolSize,
PVOID UserContext)
{
- if ((UINT)UserContext == -1)
+ if ((INT_PTR)UserContext == -1)
{
printf("%s ", pSymInfo->Name);
}
{
if (!bX64)
{
- printf("%s@%d ", pSymInfo->Name, (UINT)UserContext);
+ printf("%s@%Iu ", pSymInfo->Name, (UINT_PTR)UserContext);
}
else
{
- printf("%s <+ %d> ", pSymInfo->Name, (UINT)UserContext);
+ printf("%s <+ %Iu> ", pSymInfo->Name, (UINT_PTR)UserContext);
}
}
return TRUE;
for (i = 0; i < dwServiceLimit; i++)
{
printf("0x%x:", i+0x1000);
- SymEnumSymbolsForAddr(hProcess, (DWORD64)pdwEntries32[i], EnumSymbolsProc, (PVOID)(DWORD)pW32pArgumentTable[i]);
+ SymEnumSymbolsForAddr(hProcess, (DWORD64)pdwEntries32[i], EnumSymbolsProc, (PVOID)(DWORD_PTR)pW32pArgumentTable[i]);
printf("\n");
}
}
for (i = 0; i < dwServiceLimit; i++)
{
printf("0x%x:", i+0x1000);
- SymEnumSymbolsForAddr(hProcess, (DWORD64)pdwEntries64[i], EnumSymbolsProc, (PVOID)(DWORD)pW32pArgumentTable[i]);
+ SymEnumSymbolsForAddr(hProcess, (DWORD64)pdwEntries64[i], EnumSymbolsProc, (PVOID)(DWORD_PTR)pW32pArgumentTable[i]);
printf("\n");
}
}
else
Info->FontWndInfo->LastEditGlyphWnd = Info->PrevEditGlyphWnd;
- SetWindowLongW(Info->hSelf, GWLP_USERDATA, 0);
- SetWindowLongW(Info->hEdit, GWLP_USERDATA, 0);
- SetWindowLongW(Info->hPreview, GWLP_USERDATA, 0 );
+ SetWindowLongPtrW(Info->hSelf, GWLP_USERDATA, 0);
+ SetWindowLongPtrW(Info->hEdit, GWLP_USERDATA, 0);
+ SetWindowLongPtrW(Info->hPreview, GWLP_USERDATA, 0 );
HeapFree(hProcessHeap, 0, Info);
return TRUE;
{
PEDIT_GLYPH_INFO Info;
- Info = (PEDIT_GLYPH_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
+ Info = (PEDIT_GLYPH_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info || uMsg == WM_INITDIALOG)
{
Info->hEdit = GetDlgItem(hwnd, IDC_EDIT_GLYPH_EDIT);
Info->hPreview = GetDlgItem(hwnd, IDC_EDIT_GLYPH_PREVIEW);
- SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
- SetWindowLongW(Info->hEdit, GWLP_USERDATA, (LONG)Info);
- SetWindowLongW(Info->hPreview, GWLP_USERDATA, (LONG)Info);
+ SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
+ SetWindowLongPtrW(Info->hEdit, GWLP_USERDATA, (LONG_PTR)Info);
+ SetWindowLongPtrW(Info->hPreview, GWLP_USERDATA, (LONG_PTR)Info);
InitToolbox(Info);
{
PEDIT_GLYPH_INFO Info;
- Info = (PEDIT_GLYPH_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
+ Info = (PEDIT_GLYPH_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info)
{
{
PEDIT_GLYPH_INFO Info;
- Info = (PEDIT_GLYPH_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
+ Info = (PEDIT_GLYPH_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info)
{
{
PFONT_WND_INFO Info;
- Info = (PFONT_WND_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
+ Info = (PFONT_WND_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info || uMsg == WM_CREATE)
{
{
case WM_CREATE:
Info = (PFONT_WND_INFO)( ( (LPCREATESTRUCT)lParam )->lpCreateParams );
- SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
+ SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
// Set a fixed window size
SetWindowPos(hwnd, NULL, 0, 0, FONT_BOXES_WND_WIDTH, FONT_BOXES_WND_HEIGHT, SWP_NOZORDER | SWP_NOMOVE);
return 0;
case WM_DESTROY:
- SetWindowLongW(hwnd, GWLP_USERDATA, 0);
+ SetWindowLongPtrW(hwnd, GWLP_USERDATA, 0);
return 0;
case WM_KEYDOWN:
{
PFONT_WND_INFO Info;
- Info = (PFONT_WND_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
+ Info = (PFONT_WND_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info || uMsg == WM_CREATE)
{
Info = (PFONT_WND_INFO)( ( (LPMDICREATESTRUCT) ( (LPCREATESTRUCT)lParam )->lpCreateParams )->lParam );
Info->hSelf = hwnd;
- SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
+ SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
CreateFontBoxesWindow(Info);
HeapFree(hProcessHeap, 0, Info->OpenInfo);
HeapFree(hProcessHeap, 0, Info);
- SetWindowLongW(hwnd, GWLP_USERDATA, 0);
+ SetWindowLongPtrW(hwnd, GWLP_USERDATA, 0);
return 0;
case WM_SETFOCUS:
PMAIN_WND_INFO Info;
- Info = (PMAIN_WND_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
+ Info = (PMAIN_WND_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info || uMsg == WM_CREATE)
{
Info = (PMAIN_WND_INFO)( ( (LPCREATESTRUCT)lParam )->lpCreateParams );
Info->hMainWnd = hwnd;
Info->hMenu = GetMenu(hwnd);
- SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
+ SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
hNextClipboardViewer = SetClipboardViewer(hwnd);
UnInitResources(Info);
HeapFree(hProcessHeap, 0, Info);
- SetWindowLongW(hwnd, GWLP_USERDATA, 0);
+ SetWindowLongPtrW(hwnd, GWLP_USERDATA, 0);
PostQuitMessage(0);
return 0;
return NULL;
for(t = ExtName; *t != _T('\0'); t += _tcslen(t) + 1);
- ln = (DWORD)t - (DWORD)ExtName;
+ ln = (DWORD_PTR)t - (DWORD_PTR)ExtName;
ZeroMemory (ExtInfo, sizeof (EXTENSION_INFO));
memcpy (ExtInfo->ExtName, ExtName, ln);