added an initial mmsys.cpl. not added to the build system because w32api lacks a devguid.h
Modified: trunk/reactos/baseaddress.xml
Added: trunk/reactos/lib/cpl/mmsys/
Added: trunk/reactos/lib/cpl/mmsys/En.rc
Added: trunk/reactos/lib/cpl/mmsys/mmsys.c
Added: trunk/reactos/lib/cpl/mmsys/mmsys.def
Added: trunk/reactos/lib/cpl/mmsys/mmsys.h
Added: trunk/reactos/lib/cpl/mmsys/mmsys.rc
Added: trunk/reactos/lib/cpl/mmsys/mmsys.xml
Added: trunk/reactos/lib/cpl/mmsys/resource.h
Added: trunk/reactos/lib/cpl/mmsys/resources/
Added: trunk/reactos/lib/cpl/mmsys/resources/mmsys.ico

Modified: trunk/reactos/baseaddress.xml
--- trunk/reactos/baseaddress.xml	2005-11-23 22:16:21 UTC (rev 19507)
+++ trunk/reactos/baseaddress.xml	2005-11-23 23:02:35 UTC (rev 19508)
@@ -4,6 +4,7 @@
 <property name="BASEADDRESS_REGTESTS" value="0x07000000" />
 <property name="BASEADDRESS_NOTIFYHOOK" value="0x08000000" />
 <property name="BASEADDRESS_DEVENUM" value="0x35680000" />
+<property name="BASEADDRESS_MMSYS" value="0x588A0000" />
 <property name="BASEADDRESS_UXTHEME" value="0x5AD70000" />
 <property name="BASEADDRESS_VDMDBG" value="0x5B0D0000" />
 <property name="BASEADDRESS_OBJSEL" value="0x5B400000" />
Property changes on: trunk/reactos/lib/cpl/mmsys
___________________________________________________________________
Name: svn:ignore
   + *.coff
*.cpl
*.d
*.a
*.o
*.sym
*.map
*.tmp
GNUmakefile

Added: trunk/reactos/lib/cpl/mmsys/En.rc
--- trunk/reactos/lib/cpl/mmsys/En.rc	2005-11-23 22:16:21 UTC (rev 19507)
+++ trunk/reactos/lib/cpl/mmsys/En.rc	2005-11-23 23:02:35 UTC (rev 19508)
@@ -0,0 +1,14 @@
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+IDD_HARDWARE DIALOGEX 0, 0, 246, 228
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Hardware"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_CPLNAME "Sound and Audio Devices"
+    IDS_CPLDESCRIPTION "Changes the sound scheme for your computer, or configure the settings for your speakers and recording devices."
+END
\ No newline at end of file
Property changes on: trunk/reactos/lib/cpl/mmsys/En.rc
___________________________________________________________________
Name: svn:keywords
   + author date revision
Name: svn:eol-style
   + native

