mirror of
https://github.com/reactos/reactos.git
synced 2025-02-20 15:35:04 +00:00
[ROSAPPS] Fix 64 bit issues
This commit is contained in:
parent
37af78775d
commit
2890a22179
10 changed files with 41 additions and 36 deletions
|
@ -1,7 +1,9 @@
|
|||
add_subdirectory(cmdutils)
|
||||
add_subdirectory(devutils)
|
||||
add_subdirectory(explorer-old)
|
||||
add_subdirectory(fraginator)
|
||||
if (ARCH STREQUAL "i386")
|
||||
add_subdirectory(explorer-old)
|
||||
add_subdirectory(fraginator)
|
||||
endif()
|
||||
add_subdirectory(imagesoft)
|
||||
add_subdirectory(net)
|
||||
add_subdirectory(notevil)
|
||||
|
|
|
@ -230,7 +230,7 @@ void Display()
|
|||
|
||||
}
|
||||
|
||||
BOOL AboutProc(HWND hdlg, UINT msg, WPARAM wpm, LPARAM lpm){
|
||||
INT_PTR AboutProc(HWND hdlg, UINT msg, WPARAM wpm, LPARAM lpm){
|
||||
|
||||
switch(msg){
|
||||
case WM_CTLCOLORSTATIC:
|
||||
|
@ -238,7 +238,7 @@ BOOL AboutProc(HWND hdlg, UINT msg, WPARAM wpm, LPARAM lpm){
|
|||
{
|
||||
SetTextColor((HDC)wpm, RGB(0,0,255));
|
||||
SetBkColor((HDC)wpm, (COLORREF)GetSysColor(COLOR_3DFACE));
|
||||
return((int)GetSysColorBrush(COLOR_3DFACE));
|
||||
return (INT_PTR)GetSysColorBrush(COLOR_3DFACE);
|
||||
}
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
|
@ -314,7 +314,7 @@ BOOL WINAPI ScreenSaverConfigureDialog(HWND hDlg, UINT message,
|
|||
EndDialog(hDlg, TRUE);
|
||||
break;
|
||||
case IDABOUT:
|
||||
DialogBox(hInstance, MAKEINTRESOURCE(IDD_DLG_ABOUT), hDlg, (DLGPROC)AboutProc);
|
||||
DialogBox(hInstance, MAKEINTRESOURCE(IDD_DLG_ABOUT), hDlg, AboutProc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ void AddFonts(HWND hwndCombo)
|
|||
lf.lfFaceName[0] = _T('\0');
|
||||
|
||||
hdc = GetDC(0);
|
||||
EnumFontFamiliesEx(hdc, &lf, (FONTENUMPROC)EnumFontProc, (LONG)hwndCombo, 0);
|
||||
EnumFontFamiliesEx(hdc, &lf, (FONTENUMPROC)EnumFontProc, (LONG_PTR)hwndCombo, 0);
|
||||
ReleaseDC(0, hdc);
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ void UpdatePreview(HWND hwnd)
|
|||
//
|
||||
// Dialogbox procedure for Configuration window
|
||||
//
|
||||
BOOL CALLBACK ConfigDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK ConfigDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static TCHAR buf[256];
|
||||
HWND hwndCombo, hwndCtrl;
|
||||
|
@ -112,7 +112,7 @@ BOOL CALLBACK ConfigDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
SetTextColor((HDC)wParam, RGB(0,80,0));
|
||||
SetBkColor((HDC)wParam, GetSysColor(COLOR_3DFACE));
|
||||
return (BOOL)GetSysColorBrush(COLOR_3DFACE);
|
||||
return (INT_PTR)GetSysColorBrush(COLOR_3DFACE);
|
||||
}
|
||||
else if(GetDlgCtrlID((HWND)lParam) == IDC_PREVIEW)
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ BOOL CALLBACK ConfigDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
DrawText(hdc, buf, -1, &rect, DT_CENTER|DT_VCENTER|DT_WORDBREAK);
|
||||
|
||||
|
||||
return (BOOL)GetStockObject(NULL_BRUSH);
|
||||
return (INT_PTR)GetStockObject(NULL_BRUSH);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -121,7 +121,7 @@ VOID ParseCommandLine(LPWSTR szCmdLine, UCHAR *chOption, HWND *hwndParent)
|
|||
|
||||
if(isdigit(ch))
|
||||
{
|
||||
unsigned int i = _wtoi(szCmdLine - 1);
|
||||
ULONG_PTR i = _wtoi(szCmdLine - 1);
|
||||
*hwndParent = (HWND)i;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -6,7 +6,9 @@ add_subdirectory(kill)
|
|||
add_subdirectory(logevent)
|
||||
add_subdirectory(lsdd)
|
||||
add_subdirectory(man)
|
||||
add_subdirectory(pedump)
|
||||
if (ARCH STREQUAL "i386")
|
||||
add_subdirectory(pedump)
|
||||
endif()
|
||||
add_subdirectory(regexpl)
|
||||
add_subdirectory(rosddt)
|
||||
add_subdirectory(screenshot)
|
||||
|
|
|
@ -189,7 +189,8 @@ void DisplayScreen()
|
|||
lines = ProcPerScreen;
|
||||
for (idx=0; idx<ProcPerScreen; idx++)
|
||||
{
|
||||
int len, i;
|
||||
int i;
|
||||
SIZE_T len;
|
||||
TCHAR lpNumber[5];
|
||||
TCHAR lpPid[8];
|
||||
TCHAR lpCpu[6];
|
||||
|
@ -501,7 +502,7 @@ void PerfDataRefresh()
|
|||
// so that we can establish delta values
|
||||
pPDOld = NULL;
|
||||
for (Idx2=0; Idx2<ProcessCountOld; Idx2++) {
|
||||
if (pPerfDataOld[Idx2].ProcessId == (ULONG)(pSPI->UniqueProcessId) &&
|
||||
if (pPerfDataOld[Idx2].ProcessId == HandleToUlong(pSPI->UniqueProcessId) &&
|
||||
/* check also for the creation time, a new process may have an id of an old one */
|
||||
pPerfDataOld[Idx2].CreateTime.QuadPart == pSPI->CreateTime.QuadPart) {
|
||||
pPDOld = &pPerfDataOld[Idx2];
|
||||
|
@ -525,7 +526,7 @@ void PerfDataRefresh()
|
|||
#endif
|
||||
}
|
||||
|
||||
pPerfData[Idx].ProcessId = (ULONG)(pSPI->UniqueProcessId);
|
||||
pPerfData[Idx].ProcessId = HandleToUlong(pSPI->UniqueProcessId);
|
||||
pPerfData[Idx].CreateTime = pSPI->CreateTime;
|
||||
|
||||
if (pPDOld) {
|
||||
|
|
|
@ -47,7 +47,7 @@ void *PsaiMalloc(SIZE_T size)
|
|||
NtCurrentProcess(),
|
||||
&pBuf,
|
||||
0,
|
||||
(PULONG)&size,
|
||||
&size,
|
||||
MEM_COMMIT,
|
||||
PAGE_READWRITE
|
||||
);
|
||||
|
@ -58,7 +58,7 @@ void *PsaiMalloc(SIZE_T size)
|
|||
|
||||
void PsaiFree(void *ptr)
|
||||
{
|
||||
ULONG nSize = 0;
|
||||
SIZE_T nSize = 0;
|
||||
|
||||
NtFreeVirtualMemory(NtCurrentProcess(), &ptr, &nSize, MEM_RELEASE);
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ ProcessHasDescendants (
|
|||
if (NULL == pInfo) return 0;
|
||||
do {
|
||||
|
||||
if (ALREADY_PROCESSED != (DWORD)pInfo->InheritedFromUniqueProcessId)
|
||||
if (ALREADY_PROCESSED != HandleToUlong(pInfo->InheritedFromUniqueProcessId))
|
||||
{
|
||||
if ((Pid != (HANDLE)pInfo->UniqueProcessId) && (Pid == (HANDLE)pInfo->InheritedFromUniqueProcessId))
|
||||
{
|
||||
|
@ -158,8 +158,8 @@ int WINAPI PrintProcessInfoDepth (
|
|||
wprintf (
|
||||
L"%s (%d, %d) %s\n",
|
||||
Module,
|
||||
pInfo->UniqueProcessId,
|
||||
pInfo->InheritedFromUniqueProcessId,
|
||||
HandleToUlong(pInfo->UniqueProcessId),
|
||||
HandleToUlong(pInfo->InheritedFromUniqueProcessId),
|
||||
Title
|
||||
);
|
||||
return EXIT_SUCCESS;
|
||||
|
@ -177,13 +177,13 @@ PrintProcessAndDescendants (
|
|||
if (NULL == pInfo) return EXIT_FAILURE;
|
||||
/* Print current pInfo process */
|
||||
PrintProcessInfoDepth (pInfo, Depth ++);
|
||||
pInfo->InheritedFromUniqueProcessId = (HANDLE)ALREADY_PROCESSED;
|
||||
pInfo->InheritedFromUniqueProcessId = UlongToHandle(ALREADY_PROCESSED);
|
||||
/* Save current process' PID */
|
||||
Pid = pInfo->UniqueProcessId;
|
||||
/* Scan and print possible children */
|
||||
do {
|
||||
|
||||
if (ALREADY_PROCESSED != (DWORD)pInfo->InheritedFromUniqueProcessId)
|
||||
if (ALREADY_PROCESSED != HandleToUlong(pInfo->InheritedFromUniqueProcessId))
|
||||
{
|
||||
if (Pid == pInfo->InheritedFromUniqueProcessId)
|
||||
{
|
||||
|
@ -198,7 +198,7 @@ PrintProcessAndDescendants (
|
|||
else
|
||||
{
|
||||
PrintProcessInfoDepth (pInfo, Depth);
|
||||
pInfo->InheritedFromUniqueProcessId = (HANDLE)ALREADY_PROCESSED;
|
||||
pInfo->InheritedFromUniqueProcessId = UlongToHandle(ALREADY_PROCESSED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -227,16 +227,16 @@ int WINAPI PrintProcessList (BOOL DisplayTree)
|
|||
{
|
||||
GetProcessInfo (pInfo, & Module, & Title);
|
||||
wprintf (
|
||||
L"%4d %-16s %s\n",
|
||||
pInfo->UniqueProcessId,
|
||||
L"%4d %-16s %s (%04d)\n",
|
||||
HandleToUlong(pInfo->UniqueProcessId),
|
||||
Module,
|
||||
Title,
|
||||
pInfo->InheritedFromUniqueProcessId
|
||||
HandleToUlong(pInfo->InheritedFromUniqueProcessId)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ALREADY_PROCESSED != (DWORD)pInfo->InheritedFromUniqueProcessId)
|
||||
if (ALREADY_PROCESSED != HandleToUlong(pInfo->InheritedFromUniqueProcessId))
|
||||
{
|
||||
PrintProcessAndDescendants (pInfo, pInfoBase, 0);
|
||||
}
|
||||
|
@ -310,8 +310,8 @@ int WINAPI PrintThreads (PSYSTEM_PROCESS_INFORMATION pInfo)
|
|||
NtClose (hThread);
|
||||
|
||||
/* Now print the collected information */
|
||||
wprintf (L" %4d Win32StartAddr:0x%08x LastErr:0x%08x State:%s\n",
|
||||
CurThread->ClientId.UniqueThread,
|
||||
wprintf (L" %4d Win32StartAddr:0x%p LastErr:0x%08x State:%s\n",
|
||||
HandleToUlong(CurThread->ClientId.UniqueThread),
|
||||
Win32StartAddress,
|
||||
0 /* FIXME: ((PTEB) tInfo.TebBaseAddress)->LastErrorValue */,
|
||||
ThreadStateName[CurThread->ThreadState]
|
||||
|
@ -357,7 +357,7 @@ int WINAPI PrintProcess (char * PidStr)
|
|||
CLIENT_ID ClientId = {0, 0};
|
||||
|
||||
|
||||
ClientId.UniqueProcess = (PVOID) atol (PidStr);
|
||||
ClientId.UniqueProcess = UlongToHandle(atol (PidStr));
|
||||
|
||||
if (FALSE == AcquirePrivileges ())
|
||||
{
|
||||
|
@ -411,7 +411,7 @@ int WINAPI PrintProcess (char * PidStr)
|
|||
|
||||
GetProcessInfo (pInfo, & Module, & Title);
|
||||
|
||||
wprintf (L"%4d %s\n", ClientId.UniqueProcess, Module);
|
||||
wprintf (L"%4d %s\n", HandleToUlong(ClientId.UniqueProcess), Module);
|
||||
#if 0
|
||||
printf (" CWD: %s\n", ""); /* it won't appear if empty */
|
||||
printf (" CmdLine: %s\n", ""); /* it won't appear if empty */
|
||||
|
|
|
@ -40,9 +40,9 @@ LRESULT CALLBACK DialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
|
|||
|
||||
LPWORD lpwAlign(LPWORD lpIn)
|
||||
{
|
||||
ULONG ul;
|
||||
ULONG_PTR ul;
|
||||
|
||||
ul = (ULONG)lpIn;
|
||||
ul = (ULONG_PTR)lpIn;
|
||||
ul += 3;
|
||||
ul >>= 2;
|
||||
ul <<= 2;
|
||||
|
|
|
@ -205,7 +205,7 @@ void OnEnterMenuLoop(HWND hWnd)
|
|||
|
||||
// Update the status bar pane sizes
|
||||
nParts = -1;
|
||||
SendMessage(hStatusBar, SB_SETPARTS, 1, (long)&nParts);
|
||||
SendMessage(hStatusBar, SB_SETPARTS, 1, (LPARAM)&nParts);
|
||||
bInMenuLoop = TRUE;
|
||||
SendMessage(hStatusBar, SB_SETTEXT, (WPARAM)0, (LPARAM)_T(""));
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ void OnExitMenuLoop(HWND hWnd)
|
|||
nParts[0] = 100;
|
||||
nParts[1] = 210;
|
||||
nParts[2] = rc.right;
|
||||
SendMessage(hStatusBar, SB_SETPARTS, 3, (long)nParts);
|
||||
SendMessage(hStatusBar, SB_SETPARTS, 3, (LPARAM)nParts);
|
||||
SendMessage(hStatusBar, SB_SETTEXT, 0, (LPARAM)_T(""));
|
||||
UpdateStatusBar();
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
|||
hFont = CreateFont(-MulDiv(8,GetDeviceCaps(hdc,LOGPIXELSY),72), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _T("MS Sans Serif"));
|
||||
ReleaseDC(0, hdc);
|
||||
|
||||
hFrameWnd = CreateWindowEx(0, (LPCTSTR)(int)hFrameWndClass, szTitle,
|
||||
hFrameWnd = CreateWindowEx(0, (LPCTSTR)hFrameWndClass, szTitle,
|
||||
// hFrameWnd = CreateWindow(szFrameClass, szTitle,
|
||||
WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
|
@ -165,7 +165,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
|||
nParts[0] = 100;
|
||||
nParts[1] = 210;
|
||||
nParts[2] = 400;
|
||||
SendMessage(hStatusBar, SB_SETPARTS, 3, (long)nParts);
|
||||
SendMessage(hStatusBar, SB_SETPARTS, 3, (LPARAM)nParts);
|
||||
} else {
|
||||
CheckMenuItem(hMenuOptions, ID_OPTIONS_TOOLBAR, MF_BYCOMMAND|MF_GRAYED);
|
||||
CheckMenuItem(hMenuOptions, ID_OPTIONS_STATUSBAR, MF_BYCOMMAND|MF_GRAYED);
|
||||
|
|
Loading…
Reference in a new issue