[ros-diffs] [gedmurphy] 36844: Prepare for a change of architecture. Instead of building all Wine tests as dlls, we'll revert back to separate processes, but redirect the client processes stdin, stdout and stderr to named pipes set by the parent.

gedmurphy at svn.reactos.org gedmurphy at svn.reactos.org
Mon Oct 20 16:50:00 CEST 2008


Author: gedmurphy
Date: Mon Oct 20 09:49:59 2008
New Revision: 36844

URL: http://svn.reactos.org/svn/reactos?rev=36844&view=rev
Log:
Prepare for a change of architecture.
Instead of building all Wine tests as dlls, we'll revert back to separate processes, but redirect the client processes stdin, stdout and stderr to named pipes set by the parent.

Added:
    trunk/rostests/winetests/GUI/optionswnd.c   (with props)
Modified:
    trunk/rostests/winetests/GUI/browsewnd.c
    trunk/rostests/winetests/GUI/lang/en-US.rc
    trunk/rostests/winetests/GUI/mainwnd.c
    trunk/rostests/winetests/GUI/misc.c
    trunk/rostests/winetests/GUI/precomp.h
    trunk/rostests/winetests/GUI/resource.h

Modified: trunk/rostests/winetests/GUI/browsewnd.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/GUI/browsewnd.c?rev=36844&r1=36843&r2=36844&view=diff
==============================================================================
--- trunk/rostests/winetests/GUI/browsewnd.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/GUI/browsewnd.c [iso-8859-1] Mon Oct 20 09:49:59 2008
@@ -9,18 +9,16 @@
 
 #include <precomp.h>
 
-#define DLL_SEARCH_DIR L"\\Debug\\testlibs\\*"
+#define EXE_SEARCH_DIR L"\\Debug\\testexes\\*"
 #define IL_MAIN 0
 #define IL_TEST 1
 
 #define HAS_NO_CHILD 0
 #define HAS_CHILD 1
 
-typedef wchar_t *(__cdecl *DLLNAME)();
-typedef int (_cdecl *MODULES)(char **);
 
 static INT
-GetNumberOfDllsInFolder(LPWSTR lpFolder)
+GetNumberOfExesInFolder(LPWSTR lpFolder)
 {
     HANDLE hFind;
     WIN32_FIND_DATAW findFileData;
@@ -46,52 +44,52 @@
 }
 
 static INT
