Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/localspl/provider.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/localspl/provider.c b/dlls/localspl/provider.c index ccd19811cf..8e5e3428d5 100644 --- a/dlls/localspl/provider.c +++ b/dlls/localspl/provider.c @@ -1499,12 +1499,6 @@ static BOOL WINAPI fpAddMonitor(LPWSTR pName, DWORD Level, LPBYTE pMonitors) return FALSE; }
- /* Load and initialize the monitor. SetLastError() is called on failure */ - if ((pm = monitor_load(mi2w->pName, mi2w->pDLLName)) == NULL) { - return FALSE; - } - monitor_unload(pm); - SetLastError(ERROR_SUCCESS); /* Monitor installer depends on this */
if (RegCreateKeyW(HKEY_LOCAL_MACHINE, monitorsW, &hroot) != ERROR_SUCCESS) { @@ -1538,7 +1532,17 @@ static BOOL WINAPI fpAddMonitor(LPWSTR pName, DWORD Level, LPBYTE pMonitors) res = (RegSetValueExW(hentry, driverW, 0, REG_SZ, (LPBYTE) mi2w->pDLLName, len) == ERROR_SUCCESS); } + + /* Load and initialize the monitor. SetLastError() is called on failure */ + if ((pm = monitor_load(mi2w->pName, mi2w->pDLLName)) == NULL) + res = FALSE; + + monitor_unload(pm); + RegCloseKey(hentry); + + if (!res) + RegDeleteKeyW(hroot, mi2w->pName); }
RegCloseKey(hroot);
Dmitry Timoshkov dmitry@baikal.ru writes:
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru
dlls/localspl/provider.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
This breaks the tests:
../../../tools/runtest -q -P wine -T ../../.. -M winspool.drv -p winspool.drv_test.exe info && touch info.ok info.c:438: Test failed: returned 1 with 127 (expected '!= 0' with ERROR_SUCCESS) info.c:445: Test failed: returned 0 with 127 (expected '0' with: ERROR_PRINT_MONITOR_ALREADY_INSTALLED or ERROR_ALREADY_EXISTS) info.c:2354: Tests skipped: Level 1 not supported info.c:2354: Tests skipped: Level 3 not supported make: *** [Makefile:180: info.ok] Error 2