Author: weiden
Date: Thu Sep 27 09:45:03 2007
New Revision: 29236
URL:
http://svn.reactos.org/svn/reactos?rev=29236&view=rev
Log:
Add an initial (incomplete, not functional) implementation of the display monitor shell
extension for desk.cpl
Added:
trunk/reactos/dll/win32/shellext/deskmon/
trunk/reactos/dll/win32/shellext/deskmon/deskmon.c (with props)
trunk/reactos/dll/win32/shellext/deskmon/deskmon.h (with props)
trunk/reactos/dll/win32/shellext/deskmon/deskmon.rbuild (with props)
trunk/reactos/dll/win32/shellext/deskmon/deskmon.rc (with props)
trunk/reactos/dll/win32/shellext/deskmon/deskmon.spec (with props)
trunk/reactos/dll/win32/shellext/deskmon/lang/
trunk/reactos/dll/win32/shellext/deskmon/lang/en-US.rc (with props)
trunk/reactos/dll/win32/shellext/deskmon/precomp.h (with props)
trunk/reactos/dll/win32/shellext/deskmon/resource.h (with props)
trunk/reactos/dll/win32/shellext/deskmon/rsrc.rc (with props)
trunk/reactos/dll/win32/shellext/deskmon/shxiface.c (with props)
Modified:
trunk/reactos/baseaddress.rbuild
trunk/reactos/boot/bootdata/hivecls.inf
trunk/reactos/boot/bootdata/hivesft.inf
trunk/reactos/boot/bootdata/packages/reactos.dff
trunk/reactos/dll/win32/shellext/shellext.rbuild
Modified: trunk/reactos/baseaddress.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/baseaddress.rbuild?rev=292…
==============================================================================
--- trunk/reactos/baseaddress.rbuild (original)
+++ trunk/reactos/baseaddress.rbuild Thu Sep 27 09:45:03 2007
@@ -55,6 +55,7 @@
<property name="BASEADDRESS_URLMON" value="0x6b3c0000" />
<property name="BASEADDRESS_SERIALUI" value="0x6b3D0000" />
<property name="BASEADDRESS_WINSTA" value="0x6b3D0000" />
+ <property name="BASEADDRESS_DESKMON" value="0x6d400000" />
<property name="BASEADDRESS_DESKADP" value="0x6d410000" />
<property name="BASEADDRESS_WLDAP32" value="0x6e130000" />
<property name="BASEADDRESS_CLB" value="0x6f2b0000" />
Modified: trunk/reactos/boot/bootdata/hivecls.inf
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivecls.inf?…
==============================================================================
--- trunk/reactos/boot/bootdata/hivecls.inf (original)
+++ trunk/reactos/boot/bootdata/hivecls.inf Thu Sep 27 09:45:03 2007
@@ -237,6 +237,11 @@
HKCR,"CLSID\{42071712-76d4-11d1-8b24-00a0c9068ff3}","",0x00000000,"Display
Adapter CPL Extension"
HKCR,"CLSID\{42071712-76d4-11d1-8b24-00a0c9068ff3}\InProcServer32","",0x00020000,"%SystemRoot%\system32\deskadp.dll"
HKCR,"CLSID\{42071712-76d4-11d1-8b24-00a0c9068ff3}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+
+; deskmon.dll shell extension
+HKCR,"CLSID\{42071713-76d4-11d1-8b24-00a0c9068ff3}","",0x00000000,"Display
Monitor CPL Extension"
+HKCR,"CLSID\{42071713-76d4-11d1-8b24-00a0c9068ff3}\InProcServer32","",0x00020000,"%SystemRoot%\system32\deskmon.dll"
+HKCR,"CLSID\{42071713-76d4-11d1-8b24-00a0c9068ff3}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
; For comcat.dll
HKCR,"CLSID\{0002E005-0000-0000-C000-000000000046}","",0x00000000,"StdComponentCategoriesMgr"
Modified: trunk/reactos/boot/bootdata/hivesft.inf
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesft.inf?…
==============================================================================
--- trunk/reactos/boot/bootdata/hivesft.inf (original)
+++ trunk/reactos/boot/bootdata/hivesft.inf Thu Sep 27 09:45:03 2007
@@ -767,6 +767,9 @@
; deskadp.dll shell extension
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls
Folder\Device\shellex\PropertySheetHandlers\Display Adapter CPL
Extension","",0x00000000,"{42071712-76d4-11d1-8b24-00a0c9068ff3}"
+; deskmon.dll shell extension
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls
Folder\Device\shellex\PropertySheetHandlers\Display Monitor CPL
Extension","",0x00000000,"{42071713-76d4-11d1-8b24-00a0c9068ff3}"
+
; Where to download the Mozilla ActiveX control
HKLM,"SOFTWARE\ReactOS\shdocvw","MozillaUrl",0x00000000…
Modified: trunk/reactos/boot/bootdata/packages/reactos.dff
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
==============================================================================
--- trunk/reactos/boot/bootdata/packages/reactos.dff (original)
+++ trunk/reactos/boot/bootdata/packages/reactos.dff Thu Sep 27 09:45:03 2007
@@ -256,6 +256,7 @@
dll\win32\wtsapi32\wtsapi32.dll 1
dll\win32\beepmidi\beepmidi.dll 1
dll\win32\shellext\deskadp\deskadp.dll 1
+dll\win32\shellext\deskadp\deskmon.dll 1
; Drivers
drivers\base\bootvid\bootvid.dll 1
Added: trunk/reactos/dll/win32/shellext/deskmon/deskmon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shellext/deskmon…
==============================================================================
--- trunk/reactos/dll/win32/shellext/deskmon/deskmon.c (added)
+++ trunk/reactos/dll/win32/shellext/deskmon/deskmon.c Thu Sep 27 09:45:03 2007
@@ -1,0 +1,251 @@
+#include "precomp.h"
+
+#define NDEBUG
+#include <debug.h>
+
+static HINSTANCE hInstance;
+
+static VOID
+InitMonitorDialog(PDESKMONITOR This)
+{
+ LPTSTR lpMonitorName;
+
+ lpMonitorName = QueryDeskCplString(This->pdtobj,
+ RegisterClipboardFormat(DESK_EXT_MONITORNAME));
+ if (lpMonitorName != NULL)
+ {
+ SetDlgItemText(This->hwndDlg,
+ IDC_MONITORNAME,
+ lpMonitorName);
+
+ LocalFree((HLOCAL)lpMonitorName);
+ }
+
+ if (This->DeskExtInterface != NULL)
+ {
+ /* FIXME */
+ }
+}
+
+static INT_PTR CALLBACK
+MonitorDlgProc(HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ PDESKMONITOR This;
+ INT_PTR Ret = 0;
+
+ if (uMsg != WM_INITDIALOG)
+ {
+ This = (PDESKMONITOR)GetWindowLongPtr(hwndDlg,
+ DWL_USER);
+ }
+
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ This = (PDESKMONITOR)((LPCPROPSHEETPAGE)lParam)->lParam;
+ This->hwndDlg = hwndDlg;
+ SetWindowLongPtr(hwndDlg,
+ DWL_USER,
+ (LONG_PTR)This);
+
+ InitMonitorDialog(This);
+ Ret = TRUE;
+ break;
+
+ case WM_COMMAND:
+ switch (LOWORD(wParam))
+ {
+ case IDC_MONITORPROPERTIES:
+ break;
+ }
+
+ break;
+ }
+
+ return Ret;
+}
+
+static VOID
+IDeskMonitor_Destroy(PDESKMONITOR This)
+{
+ if (This->pdtobj != NULL)
+ {
+ IDataObject_Release(This->pdtobj);
+ This->pdtobj = NULL;
+ }
+
+ if (This->DeskExtInterface != NULL)
+ {
+ LocalFree((HLOCAL)This->DeskExtInterface);
+ This->DeskExtInterface = NULL;
+ }
+}
+
+ULONG
+IDeskMonitor_AddRef(PDESKMONITOR This)
+{
+ ULONG ret;
+
+ ret = InterlockedIncrement((PLONG)&This->ref);
+ if (ret == 1)
+ InterlockedIncrement(&dll_refs);
+
+ return ret;
+}
+
+ULONG
+IDeskMonitor_Release(PDESKMONITOR This)
+{
+ ULONG ret;
+
+ ret = InterlockedDecrement((PLONG)&This->ref);
+ if (ret == 0)
+ {
+ IDeskMonitor_Destroy(This);
+ InterlockedDecrement(&dll_refs);
+
+ HeapFree(GetProcessHeap(),
+ 0,
+ This);
+ }
+
+ return ret;
+}
+
+HRESULT STDMETHODCALLTYPE
+IDeskMonitor_QueryInterface(PDESKMONITOR This,
+ REFIID iid,
+ PVOID *pvObject)
+{
+ *pvObject = NULL;
+
+ if (IsEqualIID(iid,
+ &IID_IShellPropSheetExt) ||
+ IsEqualIID(iid,
+ &IID_IUnknown))
+ {
+ *pvObject = impl_to_interface(This, IShellPropSheetExt);
+ }
+ else if (IsEqualIID(iid,
+ &IID_IShellExtInit))
+ {
+ *pvObject = impl_to_interface(This, IShellExtInit);
+ }
+ else if (IsEqualIID(iid,
+ &IID_IClassFactory))
+ {
+ *pvObject = impl_to_interface(This, IClassFactory);
+ }
+ else
+ {
+ DPRINT1("IDeskMonitor::QueryInterface(%p,%p): E_NOINTERFACE\n", iid,
pvObject);
+ return E_NOINTERFACE;
+ }
+
+ IDeskMonitor_AddRef(This);
+ return S_OK;
+}
+
+HRESULT
+IDeskMonitor_Initialize(PDESKMONITOR This,
+ LPCITEMIDLIST pidlFolder,
+ IDataObject *pdtobj,
+ HKEY hkeyProgID)
+{
+ DPRINT1("IDeskMonitor::Initialize(%p,%p,%p)\n", pidlFolder, pdtobj,
hkeyProgID);
+
+ if (pdtobj != NULL)
+ {
+ IDataObject_AddRef(pdtobj);
+ This->pdtobj = pdtobj;
+
+ /* Get a copy of the desk.cpl extension interface */
+ This->DeskExtInterface = QueryDeskCplExtInterface(This->pdtobj);
+ if (This->DeskExtInterface != NULL)
+ return S_OK;
+ }
+
+ return S_FALSE;
+}
+
+HRESULT
+IDeskMonitor_AddPages(PDESKMONITOR This,
+ LPFNADDPROPSHEETPAGE pfnAddPage,
+ LPARAM lParam)
+{
+ HPROPSHEETPAGE hpsp;
+ PROPSHEETPAGE psp;
+
+ DPRINT1("IDeskMonitor::AddPages(%p,%p)\n", pfnAddPage, lParam);
+
+ psp.dwSize = sizeof(psp);
+ psp.dwFlags = PSP_DEFAULT;
+ psp.hInstance = hInstance;
+ psp.pszTemplate = MAKEINTRESOURCE(IDD_MONITOR);
+ psp.pfnDlgProc = MonitorDlgProc;
+ psp.lParam = (LPARAM)This;
+
+ hpsp = CreatePropertySheetPage(&psp);
+ if (hpsp != NULL && pfnAddPage(hpsp, lParam))
+ return S_OK;
+
+ return S_FALSE;
+}
+
+HRESULT
+IDeskMonitor_ReplacePage(PDESKMONITOR This,
+ EXPPS uPageID,
+ LPFNADDPROPSHEETPAGE pfnReplacePage,
+ LPARAM lParam)
+{
+ DPRINT1("IDeskMonitor::ReplacePage(%u,%p,%p)\n", uPageID, pfnReplacePage,
lParam);
+ return E_NOTIMPL;
+}
+
+HRESULT
+IDeskMonitor_Constructor(REFIID riid,
+ LPVOID *ppv)
+{
+ PDESKMONITOR This;
+ HRESULT hRet = E_OUTOFMEMORY;
+
+ DPRINT1("IDeskMonitor::Constructor(%p,%p)\n", riid, ppv);
+
+ This = HeapAlloc(GetProcessHeap(),
+ 0,
+ sizeof(*This));
+ if (This != NULL)
+ {
+ ZeroMemory(This,
+ sizeof(*This));
+
+ IDeskMonitor_InitIface(This);
+
+ hRet = IDeskMonitor_QueryInterface(This,
+ riid,
+ ppv);
+ if (!SUCCEEDED(hRet))
+ IDeskMonitor_Release(This);
+ }
+
+ return hRet;
+}
+
+BOOL STDCALL
+DllMain(HINSTANCE hinstDLL,
+ DWORD dwReason,
+ LPVOID lpvReserved)
+{
+ switch (dwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ hInstance = hinstDLL;
+ DisableThreadLibraryCalls(hInstance);
+ break;
+ }
+
+ return TRUE;
+}
Propchange: trunk/reactos/dll/win32/shellext/deskmon/deskmon.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/shellext/deskmon/deskmon.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shellext/deskmon…
==============================================================================
--- trunk/reactos/dll/win32/shellext/deskmon/deskmon.h (added)
+++ trunk/reactos/dll/win32/shellext/deskmon/deskmon.h Thu Sep 27 09:45:03 2007
@@ -1,0 +1,60 @@
+#ifndef __DESKMON__H
+#define __DESKMON__H
+
+typedef struct _DESKMONITOR
+{
+ const struct IShellPropSheetExtVtbl *lpIShellPropSheetExtVtbl;
+ const struct IShellExtInitVtbl *lpIShellExtInitVtbl;
+ const struct IClassFactoryVtbl *lpIClassFactoryVtbl;
+ DWORD ref;
+
+ HWND hwndDlg;
+ PDESK_EXT_INTERFACE DeskExtInterface;
+ IDataObject *pdtobj;
+} DESKMONITOR, *PDESKMONITOR;
+
+extern LONG dll_refs;
+
+#define impl_to_interface(impl,iface) (struct iface *)(&(impl)->lp##iface##Vtbl)
+#define interface_to_impl(instance,iface) ((PDESKMONITOR)((ULONG_PTR)instance -
FIELD_OFFSET(DESKMONITOR,lp##iface##Vtbl)))
+
+HRESULT
+IDeskMonitor_Constructor(REFIID riid,
+ LPVOID *ppv);
+
+VOID
+IDeskMonitor_InitIface(PDESKMONITOR This);
+
+HRESULT STDMETHODCALLTYPE
+IDeskMonitor_QueryInterface(PDESKMONITOR This,
+ REFIID iid,
+ PVOID *pvObject);
+
+ULONG
+IDeskMonitor_AddRef(PDESKMONITOR This);
+
+ULONG
+IDeskMonitor_Release(PDESKMONITOR This);
+
+HRESULT
+IDeskMonitor_Initialize(PDESKMONITOR This,
+ LPCITEMIDLIST pidlFolder,
+ IDataObject *pdtobj,
+ HKEY hkeyProgID);
+
+HRESULT
+IDeskMonitor_AddPages(PDESKMONITOR This,
+ LPFNADDPROPSHEETPAGE pfnAddPage,
+ LPARAM lParam);
+
+HRESULT
+IDeskMonitor_ReplacePage(PDESKMONITOR This,
+ EXPPS uPageID,
+ LPFNADDPROPSHEETPAGE pfnReplacePage,
+ LPARAM lParam);
+
+static const GUID CLSID_IDeskMonitor =
{0x42071713,0x76d4,0x11d1,{0x8b,0x24,0x00,0xa0,0xc9,0x06,0x8f,0xf3}};
+
+ULONG __cdecl DbgPrint(PCCH Format,...);
+
+#endif /* __DESKMON__H */
Propchange: trunk/reactos/dll/win32/shellext/deskmon/deskmon.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/shellext/deskmon/deskmon.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shellext/deskmon…
==============================================================================
--- trunk/reactos/dll/win32/shellext/deskmon/deskmon.rbuild (added)
+++ trunk/reactos/dll/win32/shellext/deskmon/deskmon.rbuild Thu Sep 27 09:45:03 2007
@@ -1,0 +1,21 @@
+<module name="deskmon" type="win32dll"
baseaddress="${BASEADDRESS_DESKMON}" installbase="system32"
installname="deskmon.dll" unicode="yes">
+ <importlibrary definition="deskmon.spec.def" />
+ <include base="deskmon">.</include>
+ <define name="__USE_W32API" />
+ <define name="_WIN32_IE">0x0500</define>
+ <define name="_WIN32_WINNT">0x0600</define>
+ <define name="WINVER">0x0600</define>
+ <library>ntdll</library>
+ <library>kernel32</library>
+ <library>user32</library>
+ <library>gdi32</library>
+ <library>comctl32</library>
+ <library>ole32</library>
+ <library>uuid</library>
+ <library>msvcrt</library>
+ <file>deskmon.c</file>
+ <file>shxiface.c</file>
+ <file>deskmon.rc</file>
+ <file>deskmon.spec</file>
+ <pch>precomp.h</pch>
+</module>
Propchange: trunk/reactos/dll/win32/shellext/deskmon/deskmon.rbuild
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/shellext/deskmon/deskmon.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shellext/deskmon…
==============================================================================
--- trunk/reactos/dll/win32/shellext/deskmon/deskmon.rc (added)
+++ trunk/reactos/dll/win32/shellext/deskmon/deskmon.rc Thu Sep 27 09:45:03 2007
@@ -1,0 +1,12 @@
+/* $Id: slayer.rc 24931 2006-11-28 19:35:42Z janderwald $ */
+
+#include <windows.h>
+#include "resource.h"
+
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Advanced display monitor
properties\0"
+#define REACTOS_STR_INTERNAL_NAME "deskmon\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "deskmon.dll\0"
+#include <reactos/version.rc>
+
+#include "rsrc.rc"
Propchange: trunk/reactos/dll/win32/shellext/deskmon/deskmon.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/shellext/deskmon/deskmon.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shellext/deskmon…
==============================================================================
--- trunk/reactos/dll/win32/shellext/deskmon/deskmon.spec (added)
+++ trunk/reactos/dll/win32/shellext/deskmon/deskmon.spec Thu Sep 27 09:45:03 2007
@@ -1,0 +1,4 @@
+# deskmon.dll exports
+
+ 1 stdcall DllCanUnloadNow()
+ 2 stdcall DllGetClassObject(ptr ptr ptr)
Propchange: trunk/reactos/dll/win32/shellext/deskmon/deskmon.spec
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/shellext/deskmon/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shellext/deskmon…
==============================================================================
--- trunk/reactos/dll/win32/shellext/deskmon/lang/en-US.rc (added)
+++ trunk/reactos/dll/win32/shellext/deskmon/lang/en-US.rc Thu Sep 27 09:45:03 2007
@@ -1,0 +1,12 @@
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+IDD_MONITOR DIALOGEX 0, 0, 224, 226
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Monitor"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ GROUPBOX "Monitor type", -1, 7, 3, 237, 52
+ LTEXT "", IDC_MONITORNAME, 40, 17, 190, 20, SS_NOPREFIX
+ PUSHBUTTON "&Properties", IDC_MONITORPROPERTIES, 177, 35, 59, 14,
WS_DISABLED
+END
+
Propchange: trunk/reactos/dll/win32/shellext/deskmon/lang/en-US.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/shellext/deskmon/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shellext/deskmon…
==============================================================================
--- trunk/reactos/dll/win32/shellext/deskmon/precomp.h (added)
+++ trunk/reactos/dll/win32/shellext/deskmon/precomp.h Thu Sep 27 09:45:03 2007
@@ -1,0 +1,13 @@
+#ifndef __PRECOMP__H
+#define __PRECOMP__H
+
+#define COBJMACROS
+#include <windows.h>
+#include <tchar.h>
+#include <stdio.h>
+#include <shlobj.h>
+#include <dll/desk/deskcplx.h>
+#include "deskmon.h"
+#include "resource.h"
+
+#endif /* __PRECOMP__H */
Propchange: trunk/reactos/dll/win32/shellext/deskmon/precomp.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/shellext/deskmon/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shellext/deskmon…
==============================================================================
--- trunk/reactos/dll/win32/shellext/deskmon/resource.h (added)
+++ trunk/reactos/dll/win32/shellext/deskmon/resource.h Thu Sep 27 09:45:03 2007
@@ -1,0 +1,9 @@
+#ifndef __RESOURCE__H
+#define __RESOURCE__H
+
+#define IDD_MONITOR 100
+
+#define IDC_MONITORNAME 201
+#define IDC_MONITORPROPERTIES 202
+
+#endif /* __RESOURCE__H */
Propchange: trunk/reactos/dll/win32/shellext/deskmon/resource.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/shellext/deskmon/rsrc.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shellext/deskmon…
==============================================================================
--- trunk/reactos/dll/win32/shellext/deskmon/rsrc.rc (added)
+++ trunk/reactos/dll/win32/shellext/deskmon/rsrc.rc Thu Sep 27 09:45:03 2007
@@ -1,0 +1,7 @@
+#include <windows.h>
+#include "resource.h"
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+
+#include "lang/en-US.rc"
+
Propchange: trunk/reactos/dll/win32/shellext/deskmon/rsrc.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/shellext/deskmon/shxiface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shellext/deskmon…
==============================================================================
--- trunk/reactos/dll/win32/shellext/deskmon/shxiface.c (added)
+++ trunk/reactos/dll/win32/shellext/deskmon/shxiface.c Thu Sep 27 09:45:03 2007
@@ -1,0 +1,209 @@
+#include "precomp.h"
+
+#define NDEBUG
+#include <debug.h>
+
+LONG dll_refs = 0;
+
+static HRESULT STDMETHODCALLTYPE
+IDeskMonitor_IShellPropSheetExt_QueryInterface(IShellPropSheetExt *iface,
+ REFIID iid,
+ PVOID *pvObject)
+{
+ PDESKMONITOR This = interface_to_impl(iface, IShellPropSheetExt);
+ return IDeskMonitor_QueryInterface(This,
+ iid,
+ pvObject);
+}
+
+static ULONG STDMETHODCALLTYPE
+IDeskMonitor_IShellPropSheetExt_AddRef(IShellPropSheetExt* iface)
+{
+ PDESKMONITOR This = interface_to_impl(iface, IShellPropSheetExt);
+ return IDeskMonitor_AddRef(This);
+}
+
+static ULONG STDMETHODCALLTYPE
+IDeskMonitor_IShellPropSheetExt_Release(IShellPropSheetExt* iface)
+{
+ PDESKMONITOR This = interface_to_impl(iface, IShellPropSheetExt);
+ return IDeskMonitor_Release(This);
+}
+
+static HRESULT STDMETHODCALLTYPE
+IDeskMonitor_IShellPropSheetExt_AddPages(IShellPropSheetExt* iface,
+ LPFNADDPROPSHEETPAGE pfnAddPage,
+ LPARAM lParam)
+{
+ PDESKMONITOR This = interface_to_impl(iface, IShellPropSheetExt);
+ return IDeskMonitor_AddPages(This,
+ pfnAddPage,
+ lParam);
+}
+
+static HRESULT STDMETHODCALLTYPE
+IDeskMonitor_IShellPropSheetExt_ReplacePage(IShellPropSheetExt* iface,
+ EXPPS uPageID,
+ LPFNADDPROPSHEETPAGE pfnReplacePage,
+ LPARAM lParam)
+{
+ PDESKMONITOR This = interface_to_impl(iface, IShellPropSheetExt);
+ return IDeskMonitor_ReplacePage(This,
+ uPageID,
+ pfnReplacePage,
+ lParam);
+}
+
+static IShellPropSheetExtVtbl efvtIShellPropSheetExt =
+{
+ IDeskMonitor_IShellPropSheetExt_QueryInterface,
+ IDeskMonitor_IShellPropSheetExt_AddRef,
+ IDeskMonitor_IShellPropSheetExt_Release,
+ IDeskMonitor_IShellPropSheetExt_AddPages,
+ IDeskMonitor_IShellPropSheetExt_ReplacePage
+};
+
+static HRESULT STDMETHODCALLTYPE
+IDeskMonitor_IShellExtInit_QueryInterface(IShellExtInit *iface,
+ REFIID iid,
+ PVOID *pvObject)
+{
+ PDESKMONITOR This = interface_to_impl(iface, IShellExtInit);
+ return IDeskMonitor_QueryInterface(This,
+ iid,
+ pvObject);
+}
+
+static ULONG STDMETHODCALLTYPE
+IDeskMonitor_IShellExtInit_AddRef(IShellExtInit* iface)
+{
+ PDESKMONITOR This = interface_to_impl(iface, IShellExtInit);
+ return IDeskMonitor_AddRef(This);
+}
+
+static ULONG STDMETHODCALLTYPE
+IDeskMonitor_IShellExtInit_Release(IShellExtInit* iface)
+{
+ PDESKMONITOR This = interface_to_impl(iface, IShellExtInit);
+ return IDeskMonitor_Release(This);
+}
+
+static HRESULT STDMETHODCALLTYPE
+IDeskMonitor_IShellExtInit_Initialize(IShellExtInit* iface,
+ LPCITEMIDLIST pidlFolder,
+ IDataObject *pdtobj,
+ HKEY hkeyProgID)
+{
+ PDESKMONITOR This = interface_to_impl(iface, IShellExtInit);
+ return IDeskMonitor_Initialize(This,
+ pidlFolder,
+ pdtobj,
+ hkeyProgID);
+}
+
+static IShellExtInitVtbl efvtIShellExtInit =
+{
+ IDeskMonitor_IShellExtInit_QueryInterface,
+ IDeskMonitor_IShellExtInit_AddRef,
+ IDeskMonitor_IShellExtInit_Release,
+ IDeskMonitor_IShellExtInit_Initialize
+};
+
+static HRESULT STDMETHODCALLTYPE
+IDeskMonitor_IClassFactory_QueryInterface(IClassFactory *iface,
+ REFIID iid,
+ PVOID *pvObject)
+{
+ PDESKMONITOR This = interface_to_impl(iface, IClassFactory);
+ return IDeskMonitor_QueryInterface(This,
+ iid,
+ pvObject);
+}
+
+static ULONG STDMETHODCALLTYPE
+IDeskMonitor_IClassFactory_AddRef(IClassFactory* iface)
+{
+ PDESKMONITOR This = interface_to_impl(iface, IClassFactory);
+ return IDeskMonitor_AddRef(This);
+}
+
+static ULONG STDMETHODCALLTYPE
+IDeskMonitor_IClassFactory_Release(IClassFactory* iface)
+{
+ PDESKMONITOR This = interface_to_impl(iface, IClassFactory);
+ return IDeskMonitor_Release(This);
+}
+
+static HRESULT STDMETHODCALLTYPE
+IDeskMonitor_IClassFactory_CreateInstance(IClassFactory *iface,
+ IUnknown * pUnkOuter,
+ REFIID riid,
+ PVOID *ppvObject)
+{
+ if (pUnkOuter != NULL &&
+ !IsEqualIID(riid,
+ &IID_IUnknown))
+ {
+ return CLASS_E_NOAGGREGATION;
+ }
+
+ return IDeskMonitor_Constructor(riid,
+ ppvObject);
+}
+
+static HRESULT STDMETHODCALLTYPE
+IDeskMonitor_IClassFactory_LockServer(IClassFactory *iface,
+ BOOL fLock)
+{
+ if (fLock)
+ InterlockedIncrement(&dll_refs);
+ else
+ InterlockedDecrement(&dll_refs);
+
+ return S_OK;
+}
+
+static IClassFactoryVtbl efvtIClassFactory =
+{
+ IDeskMonitor_IClassFactory_QueryInterface,
+ IDeskMonitor_IClassFactory_AddRef,
+ IDeskMonitor_IClassFactory_Release,
+ IDeskMonitor_IClassFactory_CreateInstance,
+ IDeskMonitor_IClassFactory_LockServer,
+};
+
+VOID
+IDeskMonitor_InitIface(PDESKMONITOR This)
+{
+ This->lpIShellPropSheetExtVtbl = &efvtIShellPropSheetExt;
+ This->lpIShellExtInitVtbl = &efvtIShellExtInit;
+ This->lpIClassFactoryVtbl = &efvtIClassFactory;
+
+ IDeskMonitor_AddRef(This);
+}
+
+HRESULT WINAPI
+DllGetClassObject(REFCLSID rclsid,
+ REFIID riid,
+ LPVOID *ppv)
+{
+ if (ppv == NULL)
+ return E_INVALIDARG;
+
+ *ppv = NULL;
+ if (IsEqualCLSID(rclsid,
+ &CLSID_IDeskMonitor))
+ {
+ return IDeskMonitor_Constructor(riid,
+ ppv);
+ }
+
+ DPRINT1("DllGetClassObject: CLASS_E_CLASSNOTAVAILABLE\n");
+ return CLASS_E_CLASSNOTAVAILABLE;
+}
+
+HRESULT WINAPI
+DllCanUnloadNow(VOID)
+{
+ return dll_refs == 0 ? S_OK : S_FALSE;
+}
Propchange: trunk/reactos/dll/win32/shellext/deskmon/shxiface.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/shellext/shellext.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shellext/shellex…
==============================================================================
--- trunk/reactos/dll/win32/shellext/shellext.rbuild (original)
+++ trunk/reactos/dll/win32/shellext/shellext.rbuild Thu Sep 27 09:45:03 2007
@@ -7,4 +7,7 @@
<directory name="deskadp">
<xi:include href="deskadp/deskadp.rbuild" />
</directory>
+ <directory name="deskmon">
+ <xi:include href="deskmon/deskmon.rbuild" />
+ </directory>
</group>