ReactOS  0.4.15-dev-499-g1f31905
CMergedFolder Class Reference

#include <CMergedFolder.h>

Inheritance diagram for CMergedFolder:
Collaboration diagram for CMergedFolder:

Public Member Functions

 CMergedFolder ()
 
virtual ~CMergedFolder ()
 
HRESULT _SetSources (IShellFolder *userLocal, IShellFolder *allUSers)
 
virtual HRESULT STDMETHODCALLTYPE ParseDisplayName (HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName, ULONG *pchEaten, LPITEMIDLIST *ppidl, ULONG *pdwAttributes)
 
virtual HRESULT STDMETHODCALLTYPE EnumObjects (HWND hwndOwner, SHCONTF grfFlags, IEnumIDList **ppenumIDList)
 
virtual HRESULT STDMETHODCALLTYPE BindToObject (LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, void **ppvOut)
 
virtual HRESULT STDMETHODCALLTYPE BindToStorage (LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, void **ppvObj)
 
virtual HRESULT STDMETHODCALLTYPE CompareIDs (LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
 
virtual HRESULT STDMETHODCALLTYPE CreateViewObject (HWND hwndOwner, REFIID riid, void **ppvOut)
 
virtual HRESULT STDMETHODCALLTYPE GetAttributesOf (UINT cidl, PCUITEMID_CHILD_ARRAY apidl, SFGAOF *rgfInOut)
 
virtual HRESULT STDMETHODCALLTYPE GetUIObjectOf (HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, void **ppvOut)
 
virtual HRESULT STDMETHODCALLTYPE GetDisplayNameOf (LPCITEMIDLIST pidl, SHGDNF uFlags, STRRET *lpName)
 
virtual HRESULT STDMETHODCALLTYPE SetNameOf (HWND hwnd, LPCITEMIDLIST pidl, LPCOLESTR lpszName, SHGDNF uFlags, LPITEMIDLIST *ppidlOut)
 
virtual HRESULT STDMETHODCALLTYPE GetDefaultSearchGUID (GUID *lpguid)
 
virtual HRESULT STDMETHODCALLTYPE EnumSearches (IEnumExtraSearch **ppenum)
 
virtual HRESULT STDMETHODCALLTYPE GetDefaultColumn (DWORD dwReserved, ULONG *pSort, ULONG *pDisplay)
 
virtual HRESULT STDMETHODCALLTYPE GetDefaultColumnState (UINT iColumn, SHCOLSTATEF *pcsFlags)
 
virtual HRESULT STDMETHODCALLTYPE GetDetailsEx (LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv)
 
virtual HRESULT STDMETHODCALLTYPE GetDetailsOf (LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd)
 
virtual HRESULT STDMETHODCALLTYPE MapColumnToSCID (UINT iColumn, SHCOLUMNID *pscid)
 
virtual HRESULT STDMETHODCALLTYPE GetClassID (CLSID *lpClassId)
 
virtual HRESULT STDMETHODCALLTYPE Initialize (PCIDLIST_ABSOLUTE pidl)
 
virtual HRESULT STDMETHODCALLTYPE GetCurFolder (PIDLIST_ABSOLUTE *pidl)
 
STDMETHODIMP GetMaxLength (LPCWSTR pszName, int *piMaxNameLen)
 
STDMETHODIMP GetValidCharacters (LPWSTR *ppwszValidChars, LPWSTR *ppwszInvalidChars)
 
virtual HRESULT STDMETHODCALLTYPE AddNameSpace (LPGUID lpGuid, IShellFolder *psf, LPCITEMIDLIST pcidl, ULONG dwUnknown)
 
virtual HRESULT STDMETHODCALLTYPE GetNameSpaceID (LPCITEMIDLIST pcidl, LPGUID lpGuid)
 
virtual HRESULT STDMETHODCALLTYPE QueryNameSpace (ULONG dwUnknown, LPGUID lpGuid, IShellFolder **ppsf)
 
virtual HRESULT STDMETHODCALLTYPE EnumNameSpace (ULONG dwUnknown, PULONG lpUnknown)
 
virtual HRESULT STDMETHODCALLTYPE UnWrapIDList (LPCITEMIDLIST pcidl, LONG lUnknown, IShellFolder **ppsf, LPITEMIDLIST *ppidl1, LPITEMIDLIST *ppidl2, LONG *lpUnknown)
 
virtual HRESULT STDMETHODCALLTYPE QueryNameSpace2 (ULONG, QUERYNAMESPACEINFO *)
 
- 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 ()
 
- Public Member Functions inherited from IShellFolder2
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)
 
