ReactOS  0.4.15-dev-985-gd905dd5
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 427 of file debug.c.

428 {
429  return 0;
430 }

◆ IDeskMonitor_AddPages()

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

Definition at line 677 of file deskmon.c.

680 {
681  HPROPSHEETPAGE hpsp;
682  PROPSHEETPAGE psp;
683 
684  DPRINT1("IDeskMonitor::AddPages(%p,%p)\n", pfnAddPage, lParam);
685 
686  psp.dwSize = sizeof(psp);
687  psp.dwFlags = PSP_DEFAULT;
688  psp.hInstance = hInstance;
689  psp.pszTemplate = MAKEINTRESOURCE(IDD_MONITOR);
690  psp.pfnDlgProc = MonitorDlgProc;
691  psp.lParam = (LPARAM)This;
692 
693  hpsp = CreatePropertySheetPage(&psp);
694  if (hpsp != NULL && pfnAddPage(hpsp, lParam))
695  return S_OK;
696 
697  return S_FALSE;
698 }
#define MAKEINTRESOURCE
Definition: winuser.h:591
static INT_PTR CALLBACK MonitorDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: deskmon.c:478
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define CreatePropertySheetPage
Definition: prsht.h:399
#define PSP_DEFAULT
Definition: prsht.h:22
static HINSTANCE hInstance
Definition: deskmon.c:10
#define S_OK
Definition: intsafe.h:59
#define IDD_MONITOR
Definition: resource.h:3
#define DPRINT1
Definition: precomp.h:8
LPARAM lParam
Definition: combotst.c:139
#define PROPSHEETPAGE
Definition: prsht.h:389

Referenced by IDeskMonitor_IShellPropSheetExt_AddPages().

◆ IDeskMonitor_AddRef()

ULONG IDeskMonitor_AddRef ( PDESKMONITOR  This)

Definition at line 590 of file deskmon.c.

591 {
592  ULONG ret;
593 
595  if (ret == 1)
597 
598  return ret;
599 }
DECLSPEC_HIDDEN LONG dll_refs
Definition: devenum_main.c:28
int ret
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1
signed int * PLONG
Definition: retypes.h:5

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 711 of file deskmon.c.

713 {
715  HRESULT hRet = E_OUTOFMEMORY;
716 
717  DPRINT1("IDeskMonitor::Constructor(%p,%p)\n", riid, ppv);
718 
720  0,
721  sizeof(*This));
722  if (This != NULL)
723  {
725  sizeof(*This));
726 
728 
730  riid,
731  ppv);
732  if (!SUCCEEDED(hRet))
734  }
735 
736  return hRet;
737 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define ZeroMemory
Definition: winbase.h:1648
HRESULT STDMETHODCALLTYPE IDeskMonitor_QueryInterface(PDESKMONITOR This, REFIID iid, PVOID *pvObject)
Definition: deskmon.c:621
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:484
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:79
ULONG IDeskMonitor_Release(PDESKMONITOR This)
Definition: deskmon.c:602
VOID IDeskMonitor_InitIface(PDESKMONITOR This)
Definition: shxiface.c:176
#define DPRINT1
Definition: precomp.h:8
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by DllGetClassObject(), and IDeskMonitor_IClassFactory_CreateInstance().

◆ IDeskMonitor_Initialize()

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

Definition at line 655 of file deskmon.c.

659 {
660  DPRINT1("IDeskMonitor::Initialize(%p,%p,%p)\n", pidlFolder, pdtobj, hkeyProgID);
661 
662  if (pdtobj != NULL)
663  {
664  IDataObject_AddRef(pdtobj);
665  This->pdtobj = pdtobj;
666 
667  /* Get a copy of the desk.cpl extension interface */
668  This->DeskExtInterface = QueryDeskCplExtInterface(This->pdtobj);
669  if (This->DeskExtInterface != NULL)
670  return S_OK;
671  }
672 
673  return S_FALSE;
674 }
static __inline PDESK_EXT_INTERFACE QueryDeskCplExtInterface(IDataObject *pdo)
Definition: deskcplx.h:48
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
#define DPRINT1
Definition: precomp.h:8

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 IShellPropSheetExtVtbl efvtIShellPropSheetExt
Definition: shxiface.c:57
static IShellExtInitVtbl efvtIShellExtInit
Definition: shxiface.c:104
static IClassFactoryVtbl efvtIClassFactory
Definition: shxiface.c:166
ULONG IDeskMonitor_AddRef(PDESKMONITOR This)
Definition: deskmon.c:590

Referenced by IDeskMonitor_Constructor().

◆ IDeskMonitor_QueryInterface()

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

Definition at line 621 of file deskmon.c.

624 {
625  *pvObject = NULL;
626 
627  if (IsEqualIID(iid,
628  &IID_IShellPropSheetExt) ||
629  IsEqualIID(iid,
630  &IID_IUnknown))
631  {
633  }
634  else if (IsEqualIID(iid,
635  &IID_IShellExtInit))
636  {
637  *pvObject = impl_to_interface(This, IShellExtInit);
638  }
639  else if (IsEqualIID(iid,
641  {
642  *pvObject = impl_to_interface(This, IClassFactory);
643  }
644  else
645  {
646  DPRINT1("IDeskMonitor::QueryInterface(%p,%p): E_NOINTERFACE\n", iid, pvObject);
647  return E_NOINTERFACE;
648  }
649 
651  return S_OK;
652 }
#define E_NOINTERFACE
Definition: winerror.h:2364
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IUnknown
ULONG IDeskMonitor_AddRef(PDESKMONITOR This)
Definition: deskmon.c:590
#define S_OK
Definition: intsafe.h:59
#define impl_to_interface(impl, iface)
Definition: dwnl.c:35
#define DPRINT1
Definition: precomp.h:8
const GUID IID_IClassFactory
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

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

◆ IDeskMonitor_Release()

ULONG IDeskMonitor_Release ( PDESKMONITOR  This)

Definition at line 602 of file deskmon.c.

603 {
604  ULONG ret;
605 
607  if (ret == 0)
608  {
611 
613  0,
614  This);
615  }
616 
617  return ret;
618 }
DECLSPEC_HIDDEN LONG dll_refs
Definition: devenum_main.c:28
static VOID IDeskMonitor_Destroy(PDESKMONITOR This)
Definition: deskmon.c:556
#define GetProcessHeap()
Definition: compat.h:484
int ret
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
signed int * PLONG
Definition: retypes.h:5
#define HeapFree(x, y, z)
Definition: compat.h:483

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 701 of file deskmon.c.

705 {
706  DPRINT1("IDeskMonitor::ReplacePage(%u,%p,%p)\n", uPageID, pfnReplacePage, lParam);
707  return E_NOTIMPL;
708 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define DPRINT1
Definition: precomp.h:8
LPARAM lParam
Definition: combotst.c:139

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