Added: trunk/reactos/lib/cpl/mmsys/mmsys.c
--- trunk/reactos/lib/cpl/mmsys/mmsys.c	2005-11-23 22:16:21 UTC (rev 19507)
+++ trunk/reactos/lib/cpl/mmsys/mmsys.c	2005-11-23 23:02:35 UTC (rev 19508)
@@ -0,0 +1,187 @@
+/*
+ *  ReactOS
+ *  Copyright (C) 2005 ReactOS Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/* $Id: main.c 12852 2005-01-06 13:58:04Z mf $
+ *
+ * PROJECT:         ReactOS Multimedia Control Panel
+ * FILE:            lib/cpl/mmsys/mmsys.c
+ * PURPOSE:         ReactOS Multimedia Control Panel
+ * PROGRAMMER:      Thoams Weidenmueller <w3seek@reactos.com>
+ * UPDATE HISTORY:
+ *      2005/11/23  Created
+ */
+#include <windows.h>
+#include <commctrl.h>
+#include <initguid.h>
+#include <cfgmgr32.h>
+#include <setupapi.h>
+#include <devguid.h>
+#include <cpl.h>
+
+#include "mmsys.h"
+#include "resource.h"
+
+HWND WINAPI
+DeviceCreateHardwarePageEx(HWND hWndParent,
+                           LPGUID lpGuids,
+                           UINT uNumberOfGuids,
+                           UINT Unknown);
+
+#define NUM_APPLETS	(1)
+
+
+HINSTANCE hApplet = 0;
+
+/* Applets */
+const APPLET Applets[NUM_APPLETS] = 
+{
+  {IDI_CPLICON, IDS_CPLNAME, IDS_CPLDESCRIPTION, MmSysApplet},
+};
+
+/* Hardware property page dialog callback */
+static INT_PTR CALLBACK
+HardwareDlgProc(HWND hwndDlg,
+	        UINT uMsg,
+	        WPARAM wParam,
+	        LPARAM lParam)
+{
+    switch(uMsg)
+    {
+        case WM_INITDIALOG:
+        {
+            GUID Guids[] = {
+                GUID_DEVCLASS_CDROM,
+                GUID_DEVCLASS_MEDIA,
+            };
+
+            /* create the hardware page */
+            DeviceCreateHardwarePageEx(hwndDlg,
+                                       Guids,
+                                       sizeof(Guids) / sizeof(Guids[0]),
+                                       1);
+            break;
+        }
+    }
+
+    return FALSE;
+}
+
+LONG APIENTRY
+MmSysApplet(HWND hwnd,
+            UINT uMsg,
+            LONG wParam,
+            LONG lParam)
+{
+    PROPSHEETPAGE psp[1];
+    PROPSHEETHEADER psh = {0};
+    TCHAR Caption[256];
+
+    LoadString(hApplet,
+               IDS_CPLNAME,
+               Caption,
+               sizeof(Caption) / sizeof(TCHAR));
+
+    psh.dwSize = sizeof(PROPSHEETHEADER);
+    psh.dwFlags =  PSH_PROPSHEETPAGE | PSH_PROPTITLE;
+    psh.hwndParent = NULL;
+    psh.hInstance = hApplet;
+    psh.hIcon = LoadIcon(hApplet,
+                         MAKEINTRESOURCE(IDI_CPLICON));
+    psh.pszCaption = Caption;
+    psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
+    psh.nStartPage = 0;
+    psh.ppsp = psp;
+
+    InitPropSheetPage(&psp[0],
+                      IDD_HARDWARE,
+                      HardwareDlgProc);
+
+    return (LONG)(PropertySheet(&psh) != -1);
+}
+
+VOID
+InitPropSheetPage(PROPSHEETPAGE *psp,
+                  WORD idDlg,
+                  DLGPROC DlgProc)
+{
+    ZeroMemory(psp, sizeof(PROPSHEETPAGE));
+    psp->dwSize = sizeof(PROPSHEETPAGE);
+    psp->dwFlags = PSP_DEFAULT;
+    psp->hInstance = hApplet;
+    psp->pszTemplate = MAKEINTRESOURCE(idDlg);
+    psp->pfnDlgProc = DlgProc;
+}
+
+
+/* Control Panel Callback */
+LONG CALLBACK
+CPlApplet(HWND hwndCpl,
+	  UINT uMsg,
+	  LPARAM lParam1,
+	  LPARAM lParam2)
+{
+    switch(uMsg)
+    {
+        case CPL_INIT:
+            return TRUE;
+
+        case CPL_GETCOUNT:
+            return NUM_APPLETS;
+
+        case CPL_INQUIRE:
+        {
+            CPLINFO *CPlInfo = (CPLINFO*)lParam2;
+            UINT uAppIndex = (UINT)lParam1;
+
+            CPlInfo->lData = 0;
+            CPlInfo->idIcon = Applets[uAppIndex].idIcon;
+            CPlInfo->idName = Applets[uAppIndex].idName;
+            CPlInfo->idInfo = Applets[uAppIndex].idDescription;
+            break;
+        }
+
+        case CPL_DBLCLK:
+        {
+            UINT uAppIndex = (UINT)lParam1;
+            Applets[uAppIndex].AppletProc(hwndCpl,
+                                          uMsg,
+                                          lParam1,
+                                          lParam2);
+            break;
+        }
+    }
+
+    return FALSE;
+}
+
+
+BOOL STDCALL
+DllMain(HINSTANCE hinstDLL,
+	DWORD dwReason,
+	LPVOID lpReserved)
+{
+    switch(dwReason)
+    {
+        case DLL_PROCESS_ATTACH:
+            hApplet = hinstDLL;
+            DisableThreadLibraryCalls(hinstDLL);
+            break;
+    }
+
+    return TRUE;
+}
Property changes on: trunk/reactos/lib/cpl/mmsys/mmsys.c
___________________________________________________________________
Name: svn:keywords
   + author date revision
Name: svn:eol-style
   + native

