ReactOS 0.4.16-dev-197-g92996da
CControlPanelFolder Class Reference

#include <CControlPanelFolder.h>

Inheritance diagram for CControlPanelFolder:
Collaboration diagram for CControlPanelFolder:

Public Member Functions

 CControlPanelFolder ()
 
 ~CControlPanelFolder ()
 
STDMETHOD() ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override
 
STDMETHOD() EnumObjects (HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override
 
STDMETHOD() BindToObject (PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override
 
STDMETHOD() BindToStorage (PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override
 
STDMETHOD() CompareIDs (LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override
 
STDMETHOD() CreateViewObject (HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override
 
STDMETHOD() GetAttributesOf (UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override
 
STDMETHOD() GetUIObjectOf (HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut) override
 
STDMETHOD() GetDisplayNameOf (PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override
 
STDMETHOD() SetNameOf (HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override
 
STDMETHOD() GetDefaultSearchGUID (GUID *pguid) override
 
STDMETHOD() EnumSearches (IEnumExtraSearch **ppenum) override
 
STDMETHOD() GetDefaultColumn (DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override
 
STDMETHOD() GetDefaultColumnState (UINT iColumn, DWORD *pcsFlags) override
 
STDMETHOD() GetDetailsEx (PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override
 
STDMETHOD() GetDetailsOf (PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override
 
STDMETHOD() MapColumnToSCID (UINT column, SHCOLUMNID *pscid) override
 
STDMETHOD() GetClassID (CLSID *lpClassId) override
 
STDMETHOD() Initialize (PCIDLIST_ABSOLUTE pidl) override
 
STDMETHOD() GetCurFolder (PIDLIST_ABSOLUTE *pidl) override
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
HRESULT GetDefaultSearchGUID ([out] GUID *lpguid)
 
HRESULT EnumSearches ([out] IEnumExtraSearch **ppenum)
 
HRESULT GetDefaultColumn ([in] DWORD dwReserved, [out] ULONG *pSort, [out] ULONG *pDisplay)
 
HRESULT GetDefaultColumnState ([in] UINT iColumn, [out] SHCOLSTATEF *pcsFlags)
 
HRESULT GetDetailsEx ([in] PCUITEMID_CHILD pidl, [in] const SHCOLUMNID *pscid, [out] VARIANT *pv)
 
HRESULT GetDetailsOf ([in] PCUITEMID_CHILD pidl, [in] UINT iColumn, [out] SHELLDETAILS *psd)
 
HRESULT MapColumnToSCID ([in] UINT iColumn, [in] SHCOLUMNID *pscid)
 
- Public Member Functions inherited from IShellFolder
HRESULT ParseDisplayName ([in] HWND hwndOwner, [in] LPBC pbcReserved, [in, string] LPOLESTR lpszDisplayName, [out] ULONG *pchEaten, [out] PIDLIST_RELATIVE *ppidl, [in, out, unique] ULONG *pdwAttributes)
 
HRESULT EnumObjects ([in] HWND hwndOwner, [in] SHCONTF grfFlags, [out] IEnumIDList **ppenumIDList)
 
HRESULT BindToObject ([in] PCUIDLIST_RELATIVE pidl, [in] LPBC pbcReserved, [in] REFIID riid, [out, iid_is(riid)] void **ppvOut)
 
HRESULT BindToStorage ([in] PCUIDLIST_RELATIVE pidl, [in] LPBC pbcReserved, [in] REFIID riid, [out, iid_is(riid)] void **ppvObj)
 
HRESULT CompareIDs ([in] LPARAM lParam, [in] PCUIDLIST_RELATIVE pidl1, [in] PCUIDLIST_RELATIVE pidl2)
 
HRESULT CreateViewObject ([in] HWND hwndOwner, [in] REFIID riid, [out, iid_is(riid)] void **ppvOut)
 
HRESULT GetAttributesOf ([in] UINT cidl, [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl, [in, out] SFGAOF *rgfInOut)
 
HRESULT GetUIObjectOf ([in] HWND hwndOwner, [in] UINT cidl, [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl, [in] REFIID riid, [in, out, unique] UINT *prgfInOut, [out, iid_is(riid)] void **ppvOut)
 
HRESULT GetDisplayNameOf ([in] PCUITEMID_CHILD pidl, [in] SHGDNF uFlags, [out] STRRET *lpName)
 
HRESULT SetNameOf ([in] HWND hwnd, [in] PCUITEMID_CHILD pidl, [in, string] LPCOLESTR lpszName, [in] SHGDNF uFlags, [out] PITEMID_CHILD *ppidlOut)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
HRESULT GetCurFolder ([out] PIDLIST_ABSOLUTE *ppidl)
 
HRESULT Initialize ([in] PCIDLIST_ABSOLUTE pidl)
 
HRESULT GetClassID ([out] CLSID *pClassID)
 

Private Member Functions

HRESULT WINAPI ExecuteFromIdList (LPCITEMIDLIST pidl)
 

Private Attributes

LPITEMIDLIST pidlRoot
 
int dwAttributes
 
CComPtr< IShellFolder2m_regFolder
 

Additional Inherited Members

- Public Types inherited from IShellFolder2
typedef struct IShellFolder2::SHCOLUMNIDLPSHCOLUMNID
 
typedef const SHCOLUMNIDLPCSHCOLUMNID
 
- Public Types inherited from IShellFolder
enum  tagSHGDN {
  SHGDN_NORMAL = 0 , SHGDN_INFOLDER = 1 , SHGDN_FOREDITING = 0x1000 , SHGDN_INCLUDE_NONFILESYS = 0x2000 ,
  SHGDN_FORADDRESSBAR = 0x4000 , SHGDN_FORPARSING = 0x8000
}
 
enum  tagSHCONTF {
  SHCONTF_FOLDERS = 32 , SHCONTF_NONFOLDERS = 64 , SHCONTF_INCLUDEHIDDEN = 128 , SHCONTF_INIT_ON_FIRST_NEXT = 256 ,
  SHCONTF_NETPRINTERSRCH = 512 , SHCONTF_SHAREABLE = 1024 , SHCONTF_STORAGE = 2048 , SHCONTF_NAVIGATION_ENUM = 0x01000 ,
  SHCONTF_FASTITEMS = 0x02000 , SHCONTF_FLATLIST = 0x04000 , SHCONTF_ENABLE_ASYNC = 0x08000 , SHCONTF_INCLUDESUPERHIDDEN = 0x10000
}
 
typedef IShellFolderLPSHELLFOLDER
 
typedef enum IShellFolder::tagSHGDN SHGNO
 
typedef DWORD SHGDNF
 
typedef DWORD SHCONTF
 
typedef ULONG SFGAOF
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IPersistFolder2
typedef IPersistFolder2LPPERSISTFOLDER2
 
- Public Types inherited from IPersistFolder
typedef IPersistFolderLPPERSISTFOLDER
 
- Public Types inherited from IPersist
typedef IPersistLPPERSIST
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Detailed Description

Definition at line 25 of file CControlPanelFolder.h.

Constructor & Destructor Documentation

◆ CControlPanelFolder()

CControlPanelFolder::CControlPanelFolder ( )

Definition at line 264 of file CControlPanelFolder.cpp.

265{
266 pidlRoot = NULL; /* absolute pidl */
267}
#define NULL
Definition: types.h:112

◆ ~CControlPanelFolder()

CControlPanelFolder::~CControlPanelFolder ( )

Definition at line 269 of file CControlPanelFolder.cpp.

270{
271 TRACE("-- destroying IShellFolder(%p)\n", this);
273}
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:326
#define TRACE(s)
Definition: solgame.cpp:4

Member Function Documentation

◆ BindToObject()

HRESULT WINAPI CControlPanelFolder::BindToObject ( PCUIDLIST_RELATIVE  pidl,
LPBC  pbcReserved,
REFIID  riid,
LPVOID ppvOut 
)
override

Definition at line 304 of file CControlPanelFolder.cpp.

309{
310 return m_regFolder->BindToObject(pidl, pbcReserved, riid, ppvOut);
311}
CComPtr< IShellFolder2 > m_regFolder
REFIID riid
Definition: atlbase.h:39

◆ BindToStorage()

HRESULT WINAPI CControlPanelFolder::BindToStorage ( PCUIDLIST_RELATIVE  pidl,
LPBC  pbcReserved,
REFIID  riid,
LPVOID ppvOut 
)
override

Definition at line 316 of file CControlPanelFolder.cpp.

321{
322 FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", this, pidl, pbcReserved, shdebugstr_guid(&riid), ppvOut);
323
324 *ppvOut = NULL;
325 return E_NOTIMPL;
326}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_NOTIMPL
Definition: ddrawi.h:99
const char * shdebugstr_guid(const struct _GUID *id)
Definition: debughlp.cpp:427

◆ CompareIDs()

HRESULT WINAPI CControlPanelFolder::CompareIDs ( LPARAM  lParam,
PCUIDLIST_RELATIVE  pidl1,
PCUIDLIST_RELATIVE  pidl2 
)
override

Implements IShellFolder.

Definition at line 331 of file CControlPanelFolder.cpp.

332{
333 /* Dont use SHELL32_CompareGuidItems because it would cause guid items to come first */
334 if (_ILIsSpecialFolder(pidl1) || _ILIsSpecialFolder(pidl2))
335 {
336 return SHELL32_CompareDetails(this, lParam, pidl1, pidl2);
337 }
338 PIDLCPanelStruct *pData1 = _ILGetCPanelPointer(pidl1);
339 PIDLCPanelStruct *pData2 = _ILGetCPanelPointer(pidl2);
340
341 if (!pData1 || !pData2 || LOWORD(lParam) >= CONTROLPANEL_COL_COUNT)
342 return E_INVALIDARG;
343
344 int result;
345 switch(LOWORD(lParam))
346 {
348 result = _wcsicmp(pData1->szName + pData1->offsDispName, pData2->szName + pData2->offsDispName);
349 break;
351 result = _wcsicmp(pData1->szName + pData1->offsComment, pData2->szName + pData2->offsComment);
352 break;
353 default:
354 ERR("Got wrong lParam!\n");
355 return E_INVALIDARG;
356 }
357
359}
@ CONTROLPANEL_COL_NAME
@ CONTROLPANEL_COL_COMMENT
@ CONTROLPANEL_COL_COUNT
static PIDLCPanelStruct * _ILGetCPanelPointer(LPCITEMIDLIST pidl)
#define ERR(fmt,...)
Definition: precomp.h:57
LPARAM lParam
Definition: combotst.c:139
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint64EXT * result
Definition: glext.h:11304
#define LOWORD(l)
Definition: pedump.c:82
BOOL _ILIsSpecialFolder(LPCITEMIDLIST pidl)
Definition: pidl.c:1998
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define MAKE_COMPARE_HRESULT(x)
Definition: shellutils.h:621
HRESULT SHELL32_CompareDetails(IShellFolder2 *isf, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: shlfolder.cpp:275
WORD offsComment
Definition: pidl.h:127
WCHAR szName[1]
Definition: pidl.h:128
WORD offsDispName
Definition: pidl.h:126

◆ CreateViewObject()

HRESULT WINAPI CControlPanelFolder::CreateViewObject ( HWND  hwndOwner,
REFIID  riid,
LPVOID ppvOut 
)
override

Definition at line 364 of file CControlPanelFolder.cpp.

365{
366 CComPtr<IShellView> pShellView;
368
369 TRACE("(%p)->(hwnd=%p,%s,%p)\n", this, hwndOwner, shdebugstr_guid(&riid), ppvOut);
370
371 if (ppvOut) {
372 *ppvOut = NULL;
373
374 if (IsEqualIID(riid, IID_IDropTarget)) {
375 WARN("IDropTarget not implemented\n");
376 hr = E_NOTIMPL;
377 } else if (IsEqualIID(riid, IID_IContextMenu)) {
378 WARN("IContextMenu not implemented\n");
379 hr = E_NOTIMPL;
380 } else if (IsEqualIID(riid, IID_IShellView)) {
381 SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
382 hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
383 }
384 }
385 TRACE("--(%p)->(interface=%p)\n", this, ppvOut);
386 return hr;
387}
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
Definition: CDefView.cpp:4663
#define WARN(fmt,...)
Definition: precomp.h:61
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
HRESULT hr
Definition: shlfolder.c:183
struct _SFV_CREATE SFV_CREATE

◆ EnumObjects()

HRESULT WINAPI CControlPanelFolder::EnumObjects ( HWND  hwndOwner,
DWORD  dwFlags,
LPENUMIDLIST *  ppEnumIDList 
)
override

Definition at line 293 of file CControlPanelFolder.cpp.

294{
295 CComPtr<IEnumIDList> pRegEnumerator;
296 m_regFolder->EnumObjects(hwndOwner, dwFlags, &pRegEnumerator);
297
298 return ShellObjectCreatorInit<CControlPanelEnum>(dwFlags, pRegEnumerator, IID_PPV_ARG(IEnumIDList, ppEnumIDList));
299}
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
#define IID_PPV_ARG(Itype, ppType)

◆ EnumSearches()

HRESULT WINAPI CControlPanelFolder::EnumSearches ( IEnumExtraSearch **  ppenum)
override

Implements IShellFolder2.

Definition at line 541 of file CControlPanelFolder.cpp.

542{
543 FIXME("(%p)\n", this);
544 return E_NOTIMPL;
545}

◆ ExecuteFromIdList()

HRESULT WINAPI CControlPanelFolder::ExecuteFromIdList ( LPCITEMIDLIST  pidl)
private

◆ GetAttributesOf()

HRESULT WINAPI CControlPanelFolder::GetAttributesOf ( UINT  cidl,
PCUITEMID_CHILD_ARRAY  apidl,
DWORD rgfInOut 
)
override

Definition at line 392 of file CControlPanelFolder.cpp.

393{
394 HRESULT hr = S_OK;
395 static const DWORD dwControlPanelAttributes =
396 SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_CANLINK;
397
398 TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n",
399 this, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0);
400
401 if (!rgfInOut)
402 return E_INVALIDARG;
403 if (cidl && !apidl)
404 return E_INVALIDARG;
405
406 if (*rgfInOut == 0)
407 *rgfInOut = ~0;
408
409 if (!cidl)
410 {
411 *rgfInOut &= dwControlPanelAttributes;
412 }
413 else
414 {
415 while(cidl > 0 && *apidl)
416 {
417 pdump(*apidl);
418 if (_ILIsCPanelStruct(*apidl))
419 *rgfInOut &= SFGAO_CANLINK;
420 else if (_ILIsSpecialFolder(*apidl))
421 m_regFolder->GetAttributesOf(1, apidl, rgfInOut);
422 else
423 ERR("Got unknown pidl\n");
424 apidl++;
425 cidl--;
426 }
427 }
428 /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
429 *rgfInOut &= ~SFGAO_VALIDATE;
430
431 TRACE("-- result=0x%08x\n", *rgfInOut);
432 return hr;
433}
static const DWORD dwControlPanelAttributes
void pdump(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:311
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:52
BOOL _ILIsCPanelStruct(LPCITEMIDLIST pidl)
Definition: pidl.c:2039

◆ GetClassID()

HRESULT WINAPI CControlPanelFolder::GetClassID ( CLSID lpClassId)
override

Implements IPersist.

Definition at line 615 of file CControlPanelFolder.cpp.

616{
617 TRACE("(%p)\n", this);
618
619 if (!lpClassId)
620 return E_POINTER;
621 *lpClassId = CLSID_ControlPanel;
622
623 return S_OK;
624}
#define E_POINTER
Definition: winerror.h:2365

◆ GetCurFolder()

HRESULT WINAPI CControlPanelFolder::GetCurFolder ( PIDLIST_ABSOLUTE pidl)
override

Implements IPersistFolder2.

Definition at line 653 of file CControlPanelFolder.cpp.

654{
655 TRACE("(%p)->(%p)\n", this, pidl);
656
657 if (!pidl)
658 return E_POINTER;
659 *pidl = ILClone(pidlRoot);
660 return S_OK;
661}
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:237

◆ GetDefaultColumn()

HRESULT WINAPI CControlPanelFolder::GetDefaultColumn ( DWORD  dwRes,
ULONG pSort,
ULONG pDisplay 
)
override

Implements IShellFolder2.

Definition at line 547 of file CControlPanelFolder.cpp.

548{
549 TRACE("(%p)\n", this);
550
551 if (pSort) *pSort = 0;
552 if (pDisplay) *pDisplay = 0;
553 return S_OK;
554}

◆ GetDefaultColumnState()

HRESULT WINAPI CControlPanelFolder::GetDefaultColumnState ( UINT  iColumn,
DWORD pcsFlags 
)
override

Implements IShellFolder2.

Definition at line 556 of file CControlPanelFolder.cpp.

557{
558 TRACE("(%p)\n", this);
559
560 if (!pcsFlags || iColumn >= CONTROLPANEL_COL_COUNT)
561 return E_INVALIDARG;
562 *pcsFlags = ControlPanelSFHeader[iColumn].colstate;
563 return S_OK;
564}
static const shvheader ControlPanelSFHeader[]
WORD colstate
Definition: shfldr.h:31

◆ GetDefaultSearchGUID()

HRESULT WINAPI CControlPanelFolder::GetDefaultSearchGUID ( GUID pguid)
override

Implements IShellFolder2.

Definition at line 535 of file CControlPanelFolder.cpp.

536{
537 FIXME("(%p)\n", this);
538 return E_NOTIMPL;
539}

◆ GetDetailsEx()

HRESULT WINAPI CControlPanelFolder::GetDetailsEx ( PCUITEMID_CHILD  pidl,
const SHCOLUMNID pscid,
VARIANT pv 
)
override

Implements IShellFolder2.

Definition at line 566 of file CControlPanelFolder.cpp.

567{
568 FIXME("(%p)\n", this);
569 return E_NOTIMPL;
570}

◆ GetDetailsOf()

HRESULT WINAPI CControlPanelFolder::GetDetailsOf ( PCUITEMID_CHILD  pidl,
UINT  iColumn,
SHELLDETAILS psd 
)
override

Implements IShellFolder2.

Definition at line 572 of file CControlPanelFolder.cpp.

573{
574 if (!psd || iColumn >= CONTROLPANEL_COL_COUNT)
575 return E_INVALIDARG;
576
577 if (!pidl)
578 {
579 psd->fmt = ControlPanelSFHeader[iColumn].fmt;
580 psd->cxChar = ControlPanelSFHeader[iColumn].cxChar;
581 return SHSetStrRet(&psd->str, shell32_hInstance, ControlPanelSFHeader[iColumn].colnameid);
582 }
583 else if (_ILIsSpecialFolder(pidl))
584 {
585 return m_regFolder->GetDetailsOf(pidl, iColumn, psd);
586 }
587 else
588 {
589 PIDLCPanelStruct *pCPanel = _ILGetCPanelPointer(pidl);
590
591 if (!pCPanel)
592 return E_FAIL;
593
594 switch(iColumn)
595 {
597 return SHSetStrRet(&psd->str, pCPanel->szName + pCPanel->offsDispName);
599 return SHSetStrRet(&psd->str, pCPanel->szName + pCPanel->offsComment);
600 }
601 }
602
603 return E_FAIL;
604}
#define shell32_hInstance
#define E_FAIL
Definition: ddrawi.h:102
STRRET str
Definition: shtypes.idl:108

◆ GetDisplayNameOf()

HRESULT WINAPI CControlPanelFolder::GetDisplayNameOf ( PCUITEMID_CHILD  pidl,
DWORD  dwFlags,
LPSTRRET  strRet 
)
override

Definition at line 497 of file CControlPanelFolder.cpp.

498{
499 if (!pidl)
500 return S_FALSE;
501
502 PIDLCPanelStruct *pCPanel = _ILGetCPanelPointer(pidl);
503
504 if (pCPanel)
505 {
506 return SHSetStrRet(strRet, pCPanel->szName + pCPanel->offsDispName);
507 }
508 else if (_ILIsSpecialFolder(pidl))
509 {
510 return m_regFolder->GetDisplayNameOf(pidl, dwFlags, strRet);
511 }
512
513 return E_FAIL;
514}
#define S_FALSE
Definition: winerror.h:2357

◆ GetUIObjectOf()

HRESULT WINAPI CControlPanelFolder::GetUIObjectOf ( HWND  hwndOwner,
UINT  cidl,
PCUITEMID_CHILD_ARRAY  apidl,
REFIID  riid,
UINT prgfInOut,
LPVOID ppvOut 
)
override

Definition at line 447 of file CControlPanelFolder.cpp.

449{
450 LPVOID pObj = NULL;
452
453 TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n",
454 this, hwndOwner, cidl, apidl, shdebugstr_guid(&riid), prgfInOut, ppvOut);
455
456 if (ppvOut) {
457 *ppvOut = NULL;
458
459 if (IsEqualIID(riid, IID_IContextMenu) && (cidl >= 1)) {
460 /* HACK: We should use callbacks from CDefaultContextMenu instead of creating one on our own */
461 BOOL bHasCpl = FALSE;
462 for (UINT i = 0; i < cidl; i++)
463 {
464 if(_ILIsCPanelStruct(apidl[i]))
465 {
466 bHasCpl = TRUE;
467 }
468 }
469
470 if (bHasCpl)
471 hr = ShellObjectCreatorInit<CCPLItemMenu>(cidl, apidl, riid, &pObj);
472 else
473 hr = m_regFolder->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, &pObj);
474 } else if (IsEqualIID(riid, IID_IDataObject) && (cidl >= 1)) {
475 hr = IDataObject_Constructor(hwndOwner, pidlRoot, apidl, cidl, TRUE, (IDataObject **)&pObj);
476 } else if ((IsEqualIID(riid, IID_IExtractIconA) || IsEqualIID(riid, IID_IExtractIconW)) && (cidl == 1)) {
477 if (_ILGetCPanelPointer(apidl[0]))
478 hr = CCPLExtractIcon_CreateInstance(this, apidl[0], riid, &pObj);
479 else
480 hr = m_regFolder->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, &pObj);
481 } else {
483 }
484
485 if (SUCCEEDED(hr) && !pObj)
487
488 *ppvOut = pObj;
489 }
490 TRACE("(%p)->hr=0x%08x\n", this, hr);
491 return hr;
492}
HRESULT CCPLExtractIcon_CreateInstance(IShellFolder *psf, LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppvOut)
HRESULT IDataObject_Constructor(HWND hwndOwner, PCIDLIST_ABSOLUTE pMyPidl, PCUIDLIST_RELATIVE_ARRAY apidl, UINT cidl, BOOL bExtendedObject, IDataObject **dataObject)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define SUCCEEDED(hr)
Definition: intsafe.h:50
unsigned int UINT
Definition: ndis.h:50
const GUID IID_IDataObject
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ Initialize()

HRESULT WINAPI CControlPanelFolder::Initialize ( PCIDLIST_ABSOLUTE  pidl)
override

Implements IPersistFolder.

Definition at line 631 of file CControlPanelFolder.cpp.

632{
633 if (pidlRoot)
635
636 pidlRoot = ILClone(pidl);
637
638 /* Create the inner reg folder */
639 REGFOLDERINITDATA RegInit = { static_cast<IShellFolder*>(this), &g_RegFolderInfo };
640 HRESULT hr;
641 hr = CRegFolder_CreateInstance(&RegInit,
642 pidlRoot,
645 return hr;
646
647 return S_OK;
648}
static const REGFOLDERINFO g_RegFolderInfo
HRESULT CRegFolder_CreateInstance(PREGFOLDERINITDATA pInit, LPCITEMIDLIST pidlRoot, REFIID riid, void **ppv)
Definition: CRegFolder.cpp:943
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121

◆ MapColumnToSCID()

HRESULT WINAPI CControlPanelFolder::MapColumnToSCID ( UINT  column,
SHCOLUMNID pscid 
)
override

Implements IShellFolder2.

Definition at line 606 of file CControlPanelFolder.cpp.

607{
608 FIXME("(%p)\n", this);
609 return E_NOTIMPL;
610}

◆ ParseDisplayName()

HRESULT WINAPI CControlPanelFolder::ParseDisplayName ( HWND  hwndOwner,
LPBC  pbc,
LPOLESTR  lpszDisplayName,
DWORD pchEaten,
PIDLIST_RELATIVE ppidl,
DWORD pdwAttributes 
)
override

Definition at line 278 of file CControlPanelFolder.cpp.

285{
286 /* We only support parsing guid names */
287 return m_regFolder->ParseDisplayName(hwndOwner, pbc, lpszDisplayName, pchEaten, ppidl, pdwAttributes);
288}

◆ SetNameOf()

HRESULT WINAPI CControlPanelFolder::SetNameOf ( HWND  hwndOwner,
PCUITEMID_CHILD  pidl,
LPCOLESTR  lpName,
DWORD  dwFlags,
PITEMID_CHILD pPidlOut 
)
override

Implements IShellFolder.

Definition at line 528 of file CControlPanelFolder.cpp.

530{
531 FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this, hwndOwner, pidl, debugstr_w(lpName), dwFlags, pPidlOut);
532 return E_FAIL;
533}
#define debugstr_w
Definition: kernel32.h:32
_In_ LPCSTR lpName
Definition: winbase.h:2813

Member Data Documentation

◆ dwAttributes

int CControlPanelFolder::dwAttributes
private

Definition at line 34 of file CControlPanelFolder.h.

◆ m_regFolder

CComPtr<IShellFolder2> CControlPanelFolder::m_regFolder
private

◆ pidlRoot

LPITEMIDLIST CControlPanelFolder::pidlRoot
private

The documentation for this class was generated from the following files: