Author: ekohl
Date: Fri May 27 15:33:12 2011
New Revision: 51960
URL:
http://svn.reactos.org/svn/reactos?rev=51960&view=rev
Log:
[MSPORTS]
- Implement a simple property sheet provider for serial ports. The property sheet does not
show yet because the dialog resource is not found because a call to FindResourceW fails.
Added:
trunk/reactos/dll/win32/msports/internal.h (with props)
trunk/reactos/dll/win32/msports/lang/ (with props)
trunk/reactos/dll/win32/msports/lang/de-DE.rc (with props)
trunk/reactos/dll/win32/msports/lang/en-US.rc (with props)
trunk/reactos/dll/win32/msports/resource.h (with props)
trunk/reactos/dll/win32/msports/serial.c (with props)
Modified:
trunk/reactos/dll/win32/msports/CMakeLists.txt
trunk/reactos/dll/win32/msports/msports.c
trunk/reactos/dll/win32/msports/msports.rbuild
trunk/reactos/dll/win32/msports/msports.rc
trunk/reactos/dll/win32/msports/msports.spec
trunk/reactos/media/inf/ports.inf
Modified: trunk/reactos/dll/win32/msports/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/CMakeLis…
==============================================================================
--- trunk/reactos/dll/win32/msports/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msports/CMakeLists.txt [iso-8859-1] Fri May 27 15:33:12 2011
@@ -7,6 +7,7 @@
classinst.c
comdb.c
msports.c
+ serial.c
msports.rc
${CMAKE_CURRENT_BINARY_DIR}/msports_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/msports.def)
@@ -17,7 +18,7 @@
target_link_libraries(msports wine)
-add_importlibs(msports setupapi advapi32 kernel32 ntdll)
+add_importlibs(msports setupapi comctl32 user32 advapi32 kernel32 ntdll)
add_cd_file(TARGET msports DESTINATION reactos/system32 FOR all)
add_importlib_target(msports.spec)
Added: trunk/reactos/dll/win32/msports/internal.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/internal…
==============================================================================
--- trunk/reactos/dll/win32/msports/internal.h (added)
+++ trunk/reactos/dll/win32/msports/internal.h [iso-8859-1] Fri May 27 15:33:12 2011
@@ -1,0 +1,9 @@
+/*
+ * PROJECT: Ports installer library
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: dll\win32\msports\internal.h
+ * PURPOSE: Global declarations
+ * COPYRIGHT: Copyright 2011 Eric Kohl
+ */
+
+extern HINSTANCE hInstance;
Propchange: trunk/reactos/dll/win32/msports/internal.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/dll/win32/msports/internal.h
------------------------------------------------------------------------------
svn:keywords = author date id revision
Propchange: trunk/reactos/dll/win32/msports/lang/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Fri May 27 15:33:12 2011
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: trunk/reactos/dll/win32/msports/lang/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: trunk/reactos/dll/win32/msports/lang/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/reactos/dll/win32/msports/lang/
------------------------------------------------------------------------------
tsvn:logminsize = 10
Added: trunk/reactos/dll/win32/msports/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/lang/de-…
==============================================================================
--- trunk/reactos/dll/win32/msports/lang/de-DE.rc (added)
+++ trunk/reactos/dll/win32/msports/lang/de-DE.rc [iso-8859-1] Fri May 27 15:33:12 2011
@@ -1,0 +1,12 @@
+
+LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
+
+IDD_SERIALSETTINGS DIALOGEX DISCARDABLE 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Port Einstellungen"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ GROUPBOX "", -1, 7, 4, 238, 114
+ RTEXT "B&its pro Sekunde:", -1, 77, 19, 62, 8, WS_GROUP
+ COMBOBOX IDC_SERIALBITSPERSECOND, 142, 17, 99, 13, WS_TABSTOP | CBS_DROPDOWNLIST
+END
Propchange: trunk/reactos/dll/win32/msports/lang/de-DE.rc
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/dll/win32/msports/lang/de-DE.rc
------------------------------------------------------------------------------
svn:keywords = author date id revision
Added: trunk/reactos/dll/win32/msports/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/lang/en-…
==============================================================================
--- trunk/reactos/dll/win32/msports/lang/en-US.rc (added)
+++ trunk/reactos/dll/win32/msports/lang/en-US.rc [iso-8859-1] Fri May 27 15:33:12 2011
@@ -1,0 +1,12 @@
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+IDD_SERIALSETTINGS DIALOGEX DISCARDABLE 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Port Settings"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ GROUPBOX "", -1, 7, 4, 238, 114
+ RTEXT "B&its per second:", -1, 77, 19, 62, 8, WS_GROUP
+ COMBOBOX IDC_SERIALBITSPERSECOND, 142, 17, 99, 13, WS_TABSTOP | CBS_DROPDOWNLIST
+END
Propchange: trunk/reactos/dll/win32/msports/lang/en-US.rc
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/dll/win32/msports/lang/en-US.rc
------------------------------------------------------------------------------
svn:keywords = author date id revision
Modified: trunk/reactos/dll/win32/msports/msports.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/msports.…
==============================================================================
--- trunk/reactos/dll/win32/msports/msports.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msports/msports.c [iso-8859-1] Fri May 27 15:33:12 2011
@@ -1,7 +1,7 @@
/*
* PROJECT: Ports installer library
* LICENSE: GPL - See COPYING in the top level directory
- * FILE: dll/win32/msports/msports.c
+ * FILE: dll\win32\msports\msports.c
* PURPOSE: Library main function
* COPYRIGHT: Copyright 2011 Eric Kohl
*/
@@ -12,6 +12,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(msports);
+HINSTANCE hInstance;
BOOL
WINAPI
@@ -23,6 +24,7 @@
{
case DLL_PROCESS_ATTACH:
TRACE("DLL_PROCESS_ATTACH\n");
+ hInstance = hinstDll;
DisableThreadLibraryCalls(hinstDll);
break;
}
Modified: trunk/reactos/dll/win32/msports/msports.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/msports.…
==============================================================================
--- trunk/reactos/dll/win32/msports/msports.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msports/msports.rbuild [iso-8859-1] Fri May 27 15:33:12 2011
@@ -4,9 +4,12 @@
<library>wine</library>
<library>kernel32</library>
<library>advapi32</library>
+ <library>comctl32</library>
+ <library>user32</library>
<library>setupapi</library>
<file>classinst.c</file>
<file>comdb.c</file>
<file>msports.c</file>
+ <file>serial.c</file>
<file>msports.rc</file>
</module>
Modified: trunk/reactos/dll/win32/msports/msports.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/msports.…
==============================================================================
--- trunk/reactos/dll/win32/msports/msports.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msports/msports.rc [iso-8859-1] Fri May 27 15:33:12 2011
@@ -1,7 +1,11 @@
#include <windows.h>
+#include "resource.h"
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Ports Class Installer\0"
#define REACTOS_STR_INTERNAL_NAME "msports\0"
#define REACTOS_STR_ORIGINAL_FILENAME "msports.dll\0"
#include <reactos/version.rc>
+
+#include "lang/de-DE.rc"
+#include "lang/en-US.rc"
Modified: trunk/reactos/dll/win32/msports/msports.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/msports.…
==============================================================================
--- trunk/reactos/dll/win32/msports/msports.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msports/msports.spec [iso-8859-1] Fri May 27 15:33:12 2011
@@ -9,4 +9,4 @@
@ stub ParallelPortPropPageProvider
@ stdcall PortsClassInstaller(long ptr ptr)
@ stub SerialDisplayAdvancedSettings
-@ stub SerialPortPropPageProvider
+@ stdcall SerialPortPropPageProvider(ptr ptr long)
Added: trunk/reactos/dll/win32/msports/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/resource…
==============================================================================
--- trunk/reactos/dll/win32/msports/resource.h (added)
+++ trunk/reactos/dll/win32/msports/resource.h [iso-8859-1] Fri May 27 15:33:12 2011
@@ -1,0 +1,3 @@
+
+#define IDD_SERIALSETTINGS 200
+#define IDC_SERIALBITSPERSECOND 201
Propchange: trunk/reactos/dll/win32/msports/resource.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/dll/win32/msports/resource.h
------------------------------------------------------------------------------
svn:keywords = author date id revision
Added: trunk/reactos/dll/win32/msports/serial.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msports/serial.c…
==============================================================================
--- trunk/reactos/dll/win32/msports/serial.c (added)
+++ trunk/reactos/dll/win32/msports/serial.c [iso-8859-1] Fri May 27 15:33:12 2011
@@ -1,0 +1,97 @@
+/*
+ * PROJECT: Ports installer library
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: dll\win32\msports\serial.c
+ * PURPOSE: Serial Port property functions
+ * COPYRIGHT: Copyright 2011 Eric Kohl
+ */
+
+#include <windows.h>
+#include <commctrl.h>
+#include <prsht.h>
+#include <setupapi.h>
+
+#include <wine/debug.h>
+
+#include "internal.h"
+#include "resource.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msports);
+
+
+static
+BOOL
+OnInitDialog(HWND hwnd,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ FIXME("Port_OnInit()\n");
+ return TRUE;
+}
+
+
+static
+INT_PTR
+CALLBACK
+SerialSettingsDlgProc(HWND hwnd,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ FIXME("SerialSettingsDlgProc()\n");
+
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ return OnInitDialog(hwnd, wParam, lParam);
+ }
+
+ return FALSE;
+}
+
+
+BOOL
+WINAPI
+SerialPortPropPageProvider(PSP_PROPSHEETPAGE_REQUEST lpPropSheetPageRequest,
+ LPFNADDPROPSHEETPAGE lpfnAddPropSheetPageProc,
+ LPARAM lParam)
+{
+ PROPSHEETPAGEW PropSheetPage;
+ HPROPSHEETPAGE hPropSheetPage;
+
+ FIXME("SerialPortPropPageProvider(%p %p %lx)\n",
+ lpPropSheetPageRequest, lpfnAddPropSheetPageProc, lParam);
+
+ if (lpPropSheetPageRequest->PageRequested == SPPSR_ENUM_ADV_DEVICE_PROPERTIES)
+ {
+ FIXME("SPPSR_ENUM_ADV_DEVICE_PROPERTIES\n");
+
+ PropSheetPage.dwSize = sizeof(PROPSHEETPAGEW);
+ PropSheetPage.dwFlags = 0;
+ PropSheetPage.hInstance = hInstance;
+ PropSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_SERIALSETTINGS);
+ PropSheetPage.pfnDlgProc = SerialSettingsDlgProc;
+ PropSheetPage.lParam = 0;
+ PropSheetPage.pfnCallback = NULL;
+
+ hPropSheetPage = CreatePropertySheetPageW(&PropSheetPage);
+ if (hPropSheetPage == NULL)
+ {
+ FIXME("CreatePropertySheetPageW() failed!\n");
+ return FALSE;
+ }
+
+ if (!(*lpfnAddPropSheetPageProc)(hPropSheetPage, lParam))
+ {
+ FIXME("lpfnAddPropSheetPageProc() failed!\n");
+ DestroyPropertySheetPage(hPropSheetPage);
+ return FALSE;
+ }
+ }
+
+ FIXME("Done!\n");
+
+ return TRUE;
+}
+
+/* EOF */
Propchange: trunk/reactos/dll/win32/msports/serial.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/dll/win32/msports/serial.c
------------------------------------------------------------------------------
svn:keywords = author date id revision
Modified: trunk/reactos/media/inf/ports.inf
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/inf/ports.inf?rev=51…
==============================================================================
Binary files - no diff available.