Merge 34758, 34771, 34786, 34787, 34906, 35826, 36174, 36274, 36444, 36445, 36446, 36447, 36448, 36477, 36511, 36898, 36903 from amd64 branch

svn path=/trunk/; revision=37910
This commit is contained in:
Timo Kreuzer 2008-12-07 12:11:46 +00:00
parent 467aff9230
commit be0e9fd9c7
53 changed files with 101 additions and 107 deletions

View file

@ -804,7 +804,7 @@ static char *ReadConversion(const char *formula)
return str; return str;
} }
static LRESULT CALLBACK DlgStatProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) static INT_PTR CALLBACK DlgStatProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
{ {
TCHAR buffer[SIZEOF(calc.buffer)]; TCHAR buffer[SIZEOF(calc.buffer)];
DWORD n; DWORD n;
@ -1179,7 +1179,7 @@ static LRESULT CALLBACK SubclassButtonProc(HWND hWnd, WPARAM wp, LPARAM lp)
return 1L; return 1L;
} }
static LRESULT CALLBACK DlgMainProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) static INT_PTR CALLBACK DlgMainProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
{ {
unsigned int x; unsigned int x;
RECT rc; RECT rc;

View file

@ -188,7 +188,7 @@ AddCharToSelection(HWND hText,
static static
BOOL INT_PTR
CALLBACK CALLBACK
DlgProc(HWND hDlg, DlgProc(HWND hDlg,
UINT Message, UINT Message,
@ -359,7 +359,7 @@ wWinMain(HINSTANCE hInst,
Ret = DialogBoxW(hInstance, Ret = DialogBoxW(hInstance,
MAKEINTRESOURCEW(IDD_CHARMAP), MAKEINTRESOURCEW(IDD_CHARMAP),
NULL, NULL,
(DLGPROC)DlgProc) >= 0; DlgProc) >= 0;
UnregisterMapClasses(hInstance); UnregisterMapClasses(hInstance);
} }

View file

@ -24,12 +24,12 @@ OpenShellFolder(LPTSTR lpFolderCLSID)
_tcscpy(szParameters, _T("/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}")); _tcscpy(szParameters, _T("/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"));
_tcscat(szParameters, lpFolderCLSID); _tcscat(szParameters, lpFolderCLSID);
return (int) ShellExecute(NULL, return (INT_PTR)ShellExecute(NULL,
_T("open"), _T("open"),
_T("explorer.exe"), _T("explorer.exe"),
szParameters, szParameters,
NULL, NULL,
SW_SHOWDEFAULT) > 32; SW_SHOWDEFAULT) > 32;
} }
static static

View file

@ -15,4 +15,4 @@
/* Macro for calling "rundll32.exe" /* Macro for calling "rundll32.exe"
According to MSDN, ShellExecute returns a value greater than 32 if the operation was successful. */ According to MSDN, ShellExecute returns a value greater than 32 if the operation was successful. */
#define RUNDLL(param) ((int)ShellExecute(NULL, _T("open"), _T("rundll32.exe"), (param), NULL, SW_SHOWDEFAULT) > 32) #define RUNDLL(param) ((INT_PTR)ShellExecute(NULL, _T("open"), _T("rundll32.exe"), (param), NULL, SW_SHOWDEFAULT) > 32)

View file

@ -238,7 +238,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
hInst = hInstance; hInst = hInstance;
DialogBox(hInst, MAKEINTRESOURCE(IDD_MAIN_DIALOG), NULL, (DLGPROC) DxDiagWndProc); DialogBox(hInst, MAKEINTRESOURCE(IDD_MAIN_DIALOG), NULL, DxDiagWndProc);
return 0; return 0;
} }

View file

@ -326,7 +326,7 @@ int CardButton::OnLButtonUp(HWND hwnd, int x, int y)
else else
{ {
HWND hwnd = (HWND)parentWnd; HWND hwnd = (HWND)parentWnd;
SendMessage(GetParent(hwnd), WM_COMMAND, MAKEWPARAM(id, BN_CLICKED), (LONG)hwnd); SendMessage(GetParent(hwnd), WM_COMMAND, MAKEWPARAM(id, BN_CLICKED), (LONG_PTR)hwnd);
} }
} }
} }

View file

@ -298,7 +298,7 @@ void CardRegion::Render(HDC hdc)
else else
fDrawTips = TRUE; fDrawTips = TRUE;
if(yoffset != 0 && abs(xoffset) == 1 || xoffset != 0 && abs(yoffset) == 1) if((yoffset != 0 && abs(xoffset) == 1) || (xoffset != 0 && abs(yoffset) == 1))
fDrawTips = TRUE; fDrawTips = TRUE;
//draw horizontal strips //draw horizontal strips

View file

@ -626,7 +626,7 @@ void CardRegion::ZoomCard(HDC hdc, int xpos, int ypos, CardRegion *pDestStack)
MoveDragCardTo(hdc, ix, iy); MoveDragCardTo(hdc, ix, iy);
if(attarget || ix == idestx && iy == idesty) if(attarget || (ix == idestx && iy == idesty))
break; break;
oldx = (int)x; oldx = (int)x;

View file

@ -366,7 +366,7 @@ LRESULT CALLBACK CardWindow::WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM
// //
// associate this class with the window // associate this class with the window
// //
SetWindowLong(hwnd, 0, (LONG)cs->lpCreateParams); SetWindowLong(hwnd, 0, (LONG_PTR)cs->lpCreateParams);
return 1; return 1;

