mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
[ROSAPPS] Fix 64 bit issues
This commit is contained in:
parent
c7022c1b0c
commit
9cab5b549d
8 changed files with 30 additions and 30 deletions
|
@ -23,7 +23,7 @@ typedef PGDI_TABLE_ENTRY (CALLBACK * GDIQUERYPROC) (void);
|
|||
|
||||
/* 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)
|
||||
|
|
|
@ -87,7 +87,7 @@ HandleList_Update(HWND hHandleListCtrl, HANDLE ProcessId)
|
|||
(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);
|
||||
|
@ -101,19 +101,19 @@ HandleList_Update(HWND hHandleListCtrl, HANDLE ProcessId)
|
|||
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);
|
||||
|
|
|
@ -55,7 +55,7 @@ BOOL CALLBACK EnumSymbolsProc(
|
|||
ULONG SymbolSize,
|
||||
PVOID UserContext)
|
||||
{
|
||||
if ((UINT)UserContext == -1)
|
||||
if ((INT_PTR)UserContext == -1)
|
||||
{
|
||||
printf("%s ", pSymInfo->Name);
|
||||
}
|
||||
|
@ -63,11 +63,11 @@ BOOL CALLBACK EnumSymbolsProc(
|
|||
{
|
||||
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;
|
||||
|
@ -173,7 +173,7 @@ cont:
|
|||
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");
|
||||
}
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ cont:
|
|||
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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,9 +104,9 @@ EditGlyphCommand(IN INT idCommand, IN PEDIT_GLYPH_INFO Info)
|
|||
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;
|
||||
|
@ -120,7 +120,7 @@ EditGlyphDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
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)
|
||||
{
|
||||
|
@ -135,9 +135,9 @@ EditGlyphDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
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);
|
||||
|
||||
|
@ -153,7 +153,7 @@ EditGlyphEditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
PEDIT_GLYPH_INFO Info;
|
||||
|
||||
Info = (PEDIT_GLYPH_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
|
||||
Info = (PEDIT_GLYPH_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
|
||||
|
||||
if(Info)
|
||||
{
|
||||
|
@ -231,7 +231,7 @@ EditGlyphPreviewWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
PEDIT_GLYPH_INFO Info;
|
||||
|
||||
Info = (PEDIT_GLYPH_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
|
||||
Info = (PEDIT_GLYPH_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
|
||||
|
||||
if(Info)
|
||||
{
|
||||
|
|
|
@ -249,7 +249,7 @@ FontBoxesWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
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)
|
||||
{
|
||||
|
@ -257,7 +257,7 @@ FontBoxesWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
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);
|
||||
|
@ -265,7 +265,7 @@ FontBoxesWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
return 0;
|
||||
|
||||
case WM_DESTROY:
|
||||
SetWindowLongW(hwnd, GWLP_USERDATA, 0);
|
||||
SetWindowLongPtrW(hwnd, GWLP_USERDATA, 0);
|
||||
return 0;
|
||||
|
||||
case WM_KEYDOWN:
|
||||
|
|
|
@ -98,7 +98,7 @@ FontWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
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)
|
||||
{
|
||||
|
@ -114,7 +114,7 @@ FontWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
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);
|
||||
|
||||
|
@ -198,7 +198,7 @@ FontWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
HeapFree(hProcessHeap, 0, Info->OpenInfo);
|
||||
HeapFree(hProcessHeap, 0, Info);
|
||||
|
||||
SetWindowLongW(hwnd, GWLP_USERDATA, 0);
|
||||
SetWindowLongPtrW(hwnd, GWLP_USERDATA, 0);
|
||||
return 0;
|
||||
|
||||
case WM_SETFOCUS:
|
||||
|
|
|
@ -442,7 +442,7 @@ MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
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)
|
||||
{
|
||||
|
@ -489,7 +489,7 @@ MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
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);
|
||||
|
||||
|
@ -503,7 +503,7 @@ MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
UnInitResources(Info);
|
||||
|
||||
HeapFree(hProcessHeap, 0, Info);
|
||||
SetWindowLongW(hwnd, GWLP_USERDATA, 0);
|
||||
SetWindowLongPtrW(hwnd, GWLP_USERDATA, 0);
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ AddExtension(LPTSTR ExtName,
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue