[INTL]
authorRafal Harabien <rafalh@reactos.org>
Sun, 15 Jan 2012 13:37:25 +0000 (13:37 +0000)
committerRafal Harabien <rafalh@reactos.org>
Sun, 15 Jan 2012 13:37:25 +0000 (13:37 +0000)
- Add DPRINTs to track possible unattended setup timeouts

svn path=/trunk/; revision=54972

reactos/dll/cpl/intl/CMakeLists.txt
reactos/dll/cpl/intl/generalp.c
reactos/dll/cpl/intl/intl.c
reactos/dll/cpl/intl/intl.h

index aab417c..d0c7d7c 100644 (file)
@@ -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)
index c2aa089..945e1f2 100644 (file)
@@ -331,7 +331,8 @@ GeneralPageProc(HWND hwndDlg,
                 {
                     SetNewLocale(UnattendLCID);
                     PostQuitMessage(0);
-                }
+                } else
+                    DPRINT1("VerifyUnattendLCID failed\n");
                 return TRUE;
             }
             break;
index 5610abc..eeed1ac 100644 (file)
@@ -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)
+    if (len < 5 || lpSwitch[len-1] != _T('\"'))
     {
+        DPRINT1("Invalid switch: %ls\n", lpSwitch);
         return FALSE;
     }
 
-    if(lpSwitch[len-1] != _T('\"'))
+    lpSwitch[len-1] = _T('\0');
+
+    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;
     }
 
-    lpSwitch[len-1] = _T('\0');
-
-    hSetupInf = SetupOpenInfFile(&lpSwitch[4], NULL,
-                                 INF_STYLE_OLDNT, NULL);
-
-    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;
     }
 
index 2935901..5592878 100644 (file)
@@ -7,6 +7,7 @@
 #include <tchar.h>
 #include <prsht.h>
 #include <malloc.h>
+#include <debug.h>
 
 #include "resource.h"