View file

@ -118,8 +118,8 @@ bool CARDLIBPROC RowStackDropProc(CardRegion &stackobj, const CardStack &dragca
} }
//can only drop if card is different colour //can only drop if card is different colour
if( mystack[0].IsBlack() && !dragcard.IsRed() || if( (mystack[0].IsBlack() && !dragcard.IsRed()) ||
!mystack[0].IsBlack() && dragcard.IsRed() ) (!mystack[0].IsBlack() && dragcard.IsRed()) )
{ {
TRACE("EXIT RowStackDropProc(false)\n"); TRACE("EXIT RowStackDropProc(false)\n");
return false; return false;

View file

@ -200,7 +200,7 @@ int WINAPI _tWinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR szCmdLine, int iCm
} }
BOOL CALLBACK OptionsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
switch (uMsg) switch (uMsg)
{ {
@ -358,7 +358,7 @@ CardImageWndProc(HWND hwnd,
} }
BOOL CALLBACK CardBackDlgProc(HWND hDlg, INT_PTR CALLBACK CardBackDlgProc(HWND hDlg,
UINT uMsg, UINT uMsg,
WPARAM wParam, WPARAM wParam,
LPARAM lParam) LPARAM lParam)

View file

@ -19,7 +19,7 @@
*/ */
BOOL CALLBACK CustomDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ); INT_PTR CALLBACK CustomDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
BOOL CALLBACK CongratsDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ); INT_PTR CALLBACK CongratsDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
BOOL CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ); INT_PTR CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
BOOL CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ); INT_PTR CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );

View file

@ -23,12 +23,12 @@ BOOL OnCreate(HWND hWnd)
TCITEM item; TCITEM item;
hTabWnd = GetDlgItem(hWnd, IDC_TAB); hTabWnd = GetDlgItem(hWnd, IDC_TAB);
hGeneralPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_GENERAL_PAGE), hWnd, (DLGPROC) GeneralPageWndProc); hGeneralPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_GENERAL_PAGE), hWnd, GeneralPageWndProc);
hSystemPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SYSTEM_PAGE), hWnd, (DLGPROC) SystemPageWndProc); hSystemPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SYSTEM_PAGE), hWnd, SystemPageWndProc);
hFreeLdrPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_FREELDR_PAGE), hWnd, (DLGPROC) FreeLdrPageWndProc); hFreeLdrPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_FREELDR_PAGE), hWnd, FreeLdrPageWndProc);
hServicesPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SERVICES_PAGE), hWnd, (DLGPROC) ServicesPageWndProc); hServicesPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SERVICES_PAGE), hWnd, ServicesPageWndProc);
hStartupPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_STARTUP_PAGE), hWnd, (DLGPROC) StartupPageWndProc); hStartupPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_STARTUP_PAGE), hWnd, StartupPageWndProc);
hToolsPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_TOOLS_PAGE), hWnd, (DLGPROC) ToolsPageWndProc); hToolsPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_TOOLS_PAGE), hWnd, ToolsPageWndProc);
LoadString(hInst, IDS_MSCONFIG, szTemp, 256); LoadString(hInst, IDS_MSCONFIG, szTemp, 256);
SetWindowText(hWnd, szTemp); SetWindowText(hWnd, szTemp);
@ -202,7 +202,7 @@ MsConfigWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
break; break;
case WM_NOTIFY: case WM_NOTIFY:
idctrl = (int)wParam; idctrl = wParam;
pnmh = (LPNMHDR)lParam; pnmh = (LPNMHDR)lParam;
if ((pnmh->hwndFrom == hTabWnd) && if ((pnmh->hwndFrom == hTabWnd) &&
(pnmh->idFrom == IDC_TAB) && (pnmh->idFrom == IDC_TAB) &&
@ -251,7 +251,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
hInst = hInstance; hInst = hInstance;
DialogBox(hInst, (LPCTSTR)IDD_MSCONFIG_DIALOG, NULL, (DLGPROC) MsConfigWndProc); DialogBox(hInst, (LPCTSTR)IDD_MSCONFIG_DIALOG, NULL, MsConfigWndProc);
return 0; return 0;
} }

View file

@ -9,7 +9,7 @@
#include "precomp.h" #include "precomp.h"
BOOL CALLBACK INT_PTR CALLBACK
AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{ {
HWND hLicenseEditWnd; HWND hLicenseEditWnd;

View file

@ -464,7 +464,7 @@ MainWndCommand(PMAIN_WND_INFO Info,
DialogBox(hInstance, DialogBox(hInstance,
MAKEINTRESOURCE(IDD_ABOUTBOX), MAKEINTRESOURCE(IDD_ABOUTBOX),
Info->hMainWnd, Info->hMainWnd,
(DLGPROC)AboutDialogProc); AboutDialogProc);
SetFocus(Info->hTreeView); SetFocus(Info->hTreeView);
} }

View file

@ -34,7 +34,7 @@ typedef struct _MAIN_WND_INFO
} MAIN_WND_INFO, *PMAIN_WND_INFO; } MAIN_WND_INFO, *PMAIN_WND_INFO;
BOOL CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
/* devmgmt.c */ /* devmgmt.c */

View file