-GetListOfTestDlls(PMAIN_WND_INFO pInfo)
+GetListOfTestExes(PMAIN_WND_INFO pInfo)
 {
     HANDLE hFind;
     WIN32_FIND_DATAW findFileData;
-    WCHAR szDllPath[MAX_PATH];
+    WCHAR szExePath[MAX_PATH];
     LPWSTR ptr;
     INT numFiles = 0;
     INT len;
 
-    len = GetCurrentDirectory(MAX_PATH, szDllPath);
+    len = GetCurrentDirectory(MAX_PATH, szExePath);
     if (!len) return 0;
 
-    wcsncat(szDllPath, DLL_SEARCH_DIR, MAX_PATH - (len + 1));
-
-    numFiles = GetNumberOfDllsInFolder(szDllPath);
+    wcsncat(szExePath, EXE_SEARCH_DIR, MAX_PATH - (len + 1));
+
+    numFiles = GetNumberOfExesInFolder(szExePath);
     if (!numFiles) return 0;
 
-    pInfo->lpDllList = HeapAlloc(GetProcessHeap(),
+    pInfo->lpExeList = HeapAlloc(GetProcessHeap(),
                                  0,
                                  numFiles * (MAX_PATH * sizeof(WCHAR)));
-    if (!pInfo->lpDllList)
+    if (!pInfo->lpExeList)
         return 0;
 
-    hFind = FindFirstFileW(szDllPath,
+    hFind = FindFirstFileW(szExePath,
                            &findFileData);
     if (hFind == INVALID_HANDLE_VALUE)
     {
         DisplayError(GetLastError());
-        HeapFree(GetProcessHeap(), 0, pInfo->lpDllList);
+        HeapFree(GetProcessHeap(), 0, pInfo->lpExeList);
         return 0;
     }
 
     /* remove the glob */
-    ptr = wcschr(szDllPath, L'*');
+    ptr = wcschr(szExePath, L'*');
     if (ptr)
         *ptr = L'\0';
 
-    /* don't mod our base pointer */
-    ptr = pInfo->lpDllList;
+    /* don't modify our base pointer */
+    ptr = pInfo->lpExeList;
 
     do
     {
         if (!(findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
         {
             /* set the path */
-            wcscpy(ptr, szDllPath);
+            wcscpy(ptr, szExePath);
 
             /* tag the file onto the path */
             len = MAX_PATH - (wcslen(ptr) + 1);
@@ -207,7 +205,7 @@
 }
 
 static PTEST_ITEM
-BuildTestItemData(LPWSTR lpDll,
+BuildTestItemData(LPWSTR lpExe,
                   LPWSTR lpRun)
 {
     PTEST_ITEM pItem;
@@ -217,8 +215,8 @@
                                   sizeof(TEST_ITEM));
     if (pItem)
     {
-        if (lpDll)
-            wcsncpy(pItem->szSelectedDll, lpDll, MAX_PATH);
+        if (lpExe)
+            wcsncpy(pItem->szSelectedExe, lpExe, MAX_PATH);
         if (lpRun)
             wcsncpy(pItem->szRunString, lpRun, MAX_RUN_CMD);
     }
@@ -232,12 +230,9 @@
     HTREEITEM hRoot;
     HIMAGELIST hImgList;
     PTEST_ITEM pTestItem;
-    DLLNAME GetTestName;
-    MODULES GetModulesInTest;
-    HMODULE hDll;
-    LPWSTR lpDllPath;
+    LPWSTR lpExePath;
     LPWSTR lpTestName;
-    INT RootImage, i;
+    INT i;
 
     pInfo->hBrowseTV = GetDlgItem(pInfo->hBrowseDlg, IDC_TREEVIEW);
 
@@ -259,76 +254,36 @@
     hRoot = InsertIntoTreeView(pInfo->hBrowseTV,
                                NULL,
                                L"Full",
-                               pTestItem,
+                               (LPARAM)pTestItem,
                                IL_MAIN,
                                HAS_CHILD);
 
-    for (i = 0; i < pInfo->numDlls; i++)
-    {
-        lpDllPath = pInfo->lpDllList + (MAX_PATH * i);
-
-        hDll = LoadLibraryW(lpDllPath);
-        if (hDll)
-        {
-            GetTestName = (DLLNAME)GetProcAddress(hDll, "GetTestName");
-            if (GetTestName)
+    for (i = 0; i < pInfo->numExes; i++)
+    {
+        HTREEITEM hParent;
+        LPWSTR lpStr;
+
+        lpExePath = pInfo->lpExeList + (MAX_PATH * i);
+
+        lpTestName = wcsrchr(lpExePath, L'\\');
+        if (lpTestName)
+        {
+            lpTestName++;
+
+            lpStr = wcschr(lpTestName, L'_');
+            if (lpStr)
             {
-                HTREEITEM hParent;
-                LPSTR lpModules, ptr;
-                LPWSTR lpModW;
-                INT numMods;
-
-                lpTestName = GetTestName();
-
-                pTestItem = BuildTestItemData(lpDllPath, lpTestName);
+                //FIXME: Query the test name from the exe directly
+
+                pTestItem = BuildTestItemData(lpExePath, lpTestName);
 
                 hParent = InsertIntoTreeView(pInfo->hBrowseTV,
                                              hRoot,
                                              lpTestName,
-                                             pTestItem,
+                                             (LPARAM)pTestItem,
                                              IL_TEST,
                                              HAS_CHILD);
-                if (hParent)
-                {
-                    /* Get the list of modules a dll offers. This is returned as list of
-                     * Ansi null-terminated strings, terminated with an empty string (double null) */
-                    GetModulesInTest = (MODULES)GetProcAddress(hDll, "GetModulesInTest");
-                    if ((numMods = GetModulesInTest(&lpModules)))
-                    {
-                        ptr = lpModules;
-                        while (numMods && *ptr != '\0')
-                        {
-                            /* convert the string to unicode */
-                            if (AnsiToUnicode(ptr, &lpModW))
-                            {
-                                WCHAR szRunCmd[MAX_RUN_CMD];
-
-                                _snwprintf(szRunCmd, MAX_RUN_CMD, L"%s:%s", lpTestName, lpModW);
-                                pTestItem = BuildTestItemData(lpDllPath, szRunCmd);
-
-                                InsertIntoTreeView(pInfo->hBrowseTV,
-                                                   hParent,
-                                                   lpModW,
-                                                   pTestItem,
-                                                   IL_TEST,
-                                                   HAS_NO_CHILD);
-
-                                HeapFree(GetProcessHeap(), 0, lpModW);
-                            }
-
-                            /* move onto next string */
-                            while (*(ptr++) != '\0')
-                                ;
-
-                            numMods--;
-                        }
-
-                        HeapFree(GetProcessHeap(), 0, lpModules);
-                    }
-                }
             }
-
-            FreeLibrary(hDll);
         }
     }
 
@@ -343,8 +298,8 @@
 static VOID
 PopulateTestList(PMAIN_WND_INFO pInfo)
 {
-    pInfo->numDlls = GetListOfTestDlls(pInfo);
-    if (pInfo->numDlls)
+    pInfo->numExes = GetListOfTestExes(pInfo);
+    if (pInfo->numExes)
     {
         PopulateTreeView(pInfo);
     }
@@ -417,16 +372,17 @@
                         DisplayMessage(L"Please select an item");
                     }
 
-                    break;
+                    return TRUE;
                 }
 
                 case IDCANCEL:
                 {
-                    HeapFree(GetProcessHeap(), 0, pInfo->lpDllList);
-                    pInfo->lpDllList = NULL;
+                    HeapFree(GetProcessHeap(), 0, pInfo->lpExeList);
+                    pInfo->lpExeList = NULL;
 
                     EndDialog(hDlg,
                               LOWORD(wParam));
+
                     return TRUE;
                 }
             }

Modified: trunk/rostests/winetests/GUI/lang/en-US.rc
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/GUI/lang/en-US.rc?rev=36844&r1=36843&r2=36844&view=diff
==============================================================================
--- trunk/rostests/winetests/GUI/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/rostests/winetests/GUI/lang/en-US.rc [iso-8859-1] Mon Oct 20 09:49:59 2008
@@ -8,7 +8,7 @@
     DEFPUSHBUTTON   "OK",IDOK,236,241,50,14,WS_GROUP
     CONTROL         "",IDC_LIST,"SysListView32",LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,69,279,103
     EDITTEXT        IDC_OUTPUT,7,175,279,62,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY
-    COMBOBOX        IDC_TESTSELECTION,27,12,205,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_TESTSELECTION,27,12,205,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
     LTEXT           "Test:",IDC_STATIC,6,14,18,8
     PUSHBUTTON      "Browse...",IDC_BROWSE,236,11,50,14
     PUSHBUTTON      "Run",IDC_RUN,236,30,50,14
@@ -19,8 +19,9 @@
     LTEXT           "?",IDC_NUMERRORS,85,53,8,8
     LTEXT           "Failures:",IDC_STATIC,107,53,28,8
     LTEXT           "?",IDC_NUMFAILURES,141,53,8,8
+    PUSHBUTTON      "Options",IDC_OPTIONS,181,49,50,14
     PUSHBUTTON      "Stop",IDC_STOP,236,49,50,14
-    CONTROL         "Run on start",IDC_RUNONSTART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,174,52,56,10
+
     LTEXT           "status bar",IDC_STATUS,7,244,210,8
 END
 
@@ -29,7 +30,18 @@
 CAPTION "Test hierarchy"
 FONT 8, "MS Shell Dlg", 0, 0, 0x1
 BEGIN
-   PUSHBUTTON       "Select", IDOK, 202, 7, 50, 14
-   PUSHBUTTON       "Close", IDCANCEL, 202, 34, 50, 14
-   CONTROL          "", IDC_TREEVIEW, "SysTreeView32", WS_BORDER | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT, 7, 7, 189, 236 
+    PUSHBUTTON       "Select", IDOK, 202, 7, 50, 14
+    PUSHBUTTON       "Close", IDCANCEL, 202, 34, 50, 14
+    CONTROL          "", IDC_TREEVIEW, "SysTreeView32", WS_BORDER | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT, 7, 7, 189, 236 
 END
+
+IDD_OPTIONS DIALOGEX 0, 0, 180, 100
+STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
+CAPTION "Options"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+    PUSHBUTTON       "OK", IDOK, 70, 80, 50, 14
+    PUSHBUTTON       "Cancel", IDCANCEL, 125, 80, 50, 14
+    CONTROL          "Hide console window",IDC_HIDECONSOLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,10,80,10
+    CONTROL          "Run on start",IDC_RUNONSTART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,30,80,10
+END

Modified: trunk/rostests/winetests/GUI/mainwnd.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/GUI/mainwnd.c?rev=36844&r1=36843&r2=36844&view=diff
==============================================================================
--- trunk/rostests/winetests/GUI/mainwnd.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/GUI/mainwnd.c [iso-8859-1] Mon Oct 20 09:49:59 2008
@@ -8,17 +8,30 @@
  */
 
 #include <precomp.h>
+#include <io.h>
+
+#define BUFSIZE 4096
 
 HINSTANCE hInstance;
 
+WCHAR szPipeName[] = L"\\\\.\\pipe\\winetest_pipe";
+
 typedef int (_cdecl *RUNTEST)(char **);
+
+
+VOID
+CreateClientProcess(PMAIN_WND_INFO pInfo,
+                    LPWSTR lpExePath)
+{
+
+}
+
 
 static BOOL
 OnInitMainDialog(HWND hDlg,
                  LPARAM lParam)
 {
     PMAIN_WND_INFO pInfo;
-    LPWSTR lpAboutText;
 
     pInfo = (PMAIN_WND_INFO)lParam;
 
@@ -65,8 +78,8 @@
 {
     HWND hRunCmd;
     WCHAR szTextCmd[MAX_RUN_CMD];
-    LPWSTR lpDllPath;
-    INT sel, len;
+    LPWSTR lpExePath;
+    INT sel;
 
     hRunCmd = GetDlgItem(pInfo->hMainWnd, IDC_TESTSELECTION);
 
@@ -79,44 +92,15 @@
         if (SendMessageW(hRunCmd,
                          CB_GETLBTEXT,
                          sel,
-                         szTextCmd) != CB_ERR)
-        {
-            lpDllPath = SendMessage(hRunCmd,
-                                    CB_GETITEMDATA,
-                                    0,
-                                    0);
-            if (lpDllPath)
+                         (LPARAM)szTextCmd) != CB_ERR)
+        {
+            lpExePath = (LPWSTR)SendMessage(hRunCmd,
+                                            CB_GETITEMDATA,
+                                            0,
+                                            0);
+            if (lpExePath)
             {
-                LPWSTR module = szTextCmd;
-                LPSTR lpTest;
-
-                while (*(module++) != L':' && *module != L'\0')
-                    ;
-
-                if (*module)
-                {
-                    if (UnicodeToAnsi(module, &lpTest))
-                    {
-                        HMODULE hDll;
-                        RUNTEST RunTest;
-
-                        hDll = LoadLibraryW(lpDllPath);
-                        if (hDll)
-                        {
-                            RunTest = (RUNTEST)GetProcAddress(hDll, "RunTest");
-                            if (RunTest)
-                            {
-                                RunTest(lpTest);
-                            }
-
-                            FreeLibrary(hDll);
-                        }
-                        DisplayError(GetLastError());
-
-                        HeapFree(GetProcessHeap(), 0, lpTest);
-                    }
-                }
-
+                CreateClientProcess(pInfo, lpExePath);
             }
         }
     }
@@ -126,7 +110,7 @@
 AddTestToCombo(PMAIN_WND_INFO pInfo)
 {
     HWND hRunCmd;
-    LPWSTR lpDllPath;
+    LPWSTR lpExePath;
     INT len;
 
     hRunCmd = GetDlgItem(pInfo->hMainWnd, IDC_TESTSELECTION);
@@ -135,21 +119,21 @@
         SendMessageW(hRunCmd,
                      CB_INSERTSTRING,
                      0,
-                     pInfo->SelectedTest.szRunString);
-
-        len = (wcslen(pInfo->SelectedTest.szSelectedDll) + 1) * sizeof(WCHAR);
-        lpDllPath = HeapAlloc(GetProcessHeap(), 0, len);
-        if (lpDllPath)
-        {
-            wcsncpy(lpDllPath,
-                    pInfo->SelectedTest.szSelectedDll,
+                     (LPARAM)pInfo->SelectedTest.szRunString);
+
+        len = (wcslen(pInfo->SelectedTest.szSelectedExe) + 1) * sizeof(WCHAR);
+        lpExePath = HeapAlloc(GetProcessHeap(), 0, len);
+        if (lpExePath)
+        {
+            wcsncpy(lpExePath,
+                    pInfo->SelectedTest.szSelectedExe,
                     len / sizeof(WCHAR));
         }
 
         SendMessageW(hRunCmd,
                      CB_SETITEMDATA,
                      0,
-                     lpDllPath);
+                     (LPARAM)lpExePath);
         SendMessageW(hRunCmd,
                      CB_SETCURSEL,
                      0,
@@ -161,8 +145,7 @@
 FreeTestCmdStrings(PMAIN_WND_INFO pInfo)
 {
     HWND hRunCmd;
-    WCHAR szTextCmd[MAX_RUN_CMD];
-    LPWSTR lpDllPath;
+    LPWSTR lpExePath;
     INT cnt, i;
 
     hRunCmd = GetDlgItem(pInfo->hMainWnd, IDC_TESTSELECTION);
@@ -175,13 +158,13 @@
     {
         for (i = 0; i < cnt; i++)
         {
-            lpDllPath = SendMessage(hRunCmd,
-                                    CB_GETITEMDATA,
-                                    i,
-                                    0);
-            if (lpDllPath)
+            lpExePath = (LPWSTR)SendMessage(hRunCmd,
+                                            CB_GETITEMDATA,
+                                            i,
+                                            0);
+            if (lpExePath)
             {
-                HeapFree(GetProcessHeap(), 0, lpDllPath);
+                HeapFree(GetProcessHeap(), 0, lpExePath);
             }
         }
     }
@@ -228,6 +211,13 @@
 
                     break;
                 }
+                case IDC_OPTIONS:
+                    DialogBoxParamW(hInstance,
+                                    MAKEINTRESOURCEW(IDD_OPTIONS),
+                                    hDlg,
+                                    (DLGPROC)OptionsDlgProc,
+                                    (LPARAM)pInfo);
+                    break;
 
                 case IDC_RUN:
                     RunSelectedTest(pInfo);
@@ -271,7 +261,12 @@
 {
     INITCOMMONCONTROLSEX iccx;
     PMAIN_WND_INFO pInfo;
-    INT Ret = 1;
+    HANDLE hThread;
+    INT Ret = -1;
+
+    UNREFERENCED_PARAMETER(hPrev);
+    UNREFERENCED_PARAMETER(Cmd);
+    UNREFERENCED_PARAMETER(iCmd); 
 
     hInstance = hInst;
 
@@ -280,7 +275,9 @@
     iccx.dwICC = ICC_TAB_CLASSES;
     InitCommonControlsEx(&iccx);
 
-    pInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(MAIN_WND_INFO));
+    pInfo = HeapAlloc(GetProcessHeap(),
+                      0,
+                      sizeof(MAIN_WND_INFO));
     if (pInfo)
     {
         Ret = (DialogBoxParamW(hInstance,
@@ -289,8 +286,9 @@
                                (DLGPROC)MainDlgProc,
                                (LPARAM)pInfo) == IDOK);
 
-        HeapFree(GetProcessHeap(), 0, pInfo);
-
+        HeapFree(GetProcessHeap(),
+                 0,
+                 pInfo);
     }
 
     return Ret;

Modified: trunk/rostests/winetests/GUI/misc.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/GUI/misc.c?rev=36844&r1=36843&r2=36844&view=diff
==============================================================================
--- trunk/rostests/winetests/GUI/misc.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/GUI/misc.c [iso-8859-1] Mon Oct 20 09:49:59 2008
@@ -238,12 +238,12 @@
     /* Add all icons to the image list */
     for (i = StartResource; i <= EndResource; i++)
     {
-        hIcon = (HBITMAP)LoadImageW(hInstance,
-                                    MAKEINTRESOURCEW(i),
-                                    IMAGE_ICON,
-                                    Width,
-                                    Height,
-                                    LR_DEFAULTCOLOR);
+        hIcon = (HICON)LoadImageW(hInstance,
+                                  MAKEINTRESOURCEW(i),
+                                  IMAGE_ICON,
+                                  Width,
+                                  Height,
+                                  LR_DEFAULTCOLOR);
         if (hIcon == NULL)
             goto fail;
 
@@ -294,7 +294,7 @@
 
     length = wcslen(lpSrcStr) + 1;
 
-    *lpDstStr = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, length);
+    *lpDstStr = (LPSTR)HeapAlloc(GetProcessHeap(), 0, length);
     if (*lpDstStr)
     {
         ret = WideCharToMultiByte(CP_ACP,

Added: trunk/rostests/winetests/GUI/optionswnd.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/GUI/optionswnd.c?rev=36844&view=auto
==============================================================================
--- trunk/rostests/winetests/GUI/optionswnd.c (added)
+++ trunk/rostests/winetests/GUI/optionswnd.c [iso-8859-1] Mon Oct 20 09:49:59 2008
@@ -1,0 +1,100 @@
+/*
+ * PROJECT:     ReactOS API Test GUI
+ * LICENSE:     GPL - See COPYING in the top level directory
+ * FILE:        
+ * PURPOSE:     options dialog implementation
+ * COPYRIGHT:   Copyright 2008 Ged Murphy <gedmurphy at reactos.org>
+ *
+ */
+
+#include <precomp.h>
+
+static BOOL
+OnInitBrowseDialog(HWND hDlg,
+                   LPARAM lParam)
+{
+    PMAIN_WND_INFO pInfo;
+
+    pInfo = (PMAIN_WND_INFO)lParam;
+
+    pInfo->hBrowseDlg = hDlg;
+
+    SetWindowLongPtr(hDlg,
+                     GWLP_USERDATA,
+                     (LONG_PTR)pInfo);
+
+    return TRUE;
+}
+
+
+BOOL CALLBACK
+OptionsDlgProc(HWND hDlg,
+              UINT Message,
+              WPARAM wParam,
+              LPARAM lParam)
+{
+    PMAIN_WND_INFO pInfo;
+
+    //UNREFERENCED_PARAM(
+
+    /* Get the window context */
+    pInfo = (PMAIN_WND_INFO)GetWindowLongPtr(hDlg,
+                                             GWLP_USERDATA);
+    if (pInfo == NULL && Message != WM_INITDIALOG)
+    {
+        goto HandleDefaultMessage;
+    }
+
+    switch(Message)
+    {
+        case WM_INITDIALOG:
+            return OnInitBrowseDialog(hDlg, lParam);
+
+        case WM_COMMAND:
+        {
+            switch (LOWORD(wParam))
+            {
+                case IDOK:
+                {
+                    if (SendMessageW(GetDlgItem(hDlg, IDC_RUNONSTART), BM_GETCHECK, 0, 0) == BST_CHECKED)
+                    {
+                        pInfo->bRunOnStart = TRUE;
+                    }
+                    else
+                    {
+                        pInfo->bRunOnStart = FALSE;
+                    }
+
+                    if (SendMessageW(GetDlgItem(hDlg, IDC_HIDECONSOLE), BM_GETCHECK, 0, 0) == BST_CHECKED)
+                    {
+                        pInfo->bHideConsole = TRUE;
+                    }
+                    else
+                    {
+                        pInfo->bHideConsole = FALSE;
+                    }
+
+                    EndDialog(hDlg,
+                              LOWORD(wParam));
+
+                    return TRUE;
+                }
+
+                case IDCANCEL:
+                {
+                    EndDialog(hDlg,
+                              LOWORD(wParam));
+
+                    return TRUE;
+                }
+            }
+
+            break;
+        }
+HandleDefaultMessage:
+        default:
+            return FALSE;
+    }
+
+    return FALSE;
+}

Propchange: trunk/rostests/winetests/GUI/optionswnd.c
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: trunk/rostests/winetests/GUI/precomp.h
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/GUI/precomp.h?rev=36844&r1=36843&r2=36844&view=diff
==============================================================================
--- trunk/rostests/winetests/GUI/precomp.h [iso-8859-1] (original)
+++ trunk/rostests/winetests/GUI/precomp.h [iso-8859-1] Mon Oct 20 09:49:59 2008
@@ -13,7 +13,7 @@
 
 typedef struct _TEST_ITEM
 {
-    WCHAR szSelectedDll[MAX_PATH];
+    WCHAR szSelectedExe[MAX_PATH];
     WCHAR szRunString[MAX_RUN_CMD];
 
 } TEST_ITEM, *PTEST_ITEM;
@@ -24,15 +24,19 @@
     HWND hBrowseDlg;
     HWND hBrowseTV;
     HWND hStatus;
+    HANDLE hPipe;
     int  nCmdShow;
 
     HICON hSmIcon;
     HICON hBgIcon;
 
-    LPWSTR lpDllList;
-    INT numDlls;
+    LPWSTR lpExeList;
+    INT numExes;
 
     TEST_ITEM SelectedTest;
+
+    BOOL bRunOnStart;
+    BOOL bHideConsole;
 
 } MAIN_WND_INFO, *PMAIN_WND_INFO;
 
@@ -42,8 +46,14 @@
 int RunTest(const char *lpTest);
 
 
+/* mainwnd.c */
+BOOL SendCommandToClient(PMAIN_WND_INFO pInfo, LPWSTR lpCommand);
+
 /* browsewnd.c */
 BOOL CALLBACK BrowseDlgProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam);
+
+/* optionswnd.c */
+BOOL CALLBACK OptionsDlgProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam);
 
 /* misc.c */
 HIMAGELIST InitImageList(UINT StartResource, UINT EndResource, UINT Width, UINT Height);

Modified: trunk/rostests/winetests/GUI/resource.h
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/GUI/resource.h?rev=36844&r1=36843&r2=36844&view=diff
==============================================================================
--- trunk/rostests/winetests/GUI/resource.h [iso-8859-1] (original)
+++ trunk/rostests/winetests/GUI/resource.h [iso-8859-1] Mon Oct 20 09:49:59 2008
@@ -1,6 +1,7 @@
 #define IDD_WINETESTGUI                 102
 #define IDD_TESTBROWSER                 103
-#define IDM_ABOUT                       104
+#define IDD_OPTIONS                     104
+//#define IDM_ABOUT                       104
 #define IDM_EXIT                        105
 #define IDI_ICON                        107
 #define IDI_TESTS                       108
@@ -16,9 +17,12 @@
 #define IDC_NUMERRORS                   1007
 #define IDC_NUMFAILURES                 1008
 #define IDC_STOP                        1010
-#define IDC_CHECK2                      1011
-#define IDC_RUNONSTART                  1011
+#define IDC_OPTIONS                     1011
+#define IDC_SELECT                      1013
+#define IDC_TREEVIEW                    1014
+
+#define IDC_HIDECONSOLE                 1020
+#define IDC_RUNONSTART                  1021
 #define IDC_STATUS                      1012
-#define IDC_SELECT                      1020
-#define IDC_TREEVIEW                    1021
+
 #define IDC_STATIC                      -1



More information about the Ros-diffs mailing list