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)
}
-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:
{
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:
EndDialog(hDlg, TRUE);
break;
case IDABOUT:
- DialogBox(hInstance, MAKEINTRESOURCE(IDD_DLG_ABOUT), hDlg, (DLGPROC)AboutProc);
+ DialogBox(hInstance, MAKEINTRESOURCE(IDD_DLG_ABOUT), hDlg, AboutProc);
break;
}
}
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);
}
//
// 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;
{
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)
{
DrawText(hdc, buf, -1, &rect, DT_CENTER|DT_VCENTER|DT_WORDBREAK);
- return (BOOL)GetStockObject(NULL_BRUSH);
+ return (INT_PTR)GetStockObject(NULL_BRUSH);
}
else
{
if(isdigit(ch))
{
- unsigned int i = _wtoi(szCmdLine - 1);
+ ULONG_PTR i = _wtoi(szCmdLine - 1);
*hwndParent = (HWND)i;
}
else
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)
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];
// 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];
#endif
}
- pPerfData[Idx].ProcessId = (ULONG)(pSPI->UniqueProcessId);
+ pPerfData[Idx].ProcessId = HandleToUlong(pSPI->UniqueProcessId);
pPerfData[Idx].CreateTime = pSPI->CreateTime;
if (pPDOld) {
NtCurrentProcess(),
&pBuf,
0,
- (PULONG)&size,
+ &size,
MEM_COMMIT,
PAGE_READWRITE
);
void PsaiFree(void *ptr)
{
- ULONG nSize = 0;
+ SIZE_T nSize = 0;
NtFreeVirtualMemory(NtCurrentProcess(), &ptr, &nSize, MEM_RELEASE);
}
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))
{
wprintf (
L"%s (%d, %d) %s\n",
Module,
- pInfo->UniqueProcessId,
- pInfo->InheritedFromUniqueProcessId,
+ HandleToUlong(pInfo->UniqueProcessId),
+ HandleToUlong(pInfo->InheritedFromUniqueProcessId),
Title
);
return EXIT_SUCCESS;
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)
{
else
{
PrintProcessInfoDepth (pInfo, Depth);
- pInfo->InheritedFromUniqueProcessId = (HANDLE)ALREADY_PROCESSED;
+ pInfo->InheritedFromUniqueProcessId = UlongToHandle(ALREADY_PROCESSED);
}
}
}
{
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);
}
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]
CLIENT_ID ClientId = {0, 0};
- ClientId.UniqueProcess = (PVOID) atol (PidStr);
+ ClientId.UniqueProcess = UlongToHandle(atol (PidStr));
if (FALSE == AcquirePrivileges ())
{
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 */
LPWORD lpwAlign(LPWORD lpIn)
{
- ULONG ul;
+ ULONG_PTR ul;
- ul = (ULONG)lpIn;
+ ul = (ULONG_PTR)lpIn;
ul += 3;
ul >>= 2;
ul <<= 2;
// 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(""));
}
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();
}
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,
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);