- 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 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 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 ()
 

Private Attributes

CComPtr< IShellFolderm_UserLocal
 
CComPtr< IShellFolderm_AllUsers
 
CComPtr< CEnumMergedFolderm_EnumSource
 
LPITEMIDLIST m_UserLocalPidl
 
LPITEMIDLIST m_AllUsersPidl
 
LPITEMIDLIST m_shellPidl
 

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
 
- 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
 
- Public Attributes inherited from IShellFolder
SFGAO_STORAGEANCESTOR typedef ULONG SFGAOF
 

Detailed Description

Definition at line 48 of file CMergedFolder.h.

Constructor & Destructor Documentation

◆ CMergedFolder()

CMergedFolder::CMergedFolder ( )

Definition at line 386 of file CMergedFolder.cpp.

386  :
387  m_UserLocal(NULL),
388  m_AllUsers(NULL),
393 {
394 }
CComPtr< IShellFolder > m_UserLocal
Definition: CMergedFolder.h:64
CComPtr< IShellFolder > m_AllUsers
Definition: CMergedFolder.h:65
LPITEMIDLIST m_shellPidl
Definition: CMergedFolder.h:70
smooth NULL
Definition: ftsmooth.c:416
LPITEMIDLIST m_UserLocalPidl
Definition: CMergedFolder.h:68
CComPtr< CEnumMergedFolder > m_EnumSource
Definition: CMergedFolder.h:66
LPITEMIDLIST m_AllUsersPidl
Definition: CMergedFolder.h:69

◆ ~CMergedFolder()

CMergedFolder::~CMergedFolder ( )
virtual

Definition at line 396 of file CMergedFolder.cpp.

397 {
400 }
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
LPITEMIDLIST m_UserLocalPidl
Definition: CMergedFolder.h:68
LPITEMIDLIST m_AllUsersPidl
Definition: CMergedFolder.h:69

Member Function Documentation

◆ _SetSources()

HRESULT CMergedFolder::_SetSources ( IShellFolder userLocal,
IShellFolder allUSers 
)

◆ AddNameSpace()

HRESULT STDMETHODCALLTYPE CMergedFolder::AddNameSpace ( LPGUID  lpGuid,
IShellFolder psf,
LPCITEMIDLIST  pcidl,
ULONG  dwUnknown 
)
virtual

Definition at line 403 of file CMergedFolder.cpp.

404 {
405  if (lpGuid)
406  {
407  TRACE("FIXME: No idea how to handle the GUID\n");
408  return E_NOTIMPL;
409  }
410 
411  TRACE("AddNameSpace %p %p\n", m_UserLocal.p, m_AllUsers.p);
412 
413  // FIXME: Use a DSA to store the list of merged namespaces, together with their related info (psf, pidl, ...)
414  // For now, assume only 2 will ever be used, and ignore all the other data.
415  if (!m_UserLocal)
416  {
417  m_UserLocal = psf;
418  m_UserLocalPidl = ILClone(pcidl);
419  return S_OK;
420  }
421 
422  if (m_AllUsers)
423  return E_FAIL;
424 
425  m_AllUsers = psf;
426  m_AllUsersPidl = ILClone(pcidl);
427 
428  m_EnumSource = new CComObject<CEnumMergedFolder>();
429  return m_EnumSource->SetSources(m_UserLocal, m_AllUsers);
430 }
CComPtr< IShellFolder > m_UserLocal
Definition: CMergedFolder.h:64
#define E_FAIL
Definition: ddrawi.h:102
CComPtr< IShellFolder > m_AllUsers
Definition: CMergedFolder.h:65
LPITEMIDLIST m_UserLocalPidl
Definition: CMergedFolder.h:68
#define TRACE(s)
Definition: solgame.cpp:4
CComPtr< CEnumMergedFolder > m_EnumSource
Definition: CMergedFolder.h:66
#define S_OK
Definition: intsafe.h:59
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
#define E_NOTIMPL
Definition: ddrawi.h:99
LPITEMIDLIST m_AllUsersPidl
Definition: CMergedFolder.h:69

◆ BindToObject()

HRESULT STDMETHODCALLTYPE CMergedFolder::BindToObject ( LPCITEMIDLIST  pidl,
LPBC  pbcReserved,
REFIID  riid,
void **  ppvOut 
)
virtual

Definition at line 508 of file CMergedFolder.cpp.

513 {
515  HRESULT hr;
516 
517  hr = m_EnumSource->FindPidlInList(NULL, pidl, &info);
518  if (FAILED_UNEXPECTEDLY(hr))
519  return hr;
520 
521  TRACE("BindToObject shared = %d\n", info.shared);
522 
523  if (!info.shared)
524  return info.parent->BindToObject(info.pidl, pbcReserved, riid, ppvOut);
525 
526  if (riid != IID_IShellFolder)
527  return E_FAIL;
528 
529  // Construct a child MergedFolder and return it
530  CComPtr<IShellFolder> fld1;
531  CComPtr<IShellFolder> fld2;
532 
533  // In shared folders, the user one takes precedence over the common one, so it will always be on pidl1
534  hr = m_UserLocal->BindToObject(info.pidl, pbcReserved, IID_PPV_ARG(IShellFolder, &fld1));
535  if (FAILED_UNEXPECTEDLY(hr))
536  return hr;
537 
538  hr = m_AllUsers->BindToObject(info.pidl2, pbcReserved, IID_PPV_ARG(IShellFolder, &fld2));
539  if (FAILED_UNEXPECTEDLY(hr))
540  return hr;
541 
542  CComPtr<IAugmentedShellFolder> pasf;
543  hr = CMergedFolder_CreateInstance(IID_PPV_ARG(IAugmentedShellFolder, &pasf));
544  if (FAILED_UNEXPECTEDLY(hr))
545  return hr;
546 
547  hr = pasf->QueryInterface(riid, ppvOut);
548  if (FAILED_UNEXPECTEDLY(hr))
549  return hr;
550 
551  hr = pasf->AddNameSpace(NULL, fld1, info.pidl, 0xFF00);
552  if (FAILED_UNEXPECTEDLY(hr))
553  return hr;
554 
555  hr = pasf->AddNameSpace(NULL, fld2, info.pidl2, 0x0000);
556  if (FAILED_UNEXPECTEDLY(hr))
557  return hr;
558 
559  return hr;
560 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
CComPtr< IShellFolder > m_UserLocal
Definition: CMergedFolder.h:64
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
struct _test_info info[]
Definition: SetCursorPos.c:19
CComPtr< IShellFolder > m_AllUsers
Definition: CMergedFolder.h:65
smooth NULL
Definition: ftsmooth.c:416
#define CMergedFolder_CreateInstance
Definition: shellmenu.h:93
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
CComPtr< CEnumMergedFolder > m_EnumSource
Definition: CMergedFolder.h:66

◆ BindToStorage()

HRESULT STDMETHODCALLTYPE CMergedFolder::BindToStorage ( LPCITEMIDLIST  pidl,
LPBC  pbcReserved,
REFIID  riid,
void **  ppvObj 
)
virtual

Definition at line 562 of file CMergedFolder.cpp.

567 {
569  return E_NOTIMPL;
570 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ CompareIDs()

HRESULT STDMETHODCALLTYPE CMergedFolder::CompareIDs ( LPARAM  lParam,
LPCITEMIDLIST  pidl1,
LPCITEMIDLIST  pidl2 
)
virtual

Definition at line 572 of file CMergedFolder.cpp.

576 {
577  TRACE("CompareIDs\n");
578  return m_UserLocal->CompareIDs(lParam, pidl1, pidl2);
579 }
CComPtr< IShellFolder > m_UserLocal
Definition: CMergedFolder.h:64
#define TRACE(s)
Definition: solgame.cpp:4
LPARAM lParam
Definition: combotst.c:139

◆ CreateViewObject()

HRESULT STDMETHODCALLTYPE CMergedFolder::CreateViewObject ( HWND  hwndOwner,
REFIID  riid,
void **  ppvOut 
)
virtual

Implements IShellFolder.

Definition at line 581 of file CMergedFolder.cpp.

585 {
587  return E_NOTIMPL;
588 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ EnumNameSpace()

HRESULT STDMETHODCALLTYPE CMergedFolder::EnumNameSpace ( ULONG  dwUnknown,
PULONG  lpUnknown 
)
virtual

Definition at line 444 of file CMergedFolder.cpp.

445 {
447  return E_NOTIMPL;
448 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ EnumObjects()

HRESULT STDMETHODCALLTYPE CMergedFolder::EnumObjects ( HWND  hwndOwner,
SHCONTF  grfFlags,
IEnumIDList **  ppenumIDList 
)
virtual

Implements IShellFolder.

Definition at line 496 of file CMergedFolder.cpp.

500 {
501  TRACE("EnumObjects\n");
502  HRESULT hr = m_EnumSource->QueryInterface(IID_PPV_ARG(IEnumIDList, ppenumIDList));
503  if (FAILED_UNEXPECTEDLY(hr))
504  return hr;
505  return m_EnumSource->Begin(hwndOwner, grfFlags);
506 }
HRESULT hr
Definition: shlfolder.c:183
#define IID_PPV_ARG(Itype, ppType)
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
CComPtr< CEnumMergedFolder > m_EnumSource
Definition: CMergedFolder.h:66

◆ EnumSearches()

HRESULT STDMETHODCALLTYPE CMergedFolder::EnumSearches ( IEnumExtraSearch **  ppenum)
virtual

Implements IShellFolder2.

Definition at line 722 of file CMergedFolder.cpp.

724 {
726  return E_NOTIMPL;
727 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ GetAttributesOf()

HRESULT STDMETHODCALLTYPE CMergedFolder::GetAttributesOf ( UINT  cidl,
PCUITEMID_CHILD_ARRAY  apidl,
SFGAOF rgfInOut 
)
virtual

Implements IShellFolder.

Definition at line 590 of file CMergedFolder.cpp.

594 {
596  HRESULT hr;
597 
598  TRACE("GetAttributesOf\n");
599 
600  for (int i = 0; i < (int)cidl; i++)
601  {
602  LPCITEMIDLIST pidl = apidl[i];
603 
604  hr = m_EnumSource->FindPidlInList(NULL, pidl, &info);
605  if (FAILED_UNEXPECTEDLY(hr))
606  return hr;
607 
608  pidl = info.pidl;
609 
610  SFGAOF * pinOut1 = rgfInOut ? rgfInOut + i : NULL;
611 
612  hr = info.parent->GetAttributesOf(1, &pidl, pinOut1);
613 
614  if (FAILED_UNEXPECTEDLY(hr))
615  return hr;
616  }
617 
618  return S_OK;
619 }
HRESULT hr
Definition: shlfolder.c:183
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
struct _test_info info[]
Definition: SetCursorPos.c:19
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
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
CComPtr< CEnumMergedFolder > m_EnumSource
Definition: CMergedFolder.h:66
SFGAO_STORAGEANCESTOR typedef ULONG SFGAOF
Definition: shobjidl.idl:218
#define S_OK
Definition: intsafe.h:59
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CMergedFolder::GetClassID ( CLSID lpClassId)
virtual

Implements IPersist.

Definition at line 693 of file CMergedFolder.cpp.

694 {
696  return E_NOTIMPL;
697 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ GetCurFolder()

HRESULT STDMETHODCALLTYPE CMergedFolder::GetCurFolder ( PIDLIST_ABSOLUTE pidl)
virtual

Implements IPersistFolder2.

Definition at line 707 of file CMergedFolder.cpp.

708 {
709  if (pidl)
710  *pidl = m_shellPidl;
711  return S_OK;
712 }
LPITEMIDLIST m_shellPidl
Definition: CMergedFolder.h:70
#define S_OK
Definition: intsafe.h:59

◆ GetDefaultColumn()

HRESULT STDMETHODCALLTYPE CMergedFolder::GetDefaultColumn ( DWORD  dwReserved,
ULONG pSort,
ULONG pDisplay 
)
virtual

Implements IShellFolder2.

Definition at line 729 of file CMergedFolder.cpp.

733 {
735  return E_NOTIMPL;
736 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ GetDefaultColumnState()

HRESULT STDMETHODCALLTYPE CMergedFolder::GetDefaultColumnState ( UINT  iColumn,
SHCOLSTATEF pcsFlags 
)
virtual

Implements IShellFolder2.

Definition at line 738 of file CMergedFolder.cpp.

741 {
743  return E_NOTIMPL;
744 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ GetDefaultSearchGUID()

HRESULT STDMETHODCALLTYPE CMergedFolder::GetDefaultSearchGUID ( GUID lpguid)
virtual

Implements IShellFolder2.

Definition at line 715 of file CMergedFolder.cpp.

717 {
719  return E_NOTIMPL;
720 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ GetDetailsEx()

HRESULT STDMETHODCALLTYPE CMergedFolder::GetDetailsEx ( LPCITEMIDLIST  pidl,
const SHCOLUMNID pscid,
VARIANT pv 
)
virtual

Definition at line 746 of file CMergedFolder.cpp.

750 {
752  HRESULT hr;
753 
754  TRACE("GetDetailsEx\n");
755 
756  hr = m_EnumSource->FindPidlInList(NULL, pidl, &info);
757  if (FAILED_UNEXPECTEDLY(hr))
758  return hr;
759 
760  CComPtr<IShellFolder2> parent2;
761  hr = info.parent->QueryInterface(IID_PPV_ARG(IShellFolder2, &parent2));
762  if (FAILED_UNEXPECTEDLY(hr))
763  return hr;
764 
765  hr = parent2->GetDetailsEx(info.pidl, pscid, pv);
766  if (FAILED_UNEXPECTEDLY(hr))
767  return hr;
768  return S_OK;
769 }
HRESULT hr
Definition: shlfolder.c:183
#define IID_PPV_ARG(Itype, ppType)
struct _test_info info[]
Definition: SetCursorPos.c:19
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
CComPtr< CEnumMergedFolder > m_EnumSource
Definition: CMergedFolder.h:66
#define S_OK
Definition: intsafe.h:59

◆ GetDetailsOf()

HRESULT STDMETHODCALLTYPE CMergedFolder::GetDetailsOf ( LPCITEMIDLIST  pidl,
UINT  iColumn,
SHELLDETAILS psd 
)
virtual

Definition at line 771 of file CMergedFolder.cpp.

775 {
777  HRESULT hr;
778 
779  TRACE("GetDetailsOf\n");
780 
781  hr = m_EnumSource->FindPidlInList(NULL, pidl, &info);
782  if (FAILED_UNEXPECTEDLY(hr))
783  return hr;
784 
785  CComPtr<IShellFolder2> parent2;
786  hr = info.parent->QueryInterface(IID_PPV_ARG(IShellFolder2, &parent2));
787  if (FAILED_UNEXPECTEDLY(hr))
788  return hr;
789 
790  hr = parent2->GetDetailsOf(info.pidl, iColumn, psd);
791 
792  if (FAILED_UNEXPECTEDLY(hr))
793  return hr;
794  return S_OK;
795 }
HRESULT hr
Definition: shlfolder.c:183
#define IID_PPV_ARG(Itype, ppType)
struct _test_info info[]
Definition: SetCursorPos.c:19
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
CComPtr< CEnumMergedFolder > m_EnumSource
Definition: CMergedFolder.h:66
#define S_OK
Definition: intsafe.h:59

◆ GetDisplayNameOf()

HRESULT STDMETHODCALLTYPE CMergedFolder::GetDisplayNameOf ( LPCITEMIDLIST  pidl,
SHGDNF  uFlags,
STRRET lpName 
)
virtual

Definition at line 660 of file CMergedFolder.cpp.

664 {
666  HRESULT hr;
667 
668  TRACE("GetDisplayNameOf\n");
669 
670  hr = m_EnumSource->FindPidlInList(NULL, pidl, &info);
671  if (FAILED_UNEXPECTEDLY(hr))
672  return hr;
673 
674  hr = info.parent->GetDisplayNameOf(info.pidl, uFlags, lpName);
675 
676  if (FAILED_UNEXPECTEDLY(hr))
677  return hr;
678  return S_OK;
679 }
HRESULT hr
Definition: shlfolder.c:183
_In_ LPCSTR lpName
Definition: winbase.h:2752
UINT uFlags
Definition: api.c:59
struct _test_info info[]
Definition: SetCursorPos.c:19
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
CComPtr< CEnumMergedFolder > m_EnumSource
Definition: CMergedFolder.h:66
#define S_OK
Definition: intsafe.h:59

◆ GetMaxLength()

STDMETHODIMP CMergedFolder::GetMaxLength ( LPCWSTR  pszName,
int piMaxNameLen 
)
inline

Definition at line 204 of file CMergedFolder.h.

205  {
206  return E_NOTIMPL;
207  }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetNameSpaceID()

HRESULT STDMETHODCALLTYPE CMergedFolder::GetNameSpaceID ( LPCITEMIDLIST  pcidl,
LPGUID  lpGuid 
)
virtual

Definition at line 432 of file CMergedFolder.cpp.

433 {
435  return E_NOTIMPL;
436 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ GetUIObjectOf()

HRESULT STDMETHODCALLTYPE CMergedFolder::GetUIObjectOf ( HWND  hwndOwner,
UINT  cidl,
PCUITEMID_CHILD_ARRAY  apidl,
REFIID  riid,
UINT prgfInOut,
void **  ppvOut 
)
virtual

Implements IShellFolder.

Definition at line 621 of file CMergedFolder.cpp.

628 {
630  HRESULT hr;
631 
632  TRACE("GetUIObjectOf\n");
633 
634  for (int i = 0; i < (int)cidl; i++)
635  {
636  LPCITEMIDLIST pidl = apidl[i];
637 
638  TRACE("Processing GetUIObjectOf item %d of %u...\n", i, cidl);
639 
640  hr = m_EnumSource->FindPidlInList(hwndOwner, pidl, &info);
641  if (FAILED_UNEXPECTEDLY(hr))
642  return hr;
643 
644  pidl = info.pidl;
645 
646  TRACE("FindPidlInList succeeded with parent %p and pidl { db=%d }\n", info.parent, info.pidl->mkid.cb);
647 
648  UINT * pinOut1 = prgfInOut ? prgfInOut+i : NULL;
649  void** ppvOut1 = ppvOut ? ppvOut + i : NULL;
650 
651  hr = info.parent->GetUIObjectOf(hwndOwner, 1, &pidl, riid, pinOut1, ppvOut1);
652 
653  if (FAILED_UNEXPECTEDLY(hr))
654  return hr;
655  }
656 
657  return S_OK;
658 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
struct _test_info info[]
Definition: SetCursorPos.c:19
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
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
CComPtr< CEnumMergedFolder > m_EnumSource
Definition: CMergedFolder.h:66
#define S_OK
Definition: intsafe.h:59
unsigned int UINT
Definition: ndis.h:50
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

◆ GetValidCharacters()

STDMETHODIMP CMergedFolder::GetValidCharacters ( LPWSTR ppwszValidChars,
LPWSTR ppwszInvalidChars 
)
inline

Definition at line 210 of file CMergedFolder.h.

211  {
212  if (ppwszValidChars)
213  {
214  *ppwszValidChars = NULL;
215  }
216  if (ppwszInvalidChars)
217  {
218  SHStrDupW(INVALID_FILETITLE_CHARACTERSW, ppwszInvalidChars);
219  }
220  return S_OK;
221  }
HRESULT WINAPI SHStrDupW(LPCWSTR src, LPWSTR *dest)
Definition: string.c:2004
#define INVALID_FILETITLE_CHARACTERSW
Definition: undocshell.h:710
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59

◆ Initialize()

HRESULT STDMETHODCALLTYPE CMergedFolder::Initialize ( PCIDLIST_ABSOLUTE  pidl)
virtual

Implements IPersistFolder.

Definition at line 700 of file CMergedFolder.cpp.

701 {
702  m_shellPidl = ILClone(pidl);
703  return S_OK;
704 }
LPITEMIDLIST m_shellPidl
Definition: CMergedFolder.h:70
#define S_OK
Definition: intsafe.h:59
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228

◆ MapColumnToSCID()

HRESULT STDMETHODCALLTYPE CMergedFolder::MapColumnToSCID ( UINT  iColumn,
SHCOLUMNID pscid 
)
virtual

Implements IShellFolder2.

Definition at line 797 of file CMergedFolder.cpp.

800 {
802  return E_NOTIMPL;
803 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ParseDisplayName()

HRESULT STDMETHODCALLTYPE CMergedFolder::ParseDisplayName ( HWND  hwndOwner,
LPBC  pbcReserved,
LPOLESTR  lpszDisplayName,
ULONG pchEaten,
LPITEMIDLIST ppidl,
ULONG pdwAttributes 
)
virtual

Definition at line 457 of file CMergedFolder.cpp.

464 {
465  HRESULT hr;
467 
468  if (!ppidl)
469  return E_FAIL;
470 
471  if (pchEaten)
472  *pchEaten = 0;
473 
474  if (pdwAttributes)
475  *pdwAttributes = 0;
476 
477  TRACE("ParseDisplayName name=%S\n", lpszDisplayName);
478 
479  hr = m_EnumSource->FindByName(hwndOwner, lpszDisplayName, &info);
480  if (FAILED(hr))
481  {
483  }
484 
485  *ppidl = ILClone(info.pidl);
486 
487  if (pchEaten)
488  *pchEaten = lstrlenW(info.parseName);
489 
490  if (pdwAttributes)
491  *pdwAttributes = info.parent->GetAttributesOf(1, (LPCITEMIDLIST*)ppidl, pdwAttributes);
492 
493  return S_OK;
494 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
HRESULT hr
Definition: shlfolder.c:183
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define lstrlenW
Definition: compat.h:416
#define E_FAIL
Definition: ddrawi.h:102
struct _test_info info[]
Definition: SetCursorPos.c:19
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
CComPtr< CEnumMergedFolder > m_EnumSource
Definition: CMergedFolder.h:66
#define S_OK
Definition: intsafe.h:59
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228

◆ QueryNameSpace()

HRESULT STDMETHODCALLTYPE CMergedFolder::QueryNameSpace ( ULONG  dwUnknown,
LPGUID  lpGuid,
IShellFolder **  ppsf 
)
virtual

Definition at line 438 of file CMergedFolder.cpp.

439 {
441  return E_NOTIMPL;
442 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ QueryNameSpace2()

HRESULT STDMETHODCALLTYPE CMergedFolder::QueryNameSpace2 ( ULONG  ,
QUERYNAMESPACEINFO  
)
virtual

Definition at line 806 of file CMergedFolder.cpp.

807 {
809  return E_NOTIMPL;
810 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ SetNameOf()

HRESULT STDMETHODCALLTYPE CMergedFolder::SetNameOf ( HWND  hwnd,
LPCITEMIDLIST  pidl,
LPCOLESTR  lpszName,
SHGDNF  uFlags,
LPITEMIDLIST ppidlOut 
)
virtual

Definition at line 681 of file CMergedFolder.cpp.

687 {
689  return E_NOTIMPL;
690 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ UnWrapIDList()

HRESULT STDMETHODCALLTYPE CMergedFolder::UnWrapIDList ( LPCITEMIDLIST  pcidl,
LONG  lUnknown,
IShellFolder **  ppsf,
LPITEMIDLIST ppidl1,
LPITEMIDLIST ppidl2,
LONG lpUnknown 
)
virtual

Definition at line 450 of file CMergedFolder.cpp.

451 {
453  return E_NOTIMPL;
454 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

Member Data Documentation

◆ m_AllUsers

CComPtr<IShellFolder> CMergedFolder::m_AllUsers
private

Definition at line 65 of file CMergedFolder.h.

Referenced by AddNameSpace(), and BindToObject().

◆ m_AllUsersPidl

LPITEMIDLIST CMergedFolder::m_AllUsersPidl
private

Definition at line 69 of file CMergedFolder.h.

Referenced by AddNameSpace(), and ~CMergedFolder().

◆ m_EnumSource

◆ m_shellPidl

LPITEMIDLIST CMergedFolder::m_shellPidl
private

Definition at line 70 of file CMergedFolder.h.

Referenced by GetCurFolder(), and Initialize().

◆ m_UserLocal

CComPtr<IShellFolder> CMergedFolder::m_UserLocal
private

Definition at line 64 of file CMergedFolder.h.

Referenced by AddNameSpace(), BindToObject(), and CompareIDs().

◆ m_UserLocalPidl

LPITEMIDLIST CMergedFolder::m_UserLocalPidl
private

Definition at line 68 of file CMergedFolder.h.

Referenced by AddNameSpace(), and ~CMergedFolder().


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