ReactOS 0.4.15-dev-7934-g1dc8d80
deskmon.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _DESKMONINFO
 
struct  _DESKMONITOR
 

Macros

#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)))
 

Typedefs

typedef struct _DESKMONINFO DESKMONINFO
 
typedef struct _DESKMONINFOPDESKMONINFO
 
typedef struct _DESKMONITOR DESKMONITOR
 
typedef struct _DESKMONITORPDESKMONITOR
 

Functions

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)
 
ULONG __cdecl DbgPrint (PCCH Format,...)
 

Variables

LONG dll_refs
 
static const GUID CLSID_IDeskMonitor = {0x42071713,0x76d4,0x11d1,{0x8b,0x24,0x00,0xa0,0xc9,0x06,0x8f,0xf3}}
 

Macro Definition Documentation

◆ impl_to_interface

#define impl_to_interface (   impl,
  iface 
)    (struct iface *)(&(impl)->lp##iface##Vtbl)

Definition at line 40 of file deskmon.h.

◆ interface_to_impl

#define interface_to_impl (   instance,
  iface 
)    ((PDESKMONITOR)((ULONG_PTR)instance - FIELD_OFFSET(DESKMONITOR,lp##iface##Vtbl)))

Definition at line 41 of file deskmon.h.

Typedef Documentation

◆ DESKMONINFO

◆ DESKMONITOR

◆ PDESKMONINFO

◆ PDESKMONITOR

Function Documentation

◆ DbgPrint()

ULONG __cdecl DbgPrint ( PCCH  Format,
  ... 
)

Definition at line 432 of file debug.c.

433{
434 return 0;
435}

◆ IDeskMonitor_AddPages()

HRESULT IDeskMonitor_AddPages ( PDESKMONITOR  This,
LPFNADDPROPSHEETPAGE  pfnAddPage,
LPARAM  lParam 
)

Definition at line 810 of file deskmon.c.

813{
814 HPROPSHEETPAGE hpsp;
815 PROPSHEETPAGE psp;
816
817 DPRINT1("IDeskMonitor::AddPages(%p,%p)\n", pfnAddPage, lParam);
818
819 psp.dwSize = sizeof(psp);
820 psp.dwFlags = PSP_DEFAULT;
821 psp.hInstance = hInstance;
822 psp.pszTemplate = MAKEINTRESOURCE(IDD_MONITOR);
823 psp.pfnDlgProc = MonitorDlgProc;
824 psp.lParam = (LPARAM)This;
825
826 hpsp = CreatePropertySheetPage(&psp);
827 if (hpsp != NULL && pfnAddPage(hpsp, lParam))
828 return S_OK;
829
830 return S_FALSE;
831}
#define DPRINT1
Definition: precomp.h:8
LPARAM lParam
Definition: combotst.c:139
static HINSTANCE hInstance
Definition: deskmon.c:12
static INT_PTR CALLBACK MonitorDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: deskmon.c:610
#define NULL
Definition: types.h:112
#define IDD_MONITOR
Definition: resource.h:3
#define S_OK
Definition: intsafe.h:52
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
#define CreatePropertySheetPage
Definition: prsht.h:399
#define PSP_DEFAULT
Definition: prsht.h:22
#define PROPSHEETPAGE
Definition: prsht.h:389
LONG_PTR LPARAM
Definition: windef.h:208
#define S_FALSE
Definition: winerror.h:2357
#define MAKEINTRESOURCE
Definition: winuser.h:591

Referenced by IDeskMonitor_IShellPropSheetExt_AddPages().

◆ IDeskMonitor_AddRef()

ULONG IDeskMonitor_AddRef ( PDESKMONITOR  This)

Definition at line 723 of file deskmon.c.

724{
725 ULONG ret;
726
728 if (ret == 1)
730
731 return ret;
732}
#define InterlockedIncrement
Definition: armddk.h:53
DECLSPEC_HIDDEN LONG dll_refs
Definition: devenum_main.c:28
int32_t * PLONG
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
int ret

Referenced by IDeskMonitor_IClassFactory_AddRef(), IDeskMonitor_InitIface(), IDeskMonitor_IShellExtInit_AddRef(), IDeskMonitor_IShellPropSheetExt_AddRef(), and IDeskMonitor_QueryInterface().

◆ IDeskMonitor_Constructor()

HRESULT IDeskMonitor_Constructor ( REFIID  riid,
LPVOID ppv 
)

Definition at line 844 of file deskmon.c.

846{
848 HRESULT hRet = E_OUTOFMEMORY;
849
850 DPRINT1("IDeskMonitor::Constructor(%p,%p)\n", riid, ppv);
851
853 0,
854 sizeof(*This));
855 if (This != NULL)
856 {
858 sizeof(*This));
859
861
863 riid,
864 ppv);
865 if (!SUCCEEDED(hRet))
867 }
868
869 return hRet;
870}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
ULONG IDeskMonitor_Release(PDESKMONITOR This)
Definition: deskmon.c:735
HRESULT STDMETHODCALLTYPE IDeskMonitor_QueryInterface(PDESKMONITOR This, REFIID iid, PVOID *pvObject)
Definition: deskmon.c:754
VOID IDeskMonitor_InitIface(PDESKMONITOR This)
Definition: shxiface.c:176
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define ZeroMemory
Definition: winbase.h:1712