Added: trunk/reactos/lib/cpl/mmsys/mmsys.def
--- trunk/reactos/lib/cpl/mmsys/mmsys.def	2005-11-23 22:16:21 UTC (rev 19507)
+++ trunk/reactos/lib/cpl/mmsys/mmsys.def	2005-11-23 23:02:35 UTC (rev 19508)
@@ -0,0 +1,6 @@
+LIBRARY mmsys.cpl
+
+EXPORTS
+CPlApplet@16
+
+; EOF
Property changes on: trunk/reactos/lib/cpl/mmsys/mmsys.def
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/reactos/lib/cpl/mmsys/mmsys.h
--- trunk/reactos/lib/cpl/mmsys/mmsys.h	2005-11-23 22:16:21 UTC (rev 19507)
+++ trunk/reactos/lib/cpl/mmsys/mmsys.h	2005-11-23 23:02:35 UTC (rev 19508)
@@ -0,0 +1,32 @@
+#ifndef __CPL_MMSYS_H
+#define __CPL_MMSYS_H
+
+//typedef LONG (CALLBACK *APPLET_PROC)(VOID);
+
+typedef struct _APPLET
+{
+  UINT idIcon;
+  UINT idName;
+  UINT idDescription;
+  APPLET_PROC AppletProc;
+} APPLET, *PAPPLET;
+
+extern HINSTANCE hApplet;
+
+
+/* main.c */
+
+VOID
+InitPropSheetPage(PROPSHEETPAGE *psp,
+		  WORD idDlg,
+		  DLGPROC DlgProc);
+
+LONG APIENTRY
+MmSysApplet(HWND hwnd,
+            UINT uMsg,
+            LONG wParam,
+            LONG lParam);
+
+#endif /* __CPL_MMSYS_H */
+
+/* EOF */
Property changes on: trunk/reactos/lib/cpl/mmsys/mmsys.h
___________________________________________________________________
Name: svn:keywords
   + author date revision
Name: svn:eol-style
   + native

Added: trunk/reactos/lib/cpl/mmsys/mmsys.rc
--- trunk/reactos/lib/cpl/mmsys/mmsys.rc	2005-11-23 22:16:21 UTC (rev 19507)
+++ trunk/reactos/lib/cpl/mmsys/mmsys.rc	2005-11-23 23:02:35 UTC (rev 19508)
@@ -0,0 +1,13 @@
+#include <windows.h>
+#include "resource.h"
+
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION	"ReactOS Multimedia Control Panel\0"
+#define REACTOS_STR_INTERNAL_NAME	"mmsys\0"
+#define REACTOS_STR_ORIGINAL_FILENAME	"mmsys.cpl\0"
+#include <reactos/version.rc>
+
+
+IDI_CPLICON ICON "resources/mmsys.ico"
+
+#include "En.rc"
Property changes on: trunk/reactos/lib/cpl/mmsys/mmsys.rc
___________________________________________________________________
Name: svn:keywords
   + author date revision
Name: svn:eol-style
   + native

Added: trunk/reactos/lib/cpl/mmsys/mmsys.xml
--- trunk/reactos/lib/cpl/mmsys/mmsys.xml	2005-11-23 22:16:21 UTC (rev 19507)
+++ trunk/reactos/lib/cpl/mmsys/mmsys.xml	2005-11-23 23:02:35 UTC (rev 19508)
@@ -0,0 +1,16 @@
+<module name="mmsys" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_MMSYS}" installbase="system32" installname="mmsys.cpl">
+	<importlibrary definition="mmsys.def" />
+	<include base="mmsys">.</include>
+	<define name="UNICODE" />
+	<define name="_UNICODE" />
+	<define name="__REACTOS__" />
+	<define name="__USE_W32API" />
+	<define name="_WIN32_IE">0x600</define>
+	<define name="_WIN32_WINNT">0x501</define>
+	<library>kernel32</library>
+	<library>user32</library>
+	<library>comctl32</library>
+	<library>devmgr</library>
+	<file>mmsys.c</file>
+	<file>mmsys.rc</file>
+</module>
Property changes on: trunk/reactos/lib/cpl/mmsys/mmsys.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/reactos/lib/cpl/mmsys/resource.h
--- trunk/reactos/lib/cpl/mmsys/resource.h	2005-11-23 22:16:21 UTC (rev 19507)
+++ trunk/reactos/lib/cpl/mmsys/resource.h	2005-11-23 23:02:35 UTC (rev 19508)
@@ -0,0 +1,15 @@
+#ifndef __CPL_RESOURCE_H
+#define __CPL_RESOURCE_H
+
+
+#define IDI_CPLICON	1
+
+#define IDD_HARDWARE	100
+
+#define IDS_CPLNAME	1000
+#define IDS_CPLDESCRIPTION	1001
+
+
+#endif /* __CPL_RESOURCE_H */
+
+/* EOF */
Property changes on: trunk/reactos/lib/cpl/mmsys/resource.h
___________________________________________________________________
Name: svn:keywords
   + author date revision
Name: svn:eol-style
   + native

Added: trunk/reactos/lib/cpl/mmsys/resources/mmsys.ico
(Binary files differ)
Property changes on: trunk/reactos/lib/cpl/mmsys/resources/mmsys.ico
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream