From fedd1785642b108e4e2ffefe9783c6d544265beb Mon Sep 17 00:00:00 2001 From: Rafal Harabien Date: Sun, 15 Jan 2012 13:37:25 +0000 Subject: [PATCH] [INTL] - Add DPRINTs to track possible unattended setup timeouts svn path=/trunk/; revision=54972 --- reactos/dll/cpl/intl/CMakeLists.txt | 3 ++- reactos/dll/cpl/intl/generalp.c | 3 ++- reactos/dll/cpl/intl/intl.c | 25 ++++++++++++------------- reactos/dll/cpl/intl/intl.h | 1 + 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/reactos/dll/cpl/intl/CMakeLists.txt b/reactos/dll/cpl/intl/CMakeLists.txt index aab417c73ee..d0c7d7cbc64 100644 --- a/reactos/dll/cpl/intl/CMakeLists.txt +++ b/reactos/dll/cpl/intl/CMakeLists.txt @@ -28,7 +28,8 @@ add_importlibs(intl advapi32 setupapi shell32 - kernel32) + kernel32 + ntdll) add_pch(intl intl.h) add_cd_file(TARGET intl DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/cpl/intl/generalp.c b/reactos/dll/cpl/intl/generalp.c index c2aa089a144..945e1f2e6c6 100644 --- a/reactos/dll/cpl/intl/generalp.c +++ b/reactos/dll/cpl/intl/generalp.c @@ -331,7 +331,8 @@ GeneralPageProc(HWND hwndDlg, { SetNewLocale(UnattendLCID); PostQuitMessage(0); - } + } else + DPRINT1("VerifyUnattendLCID failed\n"); return TRUE; } break; diff --git a/reactos/dll/cpl/intl/intl.c b/reactos/dll/cpl/intl/intl.c index 5610abcf57f..eeed1ac4f06 100644 --- a/reactos/dll/cpl/intl/intl.c +++ b/reactos/dll/cpl/intl/intl.c @@ -67,29 +67,26 @@ OpenSetupInf(VOID) lpCmdLine = GetCommandLine(); lpSwitch = _tcsstr(lpCmdLine, _T("/f:\"")); - - if(!lpSwitch) - { + if (!lpSwitch) return FALSE; - } len = _tcslen(lpSwitch); - if (len < 5) - { - return FALSE; - } - - if(lpSwitch[len-1] != _T('\"')) + if (len < 5 || lpSwitch[len-1] != _T('\"')) { + DPRINT1("Invalid switch: %ls\n", lpSwitch); return FALSE; } lpSwitch[len-1] = _T('\0'); - hSetupInf = SetupOpenInfFile(&lpSwitch[4], NULL, - INF_STYLE_OLDNT, NULL); + hSetupInf = SetupOpenInfFile(&lpSwitch[4], NULL, INF_STYLE_OLDNT, NULL); + if (hSetupInf == INVALID_HANDLE_VALUE) + { + DPRINT1("Failed to open INF file: %ls\n", &lpSwitch[4]); + return FALSE; + } - return (hSetupInf != INVALID_HANDLE_VALUE); + return TRUE; } VOID @@ -104,6 +101,7 @@ ParseSetupInf(VOID) &InfContext)) { SetupCloseInfFile(hSetupInf); + DPRINT1("SetupFindFirstLine failed\n"); return; } @@ -111,6 +109,7 @@ ParseSetupInf(VOID) sizeof(szBuffer) / sizeof(TCHAR), NULL)) { SetupCloseInfFile(hSetupInf); + DPRINT1("SetupGetStringField failed\n"); return; } diff --git a/reactos/dll/cpl/intl/intl.h b/reactos/dll/cpl/intl/intl.h index 29359010ad8..559287831f3 100644 --- a/reactos/dll/cpl/intl/intl.h +++ b/reactos/dll/cpl/intl/intl.h @@ -7,6 +7,7 @@ #include #include #include +#include #include "resource.h"