@ -9,7 +9,7 @@
#include "precomp.h" #include "precomp.h"
BOOL CALLBACK INT_PTR CALLBACK
AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{ {
switch (message) switch (message)

View file

@ -164,7 +164,7 @@ FreeMemory(PCREATE_DATA Data)
} }
BOOL CALLBACK INT_PTR CALLBACK
CreateHelpDialogProc(HWND hDlg, CreateHelpDialogProc(HWND hDlg,
UINT message, UINT message,
WPARAM wParam, WPARAM wParam,
@ -221,7 +221,7 @@ CreateHelpDialogProc(HWND hDlg,
} }
BOOL CALLBACK INT_PTR CALLBACK
CreateDialogProc(HWND hDlg, CreateDialogProc(HWND hDlg,
UINT message, UINT message,
WPARAM wParam, WPARAM wParam,
@ -302,7 +302,7 @@ CreateDialogProc(HWND hDlg,
hHelp = CreateDialog(hInstance, hHelp = CreateDialog(hInstance,
MAKEINTRESOURCE(IDD_DLG_HELP_OPTIONS), MAKEINTRESOURCE(IDD_DLG_HELP_OPTIONS),
hDlg, hDlg,
(DLGPROC)CreateHelpDialogProc); CreateHelpDialogProc);
if(hHelp != NULL) if(hHelp != NULL)
{ {
bHelpOpen = TRUE; bHelpOpen = TRUE;

View file

@ -56,7 +56,7 @@ DoDeleteService(PMAIN_WND_INFO Info,
} }
BOOL CALLBACK INT_PTR CALLBACK
DeleteDialogProc(HWND hDlg, DeleteDialogProc(HWND hDlg,
UINT message, UINT message,
WPARAM wParam, WPARAM wParam,

View file

@ -432,7 +432,7 @@ MainWndCommand(PMAIN_WND_INFO Info,
ret = DialogBoxParam(hInstance, ret = DialogBoxParam(hInstance,
MAKEINTRESOURCE(IDD_DLG_CREATE), MAKEINTRESOURCE(IDD_DLG_CREATE),
Info->hMainWnd, Info->hMainWnd,
(DLGPROC)CreateDialogProc, CreateDialogProc,
(LPARAM)Info); (LPARAM)Info);
if (ret == IDOK) if (ret == IDOK)
RefreshServiceList(Info); RefreshServiceList(Info);
@ -448,7 +448,7 @@ MainWndCommand(PMAIN_WND_INFO Info,
DialogBoxParam(hInstance, DialogBoxParam(hInstance,
MAKEINTRESOURCE(IDD_DLG_DELETE), MAKEINTRESOURCE(IDD_DLG_DELETE),
Info->hMainWnd, Info->hMainWnd,
(DLGPROC)DeleteDialogProc, DeleteDialogProc,
(LPARAM)Info); (LPARAM)Info);
} }
else else
@ -569,7 +569,7 @@ MainWndCommand(PMAIN_WND_INFO Info,
DialogBox(hInstance, DialogBox(hInstance,
MAKEINTRESOURCE(IDD_ABOUTBOX), MAKEINTRESOURCE(IDD_ABOUTBOX),
Info->hMainWnd, Info->hMainWnd,
(DLGPROC)AboutDialogProc); AboutDialogProc);
SetFocus(Info->hListView); SetFocus(Info->hListView);
break; break;

View file

@ -43,10 +43,10 @@ typedef struct _MAIN_WND_INFO
} MAIN_WND_INFO, *PMAIN_WND_INFO; } MAIN_WND_INFO, *PMAIN_WND_INFO;
BOOL CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK CreateDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK CreateDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK DeleteDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK DeleteDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK ProgressDialogProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK ProgressDialogProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam);
/* servman.c */ /* servman.c */

View file

@ -56,7 +56,7 @@ IncrementProgressBar(HWND hProgDlg)
} }
} }
BOOL CALLBACK INT_PTR CALLBACK
ProgressDialogProc(HWND hDlg, ProgressDialogProc(HWND hDlg,
UINT Message, UINT Message,
WPARAM wParam, WPARAM wParam,
@ -113,7 +113,7 @@ CreateProgressDialog(HWND hParent,
hProgDlg = CreateDialog(hInstance, hProgDlg = CreateDialog(hInstance,
MAKEINTRESOURCE(IDD_DLG_PROGRESS), MAKEINTRESOURCE(IDD_DLG_PROGRESS),
hParent, hParent,
(DLGPROC)ProgressDialogProc); ProgressDialogProc);
if (hProgDlg != NULL) if (hProgDlg != NULL)
{ {
/* write the info to the progress dialog */ /* write the info to the progress dialog */

View file

@ -989,7 +989,7 @@ OnMainCreate(HWND hwnd,
if (CreateDialogParamW(hInst, if (CreateDialogParamW(hInst,
MAKEINTRESOURCEW(IDD_GENERAL), MAKEINTRESOURCEW(IDD_GENERAL),
pInfo->hTab, pInfo->hTab,
(DLGPROC)GeneralDlgProc, GeneralDlgProc,
(LPARAM)pInfo)) (LPARAM)pInfo))
{ {
WCHAR str[256]; WCHAR str[256];
@ -1004,7 +1004,7 @@ OnMainCreate(HWND hwnd,
if (CreateDialogParamW(hInst, if (CreateDialogParamW(hInst,
MAKEINTRESOURCEW(IDD_DISPLAY), MAKEINTRESOURCEW(IDD_DISPLAY),
pInfo->hTab, pInfo->hTab,
(DLGPROC)DisplayDlgProc, DisplayDlgProc,
(LPARAM)pInfo)) (LPARAM)pInfo))
{ {
WCHAR str[256]; WCHAR str[256];
@ -1049,7 +1049,7 @@ static void Cleanup(PINFO pInfo)
} }
} }
static BOOL CALLBACK static INT_PTR CALLBACK
DlgProc(HWND hDlg, DlgProc(HWND hDlg,
UINT Message, UINT Message,
WPARAM wParam, WPARAM wParam,
@ -1246,6 +1246,6 @@ OpenRDPConnectDialog(HINSTANCE hInstance,
return (DialogBoxParamW(hInst, return (DialogBoxParamW(hInst,
MAKEINTRESOURCEW(IDD_CONNECTDIALOG), MAKEINTRESOURCEW(IDD_CONNECTDIALOG),
NULL, NULL,
(DLGPROC)DlgProc, DlgProc,
(LPARAM)pRdpSettings) == IDOK); (LPARAM)pRdpSettings) == IDOK);
} }

View file

@ -416,7 +416,7 @@ void mput(argc, argv)
if (!*tp) { if (!*tp) {
tp = cp; tp = cp;
tp2 = tmpbuf; tp2 = tmpbuf;
while ((*tp2 = *tp) != (int) NULL) { while ((*tp2 = *tp)) {
if (isupper(*tp2)) { if (isupper(*tp2)) {
*tp2 = 'a' + *tp2 - 'A'; *tp2 = 'a' + *tp2 - 'A';
} }
@ -573,7 +573,7 @@ usage:
if (!*tp) { if (!*tp) {
tp = argv[2]; tp = argv[2];
tp2 = tmpbuf; tp2 = tmpbuf;
while ((*tp2 = *tp) != (int) NULL) { while ((*tp2 = *tp)) {
if (isupper(*tp2)) { if (isupper(*tp2)) {
*tp2 = 'a' + *tp2 - 'A'; *tp2 = 'a' + *tp2 - 'A';
} }
@ -715,7 +715,7 @@ void mget(argc, argv)
if (!*tp) { if (!*tp) {
tp = cp; tp = cp;
tp2 = tmpbuf; tp2 = tmpbuf;
while ((*tp2 = *tp) != (int) NULL) { while ((*tp2 = *tp)) {
if (isupper(*tp2)) { if (isupper(*tp2)) {
*tp2 = 'a' + *tp2 - 'A'; *tp2 = 'a' + *tp2 - 'A';
} }
@ -1686,7 +1686,7 @@ void disconnect()
if (!connected) if (!connected)
return; return;
(void) command("QUIT"); (void) command("QUIT");
cout = (int) NULL; cout = 0;
connected = 0; connected = 0;
data = -1; data = -1;
if (!proxy) { if (!proxy) {

View file

@ -295,7 +295,7 @@ int command(const char *fmt, ...)
printf("\n"); printf("\n");
(void) fflush(stdout); (void) fflush(stdout);
} }
if (cout == (int) NULL) { if (cout == 0) {
perror ("No control connection for command"); perror ("No control connection for command");
code = -1; code = -1;
return (0); return (0);
@ -583,7 +583,7 @@ null();// (void) signal(SIGPIPE, oldintp);
return; return;
} }
dout = dataconn(mode); dout = dataconn(mode);
if (dout == (int)NULL) if (!dout)
goto abort; goto abort;
(void) gettimeofday(&start, (struct timezone *)0); (void) gettimeofday(&start, (struct timezone *)0);
null();// oldintp = signal(SIGPIPE, SIG_IGN); null();// oldintp = signal(SIGPIPE, SIG_IGN);
@ -887,7 +887,7 @@ null();// (void) signal(SIGINT, oldintr);
} }
} }
din = dataconn("r"); din = dataconn("r");
if (din == (int)NULL) if (!din)
goto abort; goto abort;
if (strcmp(local, "-") == 0) if (strcmp(local, "-") == 0)
fout = stdout; fout = stdout;
@ -1271,7 +1271,7 @@ int dataconn(const char *mode)
if (s < 0) { if (s < 0) {
perror("ftp: accept"); perror("ftp: accept");
(void) closesocket(data), data = -1; (void) closesocket(data), data = -1;
return (int) (NULL); return 0;
} }
if(closesocket(data)) { if(closesocket(data)) {
int iret=WSAGetLastError (); int iret=WSAGetLastError ();

View file

@ -49,11 +49,6 @@
#define STRU_R 2 #define STRU_R 2
#define STRU_P 3 #define STRU_P 3
#define SIGQUIT 1
#define SIGPIPE 2
#define SIGALRM 3
#define FORM_N 1 #define FORM_N 1
#define FORM_T 2 #define FORM_T 2
#define FORM_C 3 #define FORM_C 3

View file

@ -264,9 +264,9 @@ void lostpeer(void)
extern int data; extern int data;
if (connected) { if (connected) {
if (cout != (int) NULL) { if (cout) {
closesocket(cout); closesocket(cout);
cout = (int) NULL; cout = 0;
} }
if (data >= 0) { if (data >= 0) {
(void) shutdown(data, 1+1); (void) shutdown(data, 1+1);
@ -277,9 +277,9 @@ void lostpeer(void)
} }
pswitch(1); pswitch(1);
if (connected) { if (connected) {
if (cout != (int)NULL) { if (cout) {
closesocket(cout); closesocket(cout);
cout = (int) NULL; cout = 0;
} }
connected = 0; connected = 0;
} }
@ -538,7 +538,7 @@ void help(argc, argv)
char *argv[]; char *argv[];
{ {
extern struct cmd cmdtab[]; extern struct cmd cmdtab[];
register struct cmd *c; struct cmd *c;
if (argc == 1) { if (argc == 1) {
register int i, j, w, k; register int i, j, w, k;
@ -591,7 +591,7 @@ void help(argc, argv)
else if (c == (struct cmd *)0) else if (c == (struct cmd *)0)
printf("?Invalid help command %s\n", arg); printf("?Invalid help command %s\n", arg);
else else
printf("%-*s\t%s\n", HELPINDENT, printf("%-*s\t%s\n", (int)HELPINDENT,
c->c_name, c->c_help); c->c_name, c->c_help);
} }
(void) fflush(stdout); (void) fflush(stdout);

View file

@ -926,7 +926,7 @@ VOID DIALOG_HelpHelp(VOID)
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(disable : 4100) #pragma warning(disable : 4100)
#endif #endif
BOOL CALLBACK INT_PTR CALLBACK
AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{ {
HWND hLicenseEditWnd; HWND hLicenseEditWnd;

View file

@ -55,7 +55,7 @@ VOID DIALOG_HelpAboutWine(VOID);
VOID DIALOG_TimeDate(VOID); VOID DIALOG_TimeDate(VOID);
BOOL CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
/* utility functions */ /* utility functions */
VOID ShowLastError(void); VOID ShowLastError(void);

View file

@ -91,7 +91,7 @@ static int NOTEPAD_MenuCommand(WPARAM wParam)
case CMD_ABOUT: DialogBox(GetModuleHandle(NULL), case CMD_ABOUT: DialogBox(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDD_ABOUTBOX), MAKEINTRESOURCE(IDD_ABOUTBOX),
Globals.hMainWnd, Globals.hMainWnd,
(DLGPROC) AboutDialogProc); AboutDialogProc);
break; break;
case CMD_ABOUT_WINE: DIALOG_HelpAboutWine(); break; case CMD_ABOUT_WINE: DIALOG_HelpAboutWine(); break;

View file

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd"> <!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
<group xmlns:xi="http://www.w3.org/2001/XInclude"> <group xmlns:xi="http://www.w3.org/2001/XInclude">
<module name="regedit" type="win32gui" installname="regedit.exe"> <module name="regedit" type="win32gui" installname="regedit.exe" allowwarnings="true">
<include base="regedit">.</include> <include base="regedit">.</include>
<define name="UNICODE" /> <define name="UNICODE" />
<define name="_UNICODE" /> <define name="_UNICODE" />
@ -10,7 +10,6 @@
<library>user32</library> <library>user32</library>
<library>gdi32</library> <library>gdi32</library>
<library>advapi32</library> <library>advapi32</library>
<library>comdlg32</library>
<library>ole32</library> <library>ole32</library>
<library>shell32</library> <library>shell32</library>
<library>comctl32</library> <library>comctl32</library>

View file

@ -88,7 +88,7 @@ static void SidToUserName(PSID Sid, LPWSTR szBuffer, DWORD BufferSize)
void PerfDataRefresh(void) void PerfDataRefresh(void)
{ {
SIZE_T ulSize; ULONG ulSize;
NTSTATUS status; NTSTATUS status;
LPBYTE pBuffer; LPBYTE pBuffer;
ULONG BufferSize; ULONG BufferSize;
@ -393,7 +393,7 @@ int PerfGetIndexByProcessId(DWORD dwProcessId)
for (Index = 0; Index < ProcessCount; Index++) for (Index = 0; Index < ProcessCount; Index++)
{ {
if ((DWORD)pPerfData[Index].ProcessId == dwProcessId) if (PtrToUlong(pPerfData[Index].ProcessId) == dwProcessId)
{ {
FoundIndex = Index; FoundIndex = Index;
break; break;
@ -412,7 +412,7 @@ ULONG PerfDataGetProcessId(ULONG Index)
EnterCriticalSection(&PerfDataCriticalSection); EnterCriticalSection(&PerfDataCriticalSection);
if (Index < ProcessCount) if (Index < ProcessCount)
ProcessId = (ULONG)pPerfData[Index].ProcessId; ProcessId = PtrToUlong(pPerfData[Index].ProcessId);
else else
ProcessId = 0; ProcessId = 0;

View file

@ -1670,7 +1670,7 @@ static LRESULT CALLBACK MACRO_TestDialogProc(HWND hDlg, UINT msg, WPARAM wParam,
void macro_test(void) void macro_test(void)
{ {
WNDPROC lpfnDlg = MakeProcInstance(MACRO_TestDialogProc, Globals.hInstance); WNDPROC lpfnDlg = MakeProcInstance(MACRO_TestDialogProc, Globals.hInstance);
DialogBox(Globals.hInstance, STRING_DIALOG_TEST, Globals.active_win->hMainWnd, (DLGPROC)lpfnDlg); DialogBox(Globals.hInstance, STRING_DIALOG_TEST, Globals.active_win->hMainWnd, lpfnDlg);
FreeProcInstance(lpfnDlg); FreeProcInstance(lpfnDlg);
macro = szTestMacro; macro = szTestMacro;
} }

View file

@ -848,7 +848,7 @@ void CALLBACK MACRO_RegisterRoutine(LPCSTR dll_name, LPCSTR proc, LPCSTR args)
dll->class = dll->handler ? (dll->handler)(DW_WHATMSG, 0, 0) : DC_NOMSG; dll->class = dll->handler ? (dll->handler)(DW_WHATMSG, 0, 0) : DC_NOMSG;
WINE_TRACE("Got class %x for DLL %s\n", dll->class, dll_name); WINE_TRACE("Got class %x for DLL %s\n", dll->class, dll_name);
if (dll->class & DC_INITTERM) dll->handler(DW_INIT, 0, 0); if (dll->class & DC_INITTERM) dll->handler(DW_INIT, 0, 0);
if (dll->class & DC_CALLBACKS) dll->handler(DW_CALLBACKS, (DWORD)Callbacks, 0); if (dll->class & DC_CALLBACKS) dll->handler(DW_CALLBACKS, (DWORD_PTR)Callbacks, 0);
} }
else WINE_WARN("OOM\n"); else WINE_WARN("OOM\n");
} }

View file

@ -148,7 +148,7 @@ MSZipCodecUncompress(PVOID OutputBuffer,
return CS_BADSTREAM; return CS_BADSTREAM;
} }
ZStream.next_in = (PUCHAR)((ULONG)InputBuffer + 2); ZStream.next_in = ((PUCHAR)InputBuffer )+ 2;
ZStream.avail_in = *InputLength - 2; ZStream.avail_in = *InputLength - 2;
ZStream.next_out = (PUCHAR)OutputBuffer; ZStream.next_out = (PUCHAR)OutputBuffer;
ZStream.avail_out = abs(*OutputLength); ZStream.avail_out = abs(*OutputLength);

View file

@ -699,7 +699,7 @@ SetupStartPage(PINPUT_RECORD Ir)
INFCONTEXT Context; INFCONTEXT Context;
PWCHAR Value; PWCHAR Value;
UINT ErrorLine; UINT ErrorLine;
SIZE_T ReturnSize; ULONG ReturnSize;
CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT)); CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT));

View file

@ -903,7 +903,7 @@ CreatePartitionList (SHORT Left,
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
SYSTEM_DEVICE_INFORMATION Sdi; SYSTEM_DEVICE_INFORMATION Sdi;
IO_STATUS_BLOCK Iosb; IO_STATUS_BLOCK Iosb;
SIZE_T ReturnSize; ULONG ReturnSize;
NTSTATUS Status; NTSTATUS Status;
ULONG DiskNumber; ULONG DiskNumber;
WCHAR Buffer[MAX_PATH]; WCHAR Buffer[MAX_PATH];

View file

@ -504,7 +504,7 @@ done:
} }
cleanup: cleanup:
hThread = (HANDLE)InterlockedExchange((LONG*)&hInstallationThread, 0); hThread = InterlockedExchangePointer((PVOID*)&hInstallationThread, 0);
if(hThread != NULL) if(hThread != NULL)
{ {
CloseHandle(hThread); CloseHandle(hThread);

View file

@ -179,7 +179,7 @@ _tWinMain(HINSTANCE hInst,
rcRightPanel.left = rcLeftPanel.right; rcRightPanel.left = rcLeftPanel.right;
rcRightPanel.right = ulInnerWidth - 1; rcRightPanel.right = ulInnerWidth - 1;
if (!LoadString(hInstance, (UINT)MAKEINTRESOURCE(IDS_APPTITLE), szAppTitle, 80)) if (!LoadString(hInstance, (UINT_PTR)MAKEINTRESOURCE(IDS_APPTITLE), szAppTitle, 80))
_tcscpy(szAppTitle, TEXT("ReactOS Welcome")); _tcscpy(szAppTitle, TEXT("ReactOS Welcome"));
/* Create main window */ /* Create main window */
@ -386,7 +386,7 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
rcLeftPanel.right - rcLeftPanel.left, rcLeftPanel.right - rcLeftPanel.left,
dwHeight, dwHeight,
hWnd, hWnd,
(HMENU)i, (HMENU)IntToPtr(i),
hInstance, hInstance,
NULL); NULL);
hwndDefaultTopic = hwndTopicButton[i]; hwndDefaultTopic = hwndTopicButton[i];

View file

@ -307,10 +307,10 @@ static BOOL RunFile(LPTSTR filename)
ret = (hShExt)(NULL, _T("open"), filename, NULL, NULL, SW_SHOWNORMAL); ret = (hShExt)(NULL, _T("open"), filename, NULL, NULL, SW_SHOWNORMAL);
TRACE ("RunFile: ShellExecuteA/W returned %d\n", (DWORD)ret); TRACE ("RunFile: ShellExecuteA/W returned 0x%p\n", ret);
FreeLibrary(hShell32); FreeLibrary(hShell32);
return (((DWORD)ret) > 32); return (((DWORD_PTR)ret) > 32);
} }

View file

@ -117,13 +117,13 @@ ScmGetServiceEntryByResumeCount(DWORD dwResumeCount)
PSERVICE PSERVICE
ScmGetServiceEntryByClientHandle(ULONG Handle) ScmGetServiceEntryByClientHandle(HANDLE Handle)
{ {
PLIST_ENTRY ServiceEntry; PLIST_ENTRY ServiceEntry;
PSERVICE CurrentService; PSERVICE CurrentService;
DPRINT("ScmGetServiceEntryByClientHandle() called\n"); DPRINT("ScmGetServiceEntryByClientHandle() called\n");
DPRINT("looking for %lu\n", Handle); DPRINT("looking for %p\n", Handle);
ServiceEntry = ServiceListHead.Flink; ServiceEntry = ServiceListHead.Flink;
while (ServiceEntry != &ServiceListHead) while (ServiceEntry != &ServiceListHead)

View file

@ -1018,7 +1018,7 @@ DWORD RSetServiceStatus(
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
} }
lpService = ScmGetServiceEntryByClientHandle(hServiceStatus); lpService = ScmGetServiceEntryByClientHandle((HANDLE)hServiceStatus);
if (lpService == NULL) if (lpService == NULL)
{ {
DPRINT1("lpService == NULL!\n"); DPRINT1("lpService == NULL!\n");

View file

@ -107,7 +107,7 @@ DWORD ScmStartService(PSERVICE Service,
PSERVICE ScmGetServiceEntryByName(LPWSTR lpServiceName); PSERVICE ScmGetServiceEntryByName(LPWSTR lpServiceName);
PSERVICE ScmGetServiceEntryByDisplayName(LPWSTR lpDisplayName); PSERVICE ScmGetServiceEntryByDisplayName(LPWSTR lpDisplayName);
PSERVICE ScmGetServiceEntryByResumeCount(DWORD dwResumeCount); PSERVICE ScmGetServiceEntryByResumeCount(DWORD dwResumeCount);
PSERVICE ScmGetServiceEntryByClientHandle(ULONG ThreadId); PSERVICE ScmGetServiceEntryByClientHandle(HANDLE Handle);
DWORD ScmCreateNewServiceRecord(LPWSTR lpServiceName, DWORD ScmCreateNewServiceRecord(LPWSTR lpServiceName,
PSERVICE *lpServiceRecord); PSERVICE *lpServiceRecord);
VOID ScmDeleteServiceRecord(PSERVICE lpService); VOID ScmDeleteServiceRecord(PSERVICE lpService);

View file

@ -435,7 +435,7 @@ SmCreateClient (PRTL_USER_PROCESS_INFORMATION ProcessInfo, PWSTR ProgramName)
SmpClientDirectory.CandidateClient->ServerProcess = SmpClientDirectory.CandidateClient->ServerProcess =
(HANDLE) ProcessInfo->ProcessHandle; (HANDLE) ProcessInfo->ProcessHandle;
SmpClientDirectory.CandidateClient->ServerProcessId = SmpClientDirectory.CandidateClient->ServerProcessId =
(ULONG) ProcessInfo->ClientId.UniqueProcess; (DWORD_PTR) ProcessInfo->ClientId.UniqueProcess;
/* /*
* Copy the program name * Copy the program name
*/ */

View file

@ -41,8 +41,8 @@ NTSTATUS NTAPI SmRegisterInternalSubsystem (LPWSTR PgmName,
RtlZeroMemory (& ProcessInfo, sizeof ProcessInfo); RtlZeroMemory (& ProcessInfo, sizeof ProcessInfo);
ProcessInfo.Size = sizeof ProcessInfo; ProcessInfo.Size = sizeof ProcessInfo;
ProcessInfo.ProcessHandle = (HANDLE) SmSsProcessId; ProcessInfo.ProcessHandle = (HANDLE) UlongToPtr(SmSsProcessId);
ProcessInfo.ClientId.UniqueProcess = (HANDLE) SmSsProcessId; ProcessInfo.ClientId.UniqueProcess = (HANDLE) UlongToPtr(SmSsProcessId);
DPRINT("SM: %s: ProcessInfo.ProcessHandle=%p\n", DPRINT("SM: %s: ProcessInfo.ProcessHandle=%p\n",
__FUNCTION__,ProcessInfo.ProcessHandle); __FUNCTION__,ProcessInfo.ProcessHandle);
Status = SmCreateClient (& ProcessInfo, PgmName); Status = SmCreateClient (& ProcessInfo, PgmName);

View file

@ -24,7 +24,7 @@ SMAPI(SmCompSes)
DPRINT("SM: %s: ClientId.UniqueProcess=%p\n", DPRINT("SM: %s: ClientId.UniqueProcess=%p\n",
__FUNCTION__, Request->Header.ClientId.UniqueProcess); __FUNCTION__, Request->Header.ClientId.UniqueProcess);
Status = SmCompleteClientInitialization ((ULONG) Request->Header.ClientId.UniqueProcess); Status = SmCompleteClientInitialization (PtrToUlong(Request->Header.ClientId.UniqueProcess));
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DPRINT1("SM: %s: SmCompleteClientInitialization failed (Status=0x%08lx)\n", DPRINT1("SM: %s: SmCompleteClientInitialization failed (Status=0x%08lx)\n",

View file

@ -505,7 +505,7 @@ HandleLogoff(
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
static BOOL CALLBACK static INT_PTR CALLBACK
ShutdownComputerWindowProc( ShutdownComputerWindowProc(
IN HWND hwndDlg, IN HWND hwndDlg,
IN UINT uMsg, IN UINT uMsg,

View file

@ -185,7 +185,7 @@ RemoveStatusMessage(
return Session->Gina.Functions.WlxRemoveStatusMessage(Session->Gina.Context); return Session->Gina.Functions.WlxRemoveStatusMessage(Session->Gina.Context);
} }
static BOOL CALLBACK static INT_PTR CALLBACK
GinaLoadFailedWindowProc( GinaLoadFailedWindowProc(
IN HWND hwndDlg, IN HWND hwndDlg,
IN UINT uMsg, IN UINT uMsg,

View file

@ -23,7 +23,7 @@ static UINT_PTR IdTimer;
/* FUNCTIONS ****************************************************************/ /* FUNCTIONS ****************************************************************/
static BOOL CALLBACK static INT_PTR CALLBACK
DefaultWlxWindowProc( DefaultWlxWindowProc(
IN HWND hwndDlg, IN HWND hwndDlg,
IN UINT uMsg, IN UINT uMsg,

View file

@ -403,7 +403,7 @@ RegCloseKey(HKEY hKey)
NTSTATUS Status; NTSTATUS Status;
/* don't close null handle or a pseudo handle */ /* don't close null handle or a pseudo handle */
if ((!hKey) || (((ULONG)hKey & 0xF0000000) == 0x80000000)) if ((!hKey) || (((ULONG_PTR)hKey & 0xF0000000) == 0x80000000))
{ {
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
} }
@ -1031,7 +1031,7 @@ RegCreateKeyExA(HKEY hKey,
return RtlNtStatusToDosError(Status); return RtlNtStatusToDosError(Status);
} }
TRACE("ParentKey %x\n", (ULONG)ParentKey); TRACE("ParentKey %p\n", ParentKey);
if (lpClass != NULL) if (lpClass != NULL)
{ {
@ -1105,7 +1105,7 @@ RegCreateKeyExW(HKEY hKey,
return RtlNtStatusToDosError(Status); return RtlNtStatusToDosError(Status);
} }
TRACE("ParentKey %x\n", (ULONG)ParentKey); TRACE("ParentKey %p\n", ParentKey);
RtlInitUnicodeString(&ClassString, RtlInitUnicodeString(&ClassString,
lpClass); lpClass);

View file

@ -3788,7 +3788,7 @@ WINADVAPI BOOL WINAPI CryptGetUserKey (HCRYPTPROV, DWORD, HCRYPTKEY *);
WINADVAPI BOOL WINAPI CryptHashData (HCRYPTHASH, CONST BYTE *, DWORD, DWORD); WINADVAPI BOOL WINAPI CryptHashData (HCRYPTHASH, CONST BYTE *, DWORD, DWORD);
WINADVAPI BOOL WINAPI CryptHashSessionKey (HCRYPTHASH, HCRYPTKEY, DWORD); WINADVAPI BOOL WINAPI CryptHashSessionKey (HCRYPTHASH, HCRYPTKEY, DWORD);
WINADVAPI BOOL WINAPI CryptImportKey (HCRYPTPROV, CONST BYTE *, DWORD, HCRYPTKEY, DWORD, HCRYPTKEY *); WINADVAPI BOOL WINAPI CryptImportKey (HCRYPTPROV, CONST BYTE *, DWORD, HCRYPTKEY, DWORD, HCRYPTKEY *);
WINADVAPI BOOL WINAPI CryptReleaseContext (HCRYPTPROV, ULONG_PTR); WINADVAPI BOOL WINAPI CryptReleaseContext (HCRYPTPROV, DWORD);
WINADVAPI BOOL WINAPI CryptSetHashParam (HCRYPTHASH, DWORD, CONST BYTE *, DWORD); WINADVAPI BOOL WINAPI CryptSetHashParam (HCRYPTHASH, DWORD, CONST BYTE *, DWORD);
WINADVAPI BOOL WINAPI CryptSetKeyParam (HCRYPTKEY, DWORD, CONST BYTE *, DWORD); WINADVAPI BOOL WINAPI CryptSetKeyParam (HCRYPTKEY, DWORD, CONST BYTE *, DWORD);
WINADVAPI BOOL WINAPI CryptSetProviderA (LPCSTR, DWORD); WINADVAPI BOOL WINAPI CryptSetProviderA (LPCSTR, DWORD);

View file

@ -2703,7 +2703,7 @@ extern "C" {
#define STATE_SYSTEM_VALID 0x1fffffff #define STATE_SYSTEM_VALID 0x1fffffff
#ifndef RC_INVOKED #ifndef RC_INVOKED
typedef BOOL(CALLBACK *DLGPROC)(HWND,UINT,WPARAM,LPARAM); typedef INT_PTR(CALLBACK *DLGPROC)(HWND,UINT,WPARAM,LPARAM);
typedef VOID(CALLBACK *TIMERPROC)(HWND,UINT,UINT,DWORD); typedef VOID(CALLBACK *TIMERPROC)(HWND,UINT,UINT,DWORD);
typedef BOOL(CALLBACK *GRAYSTRINGPROC)(HDC,LPARAM,int); typedef BOOL(CALLBACK *GRAYSTRINGPROC)(HDC,LPARAM,int);
typedef LRESULT(CALLBACK *HOOKPROC)(int,WPARAM,LPARAM); typedef LRESULT(CALLBACK *HOOKPROC)(int,WPARAM,LPARAM);

View file

@ -11,7 +11,7 @@
#define SERVICE_CONTROL_START 0 #define SERVICE_CONTROL_START 0
typedef DWORD CLIENT_HANDLE; DECLARE_HANDLE(CLIENT_HANDLE);
typedef struct _SCM_CONTROL_PACKET typedef struct _SCM_CONTROL_PACKET
{ {