ReactOS  0.4.15-dev-4872-g8a3db97
deskadp.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _DESKDISPLAYADAPTER
 

Macros

#define impl_to_interface(impl, iface)   (struct iface *)(&(impl)->lp##iface##Vtbl)
 
#define interface_to_impl(instance, iface)   ((PDESKDISPLAYADAPTER)((ULONG_PTR)instance - FIELD_OFFSET(DESKDISPLAYADAPTER,lp##iface##Vtbl)))
 

Typedefs

typedef struct _DESKDISPLAYADAPTER DESKDISPLAYADAPTER
 
typedef struct _DESKDISPLAYADAPTERPDESKDISPLAYADAPTER
 

Functions

HRESULT IDeskDisplayAdapter_Constructor (REFIID riid, LPVOID *ppv)
 
VOID IDeskDisplayAdapter_InitIface (PDESKDISPLAYADAPTER This)
 
HRESULT STDMETHODCALLTYPE IDeskDisplayAdapter_QueryInterface (PDESKDISPLAYADAPTER This, REFIID iid, PVOID *pvObject)
 
ULONG IDeskDisplayAdapter_AddRef (PDESKDISPLAYADAPTER This)
 
ULONG IDeskDisplayAdapter_Release (PDESKDISPLAYADAPTER This)
 
HRESULT IDeskDisplayAdapter_Initialize (PDESKDISPLAYADAPTER This, LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID)
 
HRESULT IDeskDisplayAdapter_AddPages (PDESKDISPLAYADAPTER This, LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam)
 
HRESULT IDeskDisplayAdapter_ReplacePage (PDESKDISPLAYADAPTER This, EXPPS uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam)
 
ULONG __cdecl DbgPrint (PCCH Format,...)
 

Variables

LONG dll_refs
 
static const GUID CLSID_IDeskDisplayAdapter = {0x42071712,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 20 of file deskadp.h.

◆ interface_to_impl

#define interface_to_impl (   instance,
  iface 
)    ((PDESKDISPLAYADAPTER)((ULONG_PTR)instance - FIELD_OFFSET(DESKDISPLAYADAPTER,lp##iface##Vtbl)))

Definition at line 21 of file deskadp.h.

Typedef Documentation

◆ DESKDISPLAYADAPTER

◆ PDESKDISPLAYADAPTER

Function Documentation

◆ DbgPrint()

ULONG __cdecl DbgPrint ( PCCH  Format,
  ... 
)

Definition at line 427 of file debug.c.

428 {
429  return 0;
430 }

◆ IDeskDisplayAdapter_AddPages()

HRESULT IDeskDisplayAdapter_AddPages ( PDESKDISPLAYADAPTER  This,
LPFNADDPROPSHEETPAGE  pfnAddPage,
LPARAM  lParam 
)

Definition at line 550 of file deskadp.c.

553 {
554  HPROPSHEETPAGE hpsp;
555  PROPSHEETPAGE psp;
556 
557  DPRINT1("IDeskDisplayAdapter::AddPages(%p,%p)\n", pfnAddPage, lParam);
558 
559  psp.dwSize = sizeof(psp);
560  psp.dwFlags = PSP_DEFAULT;
561  psp.hInstance = hInstance;
562  psp.pszTemplate = MAKEINTRESOURCE(IDD_DISPLAYADAPTER);
563  psp.pfnDlgProc = DisplayAdapterDlgProc;
564  psp.lParam = (LPARAM)This;
565 
566  hpsp = CreatePropertySheetPage(&psp);
567  if (hpsp != NULL && pfnAddPage(hpsp, lParam))
568  return S_OK;
569 
570  return S_FALSE;
571 }
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDD_DISPLAYADAPTER
Definition: resource.h:3
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
#define S_FALSE
Definition: winerror.h:2357
LONG_PTR LPARAM
Definition: windef.h:208
#define CreatePropertySheetPage
Definition: prsht.h:399
static INT_PTR CALLBACK DisplayAdapterDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: deskadp.c:376
#define PSP_DEFAULT
Definition: prsht.h:22
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
#define DPRINT1
Definition: precomp.h:8
LPARAM lParam
Definition: combotst.c:139
#define PROPSHEETPAGE
Definition: prsht.h:389
static HINSTANCE hInstance
Definition: deskadp.c:10

Referenced by IDeskDisplayAdapter_IShellPropSheetExt_AddPages().

◆ IDeskDisplayAdapter_AddRef()

ULONG IDeskDisplayAdapter_AddRef ( PDESKDISPLAYADAPTER  This)

Definition at line 463 of file deskadp.c.

464 {
465  ULONG ret;
466 
468  if (ret == 1)
470 
471  return ret;
472 }
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 IDeskDisplayAdapter_IClassFactory_AddRef(), IDeskDisplayAdapter_InitIface(), IDeskDisplayAdapter_IShellExtInit_AddRef(), IDeskDisplayAdapter_IShellPropSheetExt_AddRef(), and IDeskDisplayAdapter_QueryInterface().

◆ IDeskDisplayAdapter_Constructor()

HRESULT IDeskDisplayAdapter_Constructor ( REFIID  riid,
LPVOID ppv 
)

Definition at line 584 of file deskadp.c.

586 {
588  HRESULT hRet = E_OUTOFMEMORY;
589 
590  DPRINT1("IDeskDisplayAdapter::Constructor(%p,%p)\n", riid, ppv);
591 
593  0,
594  sizeof(*This));
595  if (This != NULL)
596  {
598  sizeof(*This));
599 
601 
603  riid,
604  ppv);
605  if (!SUCCEEDED(hRet))
607  }
608 
609  return hRet;
610 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define ZeroMemory
Definition: winbase.h:1667
HRESULT STDMETHODCALLTYPE IDeskDisplayAdapter_QueryInterface(PDESKDISPLAYADAPTER This, REFIID iid, PVOID *pvObject)
Definition: deskadp.c:494
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
if SUCCEEDED(hr)
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:79
ULONG IDeskDisplayAdapter_Release(PDESKDISPLAYADAPTER This)
Definition: deskadp.c:475
VOID IDeskDisplayAdapter_InitIface(PDESKDISPLAYADAPTER This)
Definition: shxiface.c:176
#define NULL
Definition: types.h:112
#define DPRINT1
Definition: precomp.h:8

Referenced by DllGetClassObject(), and IDeskDisplayAdapter_IClassFactory_CreateInstance().

◆ IDeskDisplayAdapter_Initialize()

HRESULT IDeskDisplayAdapter_Initialize ( PDESKDISPLAYADAPTER  This,
LPCITEMIDLIST  pidlFolder,
IDataObject pdtobj,
HKEY  hkeyProgID 
)

Definition at line 528 of file deskadp.c.

532 {
533  DPRINT1("IDeskDisplayAdapter::Initialize(%p,%p,%p)\n", pidlFolder, pdtobj, hkeyProgID);
534 
535  if (pdtobj != NULL)
536  {
537  IDataObject_AddRef(pdtobj);
538  This->pdtobj = pdtobj;
539 
540  /* Get a copy of the desk.cpl extension interface */
541  This->DeskExtInterface = QueryDeskCplExtInterface(This->pdtobj);
542  if (This->DeskExtInterface != NULL)
543  return S_OK;
544  }
545 
546  return S_FALSE;
547 }
static __inline PDESK_EXT_INTERFACE QueryDeskCplExtInterface(IDataObject *pdo)
Definition: deskcplx.h:48
#define S_FALSE
Definition: winerror.h:2357
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
#define DPRINT1
Definition: precomp.h:8

Referenced by IDeskDisplayAdapter_IShellExtInit_Initialize().

◆ IDeskDisplayAdapter_InitIface()

VOID IDeskDisplayAdapter_InitIface ( PDESKDISPLAYADAPTER  This)

Definition at line 176 of file shxiface.c.

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

Referenced by IDeskDisplayAdapter_Constructor().

◆ IDeskDisplayAdapter_QueryInterface()

HRESULT STDMETHODCALLTYPE IDeskDisplayAdapter_QueryInterface ( PDESKDISPLAYADAPTER  This,
REFIID  iid,
PVOID pvObject 
)

Definition at line 494 of file deskadp.c.

497 {
498  *pvObject = NULL;
499 
500  if (IsEqualIID(iid,
501  &IID_IShellPropSheetExt) ||
502  IsEqualIID(iid,
503  &IID_IUnknown))
504  {
506  }
507  else if (IsEqualIID(iid,
508  &IID_IShellExtInit))
509  {
510  *pvObject = impl_to_interface(This, IShellExtInit);
511  }
512  else if (IsEqualIID(iid,
514  {
515  *pvObject = impl_to_interface(This, IClassFactory);
516  }
517  else
518  {
519  DPRINT1("IDeskDisplayAdapter::QueryInterface(%p,%p): E_NOINTERFACE\n", iid, pvObject);
520  return E_NOINTERFACE;
521  }
522 
524  return S_OK;
525 }
#define E_NOINTERFACE
Definition: winerror.h:2364
ULONG IDeskDisplayAdapter_AddRef(PDESKDISPLAYADAPTER This)
Definition: deskadp.c:463
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:52
#define impl_to_interface(impl, iface)
Definition: dwnl.c:35
#define NULL
Definition: types.h:112
#define DPRINT1
Definition: precomp.h:8
const GUID IID_IClassFactory
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

Referenced by IDeskDisplayAdapter_Constructor(), IDeskDisplayAdapter_IClassFactory_QueryInterface(), IDeskDisplayAdapter_IShellExtInit_QueryInterface(), and IDeskDisplayAdapter_IShellPropSheetExt_QueryInterface().

◆ IDeskDisplayAdapter_Release()

ULONG IDeskDisplayAdapter_Release ( PDESKDISPLAYADAPTER  This)

Definition at line 475 of file deskadp.c.

476 {
477  ULONG ret;
478 
480  if (ret == 0)
481  {
484 
486  0,
487  This);
488  }
489 
490  return ret;
491 }
DECLSPEC_HIDDEN LONG dll_refs
Definition: devenum_main.c:28
static VOID IDeskDisplayAdapter_Destroy(PDESKDISPLAYADAPTER This)
Definition: deskadp.c:441
#define GetProcessHeap()
Definition: compat.h:595
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:594

Referenced by IDeskDisplayAdapter_Constructor(), IDeskDisplayAdapter_IClassFactory_Release(), IDeskDisplayAdapter_IShellExtInit_Release(), and IDeskDisplayAdapter_IShellPropSheetExt_Release().

◆ IDeskDisplayAdapter_ReplacePage()

HRESULT IDeskDisplayAdapter_ReplacePage ( PDESKDISPLAYADAPTER  This,
EXPPS  uPageID,
LPFNADDPROPSHEETPAGE  pfnReplacePage,
LPARAM  lParam 
)

Definition at line 574 of file deskadp.c.

578 {
579  DPRINT1("IDeskDisplayAdapter::ReplacePage(%u,%p,%p)\n", uPageID, pfnReplacePage, lParam);
580  return E_NOTIMPL;
581 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define DPRINT1
Definition: precomp.h:8
LPARAM lParam
Definition: combotst.c:139

Referenced by IDeskDisplayAdapter_IShellPropSheetExt_ReplacePage().

Variable Documentation

◆ CLSID_IDeskDisplayAdapter

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

Definition at line 58 of file deskadp.h.

Referenced by DllGetClassObject().

◆ dll_refs

LONG dll_refs

Definition at line 28 of file devenum_main.c.