ReactOS 0.4.15-dev-7704-gc07eb9f
CControlPanelFolder Class Reference

#include <CControlPanelFolder.h>

Inheritance diagram for CControlPanelFolder:
Collaboration diagram for CControlPanelFolder:

Public Member Functions

 CControlPanelFolder ()
 
 ~CControlPanelFolder ()
 
virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
 
virtual HRESULT WINAPI EnumObjects (HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
 
virtual HRESULT WINAPI BindToObject (PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
 
virtual HRESULT WINAPI BindToStorage (PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
 
virtual HRESULT WINAPI CompareIDs (LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
 
virtual HRESULT WINAPI CreateViewObject (HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
 
virtual HRESULT WINAPI GetAttributesOf (UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
 
virtual HRESULT WINAPI GetUIObjectOf (HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut)
 
virtual HRESULT WINAPI GetDisplayNameOf (PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
 
virtual HRESULT WINAPI SetNameOf (HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
 
virtual HRESULT WINAPI GetDefaultSearchGUID (GUID *pguid)
 
virtual HRESULT WINAPI EnumSearches (IEnumExtraSearch **ppenum)
 
virtual HRESULT WINAPI GetDefaultColumn (DWORD dwRes, ULONG *pSort, ULONG *pDisplay)
 
virtual HRESULT WINAPI GetDefaultColumnState (UINT iColumn, DWORD *pcsFlags)
 
virtual HRESULT WINAPI GetDetailsEx (PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
 
virtual HRESULT WINAPI GetDetailsOf (PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
 
virtual HRESULT WINAPI MapColumnToSCID (UINT column, SHCOLUMNID *pscid)
 
virtual HRESULT WINAPI GetClassID (CLSID *lpClassId)
 
virtual HRESULT WINAPI Initialize (PCIDLIST_ABSOLUTE pidl)
 
virtual HRESULT WINAPI GetCurFolder (PIDLIST_ABSOLUTE *pidl)
 
- 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 255 of file CControlPanelFolder.cpp.

256{
257 pidlRoot = NULL; /* absolute pidl */
258}
#define NULL
Definition: types.h:112

◆ ~CControlPanelFolder()

CControlPanelFolder::~CControlPanelFolder ( )

Definition at line 260 of file CControlPanelFolder.cpp.

261{
262 TRACE("-- destroying IShellFolder(%p)\n", this);
264}
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 
)
virtual

Definition at line 295 of file CControlPanelFolder.cpp.

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

◆ BindToStorage()

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

Definition at line 307 of file CControlPanelFolder.cpp.

312{
313 FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", this, pidl, pbcReserved, shdebugstr_guid(&riid), ppvOut);
314
315 *ppvOut = NULL;
316 return E_NOTIMPL;
317}
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99
const char * shdebugstr_guid(const struct _GUID *id)
Definition: debughlp.cpp:428

◆ CompareIDs()

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

Implements IShellFolder.

Definition at line 322 of file CControlPanelFolder.cpp.

323{
324 /* Dont use SHELL32_CompareGuidItems because it would cause guid items to come first */
325 if (_ILIsSpecialFolder(pidl1) || _ILIsSpecialFolder(pidl2))
326 {
327 return SHELL32_CompareDetails(this, lParam, pidl1, pidl2);
328 }
329 PIDLCPanelStruct *pData1 = _ILGetCPanelPointer(pidl1);
330 PIDLCPanelStruct *pData2 = _ILGetCPanelPointer(pidl2);
331
332 if (!pData1 || !pData2 || LOWORD(lParam) >= CONTROLPANEL_COL_COUNT)
333 return E_INVALIDARG;
334
335 int result;
336 switch(LOWORD(lParam))
337 {
339 result = wcsicmp(pData1->szName + pData1->offsDispName, pData2->szName + pData2->offsDispName);
340 break;
342 result = wcsicmp(pData1->szName + pData1->offsComment, pData2->szName + pData2->offsComment);
343 break;
344 default:
345 ERR("Got wrong lParam!\n");
346 return E_INVALIDARG;
347 }
348
350}
@ CONTROLPANEL_COL_NAME
@ CONTROLPANEL_COL_COMMENT
@ CONTROLPANEL_COL_COUNT
static PIDLCPanelStruct * _ILGetCPanelPointer(LPCITEMIDLIST pidl)
#define ERR(fmt,...)
Definition: debug.h:110
LPARAM lParam
Definition: combotst.c:139
#define E_INVALIDARG
Definition: ddrawi.h:101
#define wcsicmp
Definition: compat.h:15
static BOOL _ILIsSpecialFolder(LPCITEMIDLIST pidl)
GLuint64EXT * result
Definition: glext.h:11304
#define LOWORD(l)
Definition: pedump.c:82
#define MAKE_COMPARE_HRESULT(x)
Definition: shellutils.h:573
HRESULT SHELL32_CompareDetails(IShellFolder2 *isf, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: shlfolder.cpp:238
WORD offsComment
Definition: pidl.h:115
WCHAR szName[1]
Definition: pidl.h:116
WORD offsDispName
Definition: pidl.h:114

◆ CreateViewObject()

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

Definition at line 355 of file CControlPanelFolder.cpp.

356{
357 CComPtr<IShellView> pShellView;
359
360 TRACE("(%p)->(hwnd=%p,%s,%p)\n", this, hwndOwner, shdebugstr_guid(&riid), ppvOut);
361
362 if (ppvOut) {
363 *ppvOut = NULL;
364
365 if (IsEqualIID(riid, IID_IDropTarget)) {
366 WARN("IDropTarget not implemented\n");
367 hr = E_NOTIMPL;
368 } else if (IsEqualIID(riid, IID_IContextMenu)) {
369 WARN("IContextMenu not implemented\n");
370 hr = E_NOTIMPL;
371 } else if (IsEqualIID(riid, IID_IShellView)) {
372 SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
373 hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
374 }
375 }
376 TRACE("--(%p)->(interface=%p)\n", this, ppvOut);
377 return hr;
378}
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
Definition: CDefView.cpp:3844
#define WARN(fmt,...)
Definition: debug.h:112
#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 
)
virtual

Definition at line 284 of file CControlPanelFolder.cpp.

285{
286 CComPtr<IEnumIDList> pRegEnumerator;
287 m_regFolder->EnumObjects(hwndOwner, dwFlags, &pRegEnumerator);
288
289 return ShellObjectCreatorInit<CControlPanelEnum>(dwFlags, pRegEnumerator, IID_PPV_ARG(IEnumIDList, ppEnumIDList));
290}
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
#define IID_PPV_ARG(Itype, ppType)

◆ EnumSearches()

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

Implements IShellFolder2.

Definition at line 532 of file CControlPanelFolder.cpp.

533{
534 FIXME("(%p)\n", this);
535 return E_NOTIMPL;
536}

◆ ExecuteFromIdList()

HRESULT WINAPI CControlPanelFolder::ExecuteFromIdList ( LPCITEMIDLIST  pidl)
private

◆ GetAttributesOf()

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

Definition at line 383 of file CControlPanelFolder.cpp.

384{
385 HRESULT hr = S_OK;
386 static const DWORD dwControlPanelAttributes =
387 SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_CANLINK;
388
389 TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n",
390 this, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0);
391
392 if (!rgfInOut)
393 return E_INVALIDARG;
394 if (cidl && !apidl)
395 return E_INVALIDARG;
396
397 if (*rgfInOut == 0)
398 *rgfInOut = ~0;
399
400 if (!cidl)
401 {
402 *rgfInOut &= dwControlPanelAttributes;
403 }
404 else
405 {
406 while(cidl > 0 && *apidl)
407 {
408 pdump(*apidl);
409 if (_ILIsCPanelStruct(*apidl))
410 *rgfInOut &= SFGAO_CANLINK;
411 else if (_ILIsSpecialFolder(*apidl))
412 m_regFolder->GetAttributesOf(1, apidl, rgfInOut);
413 else
414 ERR("Got unknown pidl\n");
415 apidl++;
416 cidl--;
417 }
418 }
419 /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
420 *rgfInOut &= ~SFGAO_VALIDATE;
421
422 TRACE("-- result=0x%08x\n", *rgfInOut);
423 return hr;
424}
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:2009

◆ GetClassID()

HRESULT WINAPI CControlPanelFolder::GetClassID ( CLSID lpClassId)
virtual

Implements IPersist.

Definition at line 606 of file CControlPanelFolder.cpp.

607{
608 TRACE("(%p)\n", this);
609
610 if (!lpClassId)
611 return E_POINTER;
612 *lpClassId = CLSID_ControlPanel;
613
614 return S_OK;
615}
#define E_POINTER
Definition: winerror.h:2365

◆ GetCurFolder()

HRESULT WINAPI CControlPanelFolder::GetCurFolder ( PIDLIST_ABSOLUTE pidl)
virtual

Implements IPersistFolder2.

Definition at line 645 of file CControlPanelFolder.cpp.

646{
647 TRACE("(%p)->(%p)\n", this, pidl);
648
649 if (!pidl)
650 return E_POINTER;
651 *pidl = ILClone(pidlRoot);
652 return S_OK;
653}
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228

◆ GetDefaultColumn()

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

Implements IShellFolder2.

Definition at line 538 of file CControlPanelFolder.cpp.

539{
540 TRACE("(%p)\n", this);
541
542 if (pSort) *pSort = 0;
543 if (pDisplay) *pDisplay = 0;
544 return S_OK;
545}

◆ GetDefaultColumnState()

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

Implements IShellFolder2.

Definition at line 547 of file CControlPanelFolder.cpp.

548{
549 TRACE("(%p)\n", this);
550
551 if (!pcsFlags || iColumn >= CONTROLPANEL_COL_COUNT)
552 return E_INVALIDARG;
553 *pcsFlags = ControlPanelSFHeader[iColumn].pcsFlags;
554 return S_OK;
555}
static const shvheader ControlPanelSFHeader[]

◆ GetDefaultSearchGUID()

HRESULT WINAPI CControlPanelFolder::GetDefaultSearchGUID ( GUID pguid)
virtual

Implements IShellFolder2.

Definition at line 526 of file CControlPanelFolder.cpp.

527{
528 FIXME("(%p)\n", this);
529 return E_NOTIMPL;
530}

◆ GetDetailsEx()

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

Implements IShellFolder2.

Definition at line 557 of file CControlPanelFolder.cpp.

558{
559 FIXME("(%p)\n", this);
560 return E_NOTIMPL;
561}

◆ GetDetailsOf()

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

Implements IShellFolder2.

Definition at line 563 of file CControlPanelFolder.cpp.

564{
565 if (!psd || iColumn >= CONTROLPANEL_COL_COUNT)
566 return E_INVALIDARG;
567
568 if (!pidl)
569 {
570 psd->fmt = ControlPanelSFHeader[iColumn].fmt;
571 psd->cxChar = ControlPanelSFHeader[iColumn].cxChar;
572 return SHSetStrRet(&psd->str, shell32_hInstance, ControlPanelSFHeader[iColumn].colnameid);
573 }
574 else if (_ILIsSpecialFolder(pidl))
575 {
576 return m_regFolder->GetDetailsOf(pidl, iColumn, psd);
577 }
578 else
579 {
580 PIDLCPanelStruct *pCPanel = _ILGetCPanelPointer(pidl);
581
582 if (!pCPanel)
583 return E_FAIL;
584
585 switch(iColumn)
586 {
588 return SHSetStrRet(&psd->str, pCPanel->szName + pCPanel->offsDispName);
590 return SHSetStrRet(&psd->str, pCPanel->szName + pCPanel->offsComment);
591 }
592 }
593
594 return E_FAIL;
595}
#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 
)
virtual

Definition at line 488 of file CControlPanelFolder.cpp.

489{
490 if (!pidl)
491 return S_FALSE;
492
493 PIDLCPanelStruct *pCPanel = _ILGetCPanelPointer(pidl);
494
495 if (pCPanel)
496 {
497 return SHSetStrRet(strRet, pCPanel->szName + pCPanel->offsDispName);
498 }
499 else if (_ILIsSpecialFolder(pidl))
500 {
501 return m_regFolder->GetDisplayNameOf(pidl, dwFlags, strRet);
502 }
503
504 return E_FAIL;
505}
#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 
)
virtual

Definition at line 438 of file CControlPanelFolder.cpp.

440{
441 LPVOID pObj = NULL;
443
444 TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n",
445 this, hwndOwner, cidl, apidl, shdebugstr_guid(&riid), prgfInOut, ppvOut);
446
447 if (ppvOut) {
448 *ppvOut = NULL;
449
450 if (IsEqualIID(riid, IID_IContextMenu) && (cidl >= 1)) {
451 /* HACK: We should use callbacks from CDefaultContextMenu instead of creating one on our own */
452 BOOL bHasCpl = FALSE;
453 for (UINT i = 0; i < cidl; i++)
454 {
455 if(_ILIsCPanelStruct(apidl[i]))
456 {
457 bHasCpl = TRUE;
458 }
459 }
460
461 if (bHasCpl)
462 hr = ShellObjectCreatorInit<CCPLItemMenu>(cidl, apidl, riid, &pObj);
463 else
464 hr = m_regFolder->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, &pObj);
465 } else if (IsEqualIID(riid, IID_IDataObject) && (cidl >= 1)) {
466 hr = IDataObject_Constructor(hwndOwner, pidlRoot, apidl, cidl, TRUE, (IDataObject **)&pObj);
467 } else if ((IsEqualIID(riid, IID_IExtractIconA) || IsEqualIID(riid, IID_IExtractIconW)) && (cidl == 1)) {
468 if (_ILGetCPanelPointer(apidl[0]))
469 hr = CCPLExtractIcon_CreateInstance(this, apidl[0], riid, &pObj);
470 else
471 hr = m_regFolder->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, &pObj);
472 } else {
474 }
475
476 if (SUCCEEDED(hr) && !pObj)
478
479 *ppvOut = pObj;
480 }
481 TRACE("(%p)->hr=0x%08x\n", this, hr);
482 return hr;
483}
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)
virtual

Implements IPersistFolder.

Definition at line 622 of file CControlPanelFolder.cpp.

623{
624 if (pidlRoot)
626
627 pidlRoot = ILClone(pidl);
628
629 /* Create the inner reg folder */
630 HRESULT hr;
631 hr = CRegFolder_CreateInstance(&CLSID_ControlPanel,
632 pidlRoot,
633 L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}",
634 L"ControlPanel",
637 return hr;
638
639 return S_OK;
640}
HRESULT CRegFolder_CreateInstance(const GUID *pGuid, LPCITEMIDLIST pidlRoot, LPCWSTR lpszPath, LPCWSTR lpszEnumKeyName, REFIID riid, void **ppv)
Definition: CRegFolder.cpp:833
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
#define L(x)
Definition: ntvdm.h:50

◆ MapColumnToSCID()

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

Implements IShellFolder2.

Definition at line 597 of file CControlPanelFolder.cpp.

598{
599 FIXME("(%p)\n", this);
600 return E_NOTIMPL;
601}

◆ ParseDisplayName()

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

Definition at line 269 of file CControlPanelFolder.cpp.

276{
277 /* We only support parsing guid names */
278 return m_regFolder->ParseDisplayName(hwndOwner, pbc, lpszDisplayName, pchEaten, ppidl, pdwAttributes);
279}

◆ SetNameOf()

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

Implements IShellFolder.

Definition at line 519 of file CControlPanelFolder.cpp.

521{
522 FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this, hwndOwner, pidl, debugstr_w(lpName), dwFlags, pPidlOut);
523 return E_FAIL;
524}
#define debugstr_w
Definition: kernel32.h:32
_In_ LPCSTR lpName
Definition: winbase.h:2789

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: