Author: akhaldi
Date: Sun Oct 30 17:16:53 2016
New Revision: 73079
URL:
http://svn.reactos.org/svn/reactos?rev=73079&view=rev
Log:
[0.4.3] * Merge regsvr32 fix by Mark in r73077. CORE-12209
Modified:
branches/ros-branch-0_4_3/ (props changed)
branches/ros-branch-0_4_3/reactos/ (props changed)
branches/ros-branch-0_4_3/reactos/base/system/regsvr32/regsvr32.c
Propchange: branches/ros-branch-0_4_3/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 30 17:16:53 2016
@@ -1 +1 @@
-/trunk:73043
+/trunk:73043,73077
Propchange: branches/ros-branch-0_4_3/reactos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 30 17:16:53 2016
@@ -21,4 +21,4 @@
/branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859
/branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567
/branches/wlan-bringup:54809-54998
-/trunk/reactos:73043
+/trunk/reactos:73043,73077
Modified: branches/ros-branch-0_4_3/reactos/base/system/regsvr32/regsvr32.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_3/reactos/base/s…
==============================================================================
--- branches/ros-branch-0_4_3/reactos/base/system/regsvr32/regsvr32.c [iso-8859-1]
(original)
+++ branches/ros-branch-0_4_3/reactos/base/system/regsvr32/regsvr32.c [iso-8859-1] Sun Oct
30 17:16:53 2016
@@ -258,7 +258,7 @@
LPCSTR lpFuncName;
LPWSTR lpwDllCmdLine;
BOOL bUnregister,bSilent,bConsole,bInstall,bNoRegister;
- UINT nDllCount;
+ UINT nDllCount, fuOldErrorMode;
HMODULE hDll;
DLLREGISTER fnDllRegister;
DLLINSTALL fnDllInstall;
@@ -386,9 +386,11 @@
if (*argv[i] != _T('/')) {
lptDllName = argv[i];
+ fuOldErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
// Everything is all setup, so load the dll now
hDll = LoadLibraryEx(lptDllName,0,LOAD_WITH_ALTERED_SEARCH_PATH);
if (hDll) {
+ SetErrorMode(fuOldErrorMode);
if (!bNoRegister) {
// Get the address of DllRegisterServer or DllUnregisterServer
fnDllRegister = (DLLREGISTER)GetProcAddress(hDll,lpFuncName);
@@ -463,6 +465,7 @@
else {
// The dll could not be loaded; display an error message
dwErr = GetLastError();
+ SetErrorMode(fuOldErrorMode);
lptMsgBuffer = (LPTSTR)malloc((_tcslen(DllNotLoaded) + 2 + _tcslen(lptDllName) + 1) *
sizeof(TCHAR));
_stprintf(lptMsgBuffer,DllNotLoaded,lptDllName,dwErr);
DisplayMessage(bConsole,bSilent,lptMsgBuffer,ModuleTitle,MB_ICONEXCLAMATION);