From 85a5ed077a67de5823e30f3749b55bc09eb45335 Mon Sep 17 00:00:00 2001 From: Sylvain Petreolle Date: Wed, 15 May 2013 12:41:25 +0000 Subject: [PATCH] [RUNDLL32] Rundll32 always returns 0. Mike McCormack (mike at codeweavers dot com) svn path=/trunk/; revision=59015 --- reactos/base/system/rundll32/rundll32.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/reactos/base/system/rundll32/rundll32.c b/reactos/base/system/rundll32/rundll32.c index 82a97fe374a..be5b364f880 100644 --- a/reactos/base/system/rundll32/rundll32.c +++ b/reactos/base/system/rundll32/rundll32.c @@ -343,7 +343,7 @@ int WINAPI _tWinMain( DllWinMainW fnDllWinMainW; DllWinMainA fnDllWinMainA; HWND hWindow; - int nRetVal,i; + int i; size_t nStrLen; // Get command-line in argc-argv format @@ -381,8 +381,6 @@ int WINAPI _tWinMain( else lptCmdLine = _T(""); - nRetVal = 0; - // Everything is all setup, so load the dll now hDll = LoadLibrary(lptDllName); if (hDll) { @@ -439,13 +437,13 @@ int WINAPI _tWinMain( if (fnDllWinMainW) { // Convert the command-line string to unicode and call the dll function lpwCmdLine = ConvertToWideChar(lptCmdLine); - nRetVal = fnDllWinMainW(hWindow,hInstance,lpwCmdLine,nCmdShow); + fnDllWinMainW(hWindow,hInstance,lpwCmdLine,nCmdShow); FreeConvertedWideChar(lpwCmdLine); } else if (fnDllWinMainA) { // Convert the command-line string to ansi and call the dll function lpaCmdLine = ConvertToMultiByte(lptCmdLine); - nRetVal = fnDllWinMainA(hWindow,hInstance,lpaCmdLine,nCmdShow); + fnDllWinMainA(hWindow,hInstance,lpaCmdLine,nCmdShow); FreeConvertedMultiByte(lpaCmdLine); } else { @@ -478,6 +476,6 @@ int WINAPI _tWinMain( } if (argv) free(argv); - return nRetVal; + return 0; /* rundll32 always returns 0! */ }