Referenced by DllGetClassObject(), and IDeskMonitor_IClassFactory_CreateInstance().

◆ IDeskMonitor_Initialize()

HRESULT IDeskMonitor_Initialize ( PDESKMONITOR  This,
LPCITEMIDLIST  pidlFolder,
IDataObject pdtobj,
HKEY  hkeyProgID 
)

Definition at line 788 of file deskmon.c.

792{
793 DPRINT1("IDeskMonitor::Initialize(%p,%p,%p)\n", pidlFolder, pdtobj, hkeyProgID);
794
795 if (pdtobj != NULL)
796 {
797 IDataObject_AddRef(pdtobj);
798 This->pdtobj = pdtobj;
799
800 /* Get a copy of the desk.cpl extension interface */
801 This->DeskExtInterface = QueryDeskCplExtInterface(This->pdtobj);
802 if (This->DeskExtInterface != NULL)
803 return S_OK;
804 }
805
806 return S_FALSE;
807}
static __inline PDESK_EXT_INTERFACE QueryDeskCplExtInterface(IDataObject *pdo)
Definition: deskcplx.h:48

Referenced by IDeskMonitor_IShellExtInit_Initialize().

◆ IDeskMonitor_InitIface()

VOID IDeskMonitor_InitIface ( PDESKMONITOR  This)

Definition at line 176 of file shxiface.c.

177{
178 This->lpIShellPropSheetExtVtbl = &efvtIShellPropSheetExt;
179 This->lpIShellExtInitVtbl = &efvtIShellExtInit;
180 This->lpIClassFactoryVtbl = &efvtIClassFactory;
181
183}
static IShellExtInitVtbl efvtIShellExtInit
Definition: shxiface.c:104
static IClassFactoryVtbl efvtIClassFactory
Definition: shxiface.c:166
static IShellPropSheetExtVtbl efvtIShellPropSheetExt
Definition: shxiface.c:57
ULONG IDeskMonitor_AddRef(PDESKMONITOR This)
Definition: deskmon.c:723

Referenced by IDeskMonitor_Constructor().

◆ IDeskMonitor_QueryInterface()

HRESULT STDMETHODCALLTYPE IDeskMonitor_QueryInterface ( PDESKMONITOR  This,
REFIID  iid,
PVOID pvObject 
)

Definition at line 754 of file deskmon.c.

757{
758 *pvObject = NULL;
759
760 if (IsEqualIID(iid,
761 &IID_IShellPropSheetExt) ||
762 IsEqualIID(iid,
763 &IID_IUnknown))
764 {
766 }
767 else if (IsEqualIID(iid,
768 &IID_IShellExtInit))
769 {
771 }
772 else if (IsEqualIID(iid,
774 {
776 }
777 else
778 {
779 DPRINT1("IDeskMonitor::QueryInterface(%p,%p): E_NOINTERFACE\n", iid, pvObject);
780 return E_NOINTERFACE;
781 }
782
784 return S_OK;
785}
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define impl_to_interface(impl, iface)
Definition: dwnl.c:35
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:2364

Referenced by IDeskMonitor_Constructor(), IDeskMonitor_IClassFactory_QueryInterface(), IDeskMonitor_IShellExtInit_QueryInterface(), and IDeskMonitor_IShellPropSheetExt_QueryInterface().

◆ IDeskMonitor_Release()

ULONG IDeskMonitor_Release ( PDESKMONITOR  This)

Definition at line 735 of file deskmon.c.

736{
737 ULONG ret;
738
740 if (ret == 0)
741 {
744
746 0,
747 This);
748 }
749
750 return ret;
751}
#define InterlockedDecrement
Definition: armddk.h:52
static VOID IDeskMonitor_Destroy(PDESKMONITOR This)
Definition: deskmon.c:689
#define HeapFree(x, y, z)
Definition: compat.h:735

Referenced by IDeskMonitor_Constructor(), IDeskMonitor_IClassFactory_Release(), IDeskMonitor_IShellExtInit_Release(), and IDeskMonitor_IShellPropSheetExt_Release().

◆ IDeskMonitor_ReplacePage()

HRESULT IDeskMonitor_ReplacePage ( PDESKMONITOR  This,
EXPPS  uPageID,
LPFNADDPROPSHEETPAGE  pfnReplacePage,
LPARAM  lParam 
)

Definition at line 834 of file deskmon.c.

838{
839 DPRINT1("IDeskMonitor::ReplacePage(%u,%p,%p)\n", uPageID, pfnReplacePage, lParam);
840 return E_NOTIMPL;
841}
#define E_NOTIMPL
Definition: ddrawi.h:99

Referenced by IDeskMonitor_IShellPropSheetExt_ReplacePage().

Variable Documentation

◆ CLSID_IDeskMonitor

const GUID CLSID_IDeskMonitor = {0x42071713,0x76d4,0x11d1,{0x8b,0x24,0x00,0xa0,0xc9,0x06,0x8f,0xf3}}
static

Definition at line 78 of file deskmon.h.

Referenced by DllGetClassObject().

◆ dll_refs