From 316ca7fc5830193d33550b727d42e4e2ecfcee42 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sun, 3 Dec 2006 20:36:53 +0000 Subject: [PATCH] - give getfirefox a WinMain it deserves - theres no reason to include NDK for it - fix a bug in dlOnProgress while debugging it svn path=/trunk/; revision=25045 --- reactos/base/applications/getfirefox/getfirefox.c | 14 +++++++++----- reactos/base/applications/getfirefox/precomp.h | 2 -- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/reactos/base/applications/getfirefox/getfirefox.c b/reactos/base/applications/getfirefox/getfirefox.c index 40d758f43fa..1dbe21a094f 100644 --- a/reactos/base/applications/getfirefox/getfirefox.c +++ b/reactos/base/applications/getfirefox/getfirefox.c @@ -123,7 +123,7 @@ dlOnProgress(IBindStatusCallback* iface, ULONG ulProgress, } Item = GetDlgItem(This->hDialog, IDC_STATUS); - if (NULL != Item) + if (NULL != Item && NULL != szStatusText) { SendMessageW(Item, WM_GETTEXT, sizeof(OldText) / sizeof(OldText[0]), (LPARAM) OldText); @@ -371,13 +371,17 @@ dlProc(HWND Dlg, UINT Msg, WPARAM wParam, LPARAM lParam) /*********************************************************************** * Main program */ -int -main(int argc, char *argv[]) + +int WINAPI +WinMain(HINSTANCE hThisInstance, + HINSTANCE hPrevInstance, + LPSTR lpCmdLine, + int nCmdShow) { InitCommonControls(); - DialogBoxW(GetModuleHandle(NULL), MAKEINTRESOURCEW(IDD_GETFIREFOX), 0, + DialogBoxW(hThisInstance, MAKEINTRESOURCEW(IDD_GETFIREFOX), 0, dlProc); - return 0; + } diff --git a/reactos/base/applications/getfirefox/precomp.h b/reactos/base/applications/getfirefox/precomp.h index b06adaf7635..74846e2a836 100644 --- a/reactos/base/applications/getfirefox/precomp.h +++ b/reactos/base/applications/getfirefox/precomp.h @@ -7,10 +7,8 @@ */ #define COBJMACROS -#define NTOS_MODE_USER #define WIN32_NO_STATUS #include -#include #include #include #include