mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 12:55:43 +00:00
[RUNDLL32]
Rundll32 always returns 0. Mike McCormack (mike at codeweavers dot com) svn path=/trunk/; revision=59015
This commit is contained in:
parent
48107c0124
commit
85a5ed077a
1 changed files with 4 additions and 6 deletions
|
@ -343,7 +343,7 @@ int WINAPI _tWinMain(
|
||||||
DllWinMainW fnDllWinMainW;
|
DllWinMainW fnDllWinMainW;
|
||||||
DllWinMainA fnDllWinMainA;
|
DllWinMainA fnDllWinMainA;
|
||||||
HWND hWindow;
|
HWND hWindow;
|
||||||
int nRetVal,i;
|
int i;
|
||||||
size_t nStrLen;
|
size_t nStrLen;
|
||||||
|
|
||||||
// Get command-line in argc-argv format
|
// Get command-line in argc-argv format
|
||||||
|
@ -381,8 +381,6 @@ int WINAPI _tWinMain(
|
||||||
else
|
else
|
||||||
lptCmdLine = _T("");
|
lptCmdLine = _T("");
|
||||||
|
|
||||||
nRetVal = 0;
|
|
||||||
|
|
||||||
// Everything is all setup, so load the dll now
|
// Everything is all setup, so load the dll now
|
||||||
hDll = LoadLibrary(lptDllName);
|
hDll = LoadLibrary(lptDllName);
|
||||||
if (hDll) {
|
if (hDll) {
|
||||||
|
@ -439,13 +437,13 @@ int WINAPI _tWinMain(
|
||||||
if (fnDllWinMainW) {
|
if (fnDllWinMainW) {
|
||||||
// Convert the command-line string to unicode and call the dll function
|
// Convert the command-line string to unicode and call the dll function
|
||||||
lpwCmdLine = ConvertToWideChar(lptCmdLine);
|
lpwCmdLine = ConvertToWideChar(lptCmdLine);
|
||||||
nRetVal = fnDllWinMainW(hWindow,hInstance,lpwCmdLine,nCmdShow);
|
fnDllWinMainW(hWindow,hInstance,lpwCmdLine,nCmdShow);
|
||||||
FreeConvertedWideChar(lpwCmdLine);
|
FreeConvertedWideChar(lpwCmdLine);
|
||||||
}
|
}
|
||||||
else if (fnDllWinMainA) {
|
else if (fnDllWinMainA) {
|
||||||
// Convert the command-line string to ansi and call the dll function
|
// Convert the command-line string to ansi and call the dll function
|
||||||
lpaCmdLine = ConvertToMultiByte(lptCmdLine);
|
lpaCmdLine = ConvertToMultiByte(lptCmdLine);
|
||||||
nRetVal = fnDllWinMainA(hWindow,hInstance,lpaCmdLine,nCmdShow);
|
fnDllWinMainA(hWindow,hInstance,lpaCmdLine,nCmdShow);
|
||||||
FreeConvertedMultiByte(lpaCmdLine);
|
FreeConvertedMultiByte(lpaCmdLine);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -478,6 +476,6 @@ int WINAPI _tWinMain(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argv) free(argv);
|
if (argv) free(argv);
|
||||||
return nRetVal;
|
return 0; /* rundll32 always returns 0! */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue