ReactOS 0.4.15-dev-7660-g0086d05
CNetFolder Class Reference

#include <CNetFolder.h>

Inheritance diagram for CNetFolder:
Collaboration diagram for CNetFolder:

Public Member Functions

 CNetFolder ()
 
 ~CNetFolder ()
 
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 Attributes

LPITEMIDLIST pidlRoot
 

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 27 of file CNetFolder.h.

Constructor & Destructor Documentation

◆ CNetFolder()

CNetFolder::CNetFolder ( )

Definition at line 219 of file CNetFolder.cpp.

220{
221 pidlRoot = NULL;
222}
LPITEMIDLIST pidlRoot
Definition: CNetFolder.h:35
#define NULL
Definition: types.h:112

◆ ~CNetFolder()

CNetFolder::~CNetFolder ( )

Definition at line 224 of file CNetFolder.cpp.

225{
226 if (pidlRoot)
228}
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:326

Member Function Documentation

◆ BindToObject()

HRESULT WINAPI CNetFolder::BindToObject ( PCUIDLIST_RELATIVE  pidl,
LPBC  pbcReserved,
REFIID  riid,
LPVOID ppvOut 
)
virtual

Definition at line 283 of file CNetFolder.cpp.

284{
285#ifdef HACKY_UNC_PATHS
286 /* Create the target folder info */
287 PERSIST_FOLDER_TARGET_INFO pfti = {0};
288 pfti.dwAttributes = -1;
289 pfti.csidl = -1;
290 StringCchCopyW(pfti.szTargetParsingName, MAX_PATH, (WCHAR*)pidl->mkid.abID);
291
292 return SHELL32_BindToSF(pidlRoot, &pfti, pidl, &CLSID_ShellFSFolder, riid, ppvOut);
293#else
294 return E_NOTIMPL;
295#endif
296}
#define E_NOTIMPL
Definition: ddrawi.h:99
#define MAX_PATH
Definition: compat.h:34
REFIID riid
Definition: atlbase.h:39
HRESULT SHELL32_BindToSF(LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO *ppfti, LPCITEMIDLIST pidl, const GUID *clsid, REFIID riid, LPVOID *ppvOut)
Definition: shlfolder.cpp:159
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ BindToStorage()

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

Definition at line 301 of file CNetFolder.cpp.

302{
303 FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", this,
304 pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut);
305
306 *ppvOut = NULL;
307 return E_NOTIMPL;
308}
#define FIXME(fmt,...)
Definition: debug.h:111
const char * shdebugstr_guid(const struct _GUID *id)
Definition: debughlp.cpp:428

◆ CompareIDs()

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

Implements IShellFolder.

Definition at line 314 of file CNetFolder.cpp.

315{
316 return E_NOTIMPL;
317}

◆ CreateViewObject()

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

Definition at line 322 of file CNetFolder.cpp.

323{
324 CComPtr<IShellView> pShellView;
326
327 TRACE("(%p)->(hwnd=%p,%s,%p)\n", this,
328 hwndOwner, shdebugstr_guid (&riid), ppvOut);
329
330 if (!ppvOut)
331 return hr;
332
333 *ppvOut = NULL;
334
335 if (IsEqualIID(riid, IID_IDropTarget))
336 {
337 WARN("IDropTarget not implemented\n");
338 hr = E_NOTIMPL;
339 }
340 else if (IsEqualIID(riid, IID_IContextMenu))
341 {
342 WARN("IContextMenu not implemented\n");
343 hr = E_NOTIMPL;
344 }
345 else if (IsEqualIID(riid, IID_IShellView))
346 {
347 SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
348 hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
349 }
350 TRACE("-- (%p)->(interface=%p)\n", this, ppvOut);
351 return hr;
352}
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
Definition: CDefView.cpp:3844
#define WARN(fmt,...)
Definition: debug.h:112
#define E_INVALIDARG
Definition: ddrawi.h:101
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
HRESULT hr
Definition: shlfolder.c:183
struct _SFV_CREATE SFV_CREATE
#define TRACE(s)
Definition: solgame.cpp:4

◆ EnumObjects()

HRESULT WINAPI CNetFolder::EnumObjects ( HWND  hwndOwner,
DWORD  dwFlags,
LPENUMIDLIST *  ppEnumIDList 
)
virtual

Definition at line 275 of file CNetFolder.cpp.

276{
277 return ShellObjectCreatorInit<CNetFolderEnum>(hwndOwner, dwFlags, IID_PPV_ARG(IEnumIDList, ppEnumIDList));
278}
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
#define IID_PPV_ARG(Itype, ppType)

◆ EnumSearches()

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

Implements IShellFolder2.

Definition at line 495 of file CNetFolder.cpp.

496{
497 FIXME("(%p)\n", this);
498 return E_NOTIMPL;
499}

◆ GetAttributesOf()

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

Definition at line 357 of file CNetFolder.cpp.

358{
359 static const DWORD dwNethoodAttributes =
360 SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR |
361 SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER | SFGAO_CANRENAME | SFGAO_CANDELETE;
362 HRESULT hr = S_OK;
363
364 TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", this,
365 cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0);
366
367 if (!rgfInOut)
368 return E_INVALIDARG;
369 if (cidl && !apidl)
370 return E_INVALIDARG;
371
372 if (*rgfInOut == 0)
373 *rgfInOut = ~0;
374
375 if(cidl == 0)
376 *rgfInOut = dwNethoodAttributes;
377 else
378 {
379 /* FIXME: Implement when enumerating items is implemented */
380#ifdef HACKY_UNC_PATHS
381 *rgfInOut = SFGAO_FILESYSTEM | SFGAO_CANLINK | SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR;
382#endif
383 }
384
385 /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
386 *rgfInOut &= ~SFGAO_VALIDATE;
387
388 TRACE("-- result=0x%08x\n", *rgfInOut);
389 return hr;
390}
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:52

◆ GetClassID()

HRESULT WINAPI CNetFolder::GetClassID ( CLSID lpClassId)
virtual

Implements IPersist.

Definition at line 557 of file CNetFolder.cpp.

558{
559 TRACE("(%p)\n", this);
560
561 if (!lpClassId)
562 return E_POINTER;
563
564 *lpClassId = CLSID_NetworkPlaces;
565
566 return S_OK;
567}
#define E_POINTER
Definition: winerror.h:2365

◆ GetCurFolder()

HRESULT WINAPI CNetFolder::GetCurFolder ( PIDLIST_ABSOLUTE pidl)
virtual

Implements IPersistFolder2.

Definition at line 586 of file CNetFolder.cpp.

587{
588 TRACE("(%p)->(%p)\n", this, pidl);
589
590 if (!pidl)
591 return E_POINTER;
592
593 *pidl = ILClone(pidlRoot);
594
595 return S_OK;
596}
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228

◆ GetDefaultColumn()

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

Implements IShellFolder2.

Definition at line 501 of file CNetFolder.cpp.

502{
503 TRACE("(%p)\n", this);
504
505 if (pSort)
506 *pSort = 0;
507 if (pDisplay)
508 *pDisplay = 0;
509
510 return S_OK;
511}

◆ GetDefaultColumnState()

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

Implements IShellFolder2.

Definition at line 513 of file CNetFolder.cpp.

514{
515 TRACE("(%p)\n", this);
516
517 if (!pcsFlags || iColumn >= NETWORKPLACESSHELLVIEWCOLUMNS)
518 return E_INVALIDARG;
519 *pcsFlags = NetworkPlacesSFHeader[iColumn].pcsFlags;
520 return S_OK;
521}
static shvheader NetworkPlacesSFHeader[]
Definition: CNetFolder.cpp:96
#define NETWORKPLACESSHELLVIEWCOLUMNS
Definition: CNetFolder.cpp:108

◆ GetDefaultSearchGUID()

HRESULT WINAPI CNetFolder::GetDefaultSearchGUID ( GUID pguid)
virtual

Implements IShellFolder2.

Definition at line 489 of file CNetFolder.cpp.

490{
491 FIXME("(%p)\n", this);
492 return E_NOTIMPL;
493}

◆ GetDetailsEx()

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

Implements IShellFolder2.

Definition at line 523 of file CNetFolder.cpp.

524{
525 FIXME("(%p)\n", this);
526 return E_NOTIMPL;
527}

◆ GetDetailsOf()

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

Implements IShellFolder2.

Definition at line 529 of file CNetFolder.cpp.

530{
531 if (iColumn >= NETWORKPLACESSHELLVIEWCOLUMNS)
532 return E_FAIL;
533
534 psd->fmt = NetworkPlacesSFHeader[iColumn].fmt;
535 psd->cxChar = NetworkPlacesSFHeader[iColumn].cxChar;
536 if (pidl == NULL)
537 return SHSetStrRet(&psd->str, NetworkPlacesSFHeader[iColumn].colnameid);
538
539 if (iColumn == COLUMN_NAME)
540 return GetDisplayNameOf(pidl, SHGDN_NORMAL, &psd->str);
541
542 FIXME("(%p)->(%p %i %p)\n", this, pidl, iColumn, psd);
543
544 return E_NOTIMPL;
545}
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
Definition: CNetFolder.cpp:458
#define E_FAIL
Definition: ddrawi.h:102
#define COLUMN_NAME
STRRET str
Definition: shtypes.idl:108

◆ GetDisplayNameOf()

HRESULT WINAPI CNetFolder::GetDisplayNameOf ( PCUITEMID_CHILD  pidl,
DWORD  dwFlags,
LPSTRRET  strRet 
)
virtual

Definition at line 458 of file CNetFolder.cpp.

459{
460 if (!strRet || !pidl || !pidl->mkid.cb)
461 return E_INVALIDARG;
462
463#ifdef HACKY_UNC_PATHS
464 return SHSetStrRet(strRet, (LPCWSTR)pidl->mkid.abID);
465#endif
466 return E_NOTIMPL;
467}
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by GetDetailsOf().

◆ GetUIObjectOf()

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

Definition at line 404 of file CNetFolder.cpp.

406{
407 LPVOID pObj = NULL;
409
410 TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", this,
411 hwndOwner, cidl, apidl, shdebugstr_guid (&riid), prgfInOut, ppvOut);
412
413 if (!ppvOut)
414 return hr;
415
416 *ppvOut = NULL;
417
418 if (IsEqualIID(riid, IID_IContextMenu) && (cidl >= 1))
419 {
420 IContextMenu * pCm = NULL;
421 HKEY hkey;
422 UINT cKeys = 0;
423 AddClassKeyToArray(L"Folder", &hkey, &cKeys);
424 hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl, this, NetFolderMenuCallback, cKeys, &hkey, &pCm);
425 pObj = pCm;
426 }
427 else if (IsEqualIID(riid, IID_IDataObject) && (cidl >= 1))
428 {
429 IDataObject * pDo = NULL;
430 hr = IDataObject_Constructor (hwndOwner, pidlRoot, apidl, cidl, TRUE, &pDo);
431 pObj = pDo;
432 }
433 else if ((IsEqualIID(riid, IID_IExtractIconA) || IsEqualIID(riid, IID_IExtractIconW)) && (cidl == 1))
434 {
435 hr = CNetFolderExtractIcon_CreateInstance(apidl[0], riid, &pObj);
436 }
437 else if (IsEqualIID(riid, IID_IDropTarget) && (cidl >= 1))
438 {
439 IDropTarget * pDt = NULL;
441 pObj = pDt;
442 }
443 else
445
446 if (SUCCEEDED(hr) && !pObj)
448
449 *ppvOut = pObj;
450 TRACE("(%p)->hr=0x%08x\n", this, hr);
451 return hr;
452}
HRESULT WINAPI CDefFolderMenu_Create2(PCIDLIST_ABSOLUTE pidlFolder, HWND hwnd, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, IShellFolder *psf, LPFNDFMCALLBACK lpfn, UINT nKeys, const HKEY *ahkeyClsKeys, IContextMenu **ppcm)
HRESULT IDataObject_Constructor(HWND hwndOwner, PCIDLIST_ABSOLUTE pMyPidl, PCUIDLIST_RELATIVE_ARRAY apidl, UINT cidl, BOOL bExtendedObject, IDataObject **dataObject)
HRESULT CNetFolderExtractIcon_CreateInstance(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppvOut)
Definition: CNetFolder.cpp:50
HRESULT CALLBACK NetFolderMenuCallback(IShellFolder *psf, HWND hwnd, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: CNetFolder.cpp:62
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRUE
Definition: types.h:120
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define SUCCEEDED(hr)
Definition: intsafe.h:50
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
const GUID IID_IDataObject
void AddClassKeyToArray(const WCHAR *szClass, HKEY *array, UINT *cKeys)
Definition: shlfolder.cpp:268
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ Initialize()

HRESULT WINAPI CNetFolder::Initialize ( PCIDLIST_ABSOLUTE  pidl)
virtual

Implements IPersistFolder.

Definition at line 574 of file CNetFolder.cpp.

575{
576 if (pidlRoot)
578
579 pidlRoot = ILClone(pidl);
580 return S_OK;
581}

◆ MapColumnToSCID()

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

Implements IShellFolder2.

Definition at line 547 of file CNetFolder.cpp.

548{
549 FIXME("(%p)\n", this);
550
551 return E_NOTIMPL;
552}

◆ ParseDisplayName()

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

Definition at line 233 of file CNetFolder.cpp.

235{
237#ifdef HACKY_UNC_PATHS
238 /* FIXME: the code below is an ugly hack */
239
240 /* Can we use a CFSFolder on that path? */
241 DWORD attrs = GetFileAttributes(lpszDisplayName);
242 if ((attrs & FILE_ATTRIBUTE_DIRECTORY))
243 {
244 if (pchEaten)
245 *pchEaten = 0; /* strange but like the original */
246
247 /* YES WE CAN */
248
249 /* Create our hacky pidl */
250 LPITEMIDLIST pidl = ILCreateFromNetworkPlaceW(lpszDisplayName);
251
252 *ppidl = pidl;
253 if (pdwAttributes)
254 *pdwAttributes = SFGAO_FILESYSTEM | SFGAO_CANLINK | SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR;
255 return S_OK;
256 }
257#endif
258
259 TRACE("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", this,
260 hwndOwner, pbcReserved, lpszDisplayName, debugstr_w (lpszDisplayName),
261 pchEaten, ppidl, pdwAttributes);
262
263 *ppidl = 0;
264 if (pchEaten)
265 *pchEaten = 0; /* strange but like the original */
266
267 TRACE("(%p)->(-- ret=0x%08x)\n", this, hr);
268
269 return hr;
270}
LPITEMIDLIST ILCreateFromNetworkPlaceW(LPCWSTR lpNetworkPlace)
Definition: CNetFolder.cpp:31
#define debugstr_w
Definition: kernel32.h:32
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
#define GetFileAttributes
Definition: winbase.h:3750
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ SetNameOf()

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

Implements IShellFolder.

Definition at line 481 of file CNetFolder.cpp.

483{
484 FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this,
485 hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut);
486 return E_FAIL;
487}
_In_ LPCSTR lpName
Definition: winbase.h:2789

Member Data Documentation

◆ pidlRoot

LPITEMIDLIST CNetFolder::pidlRoot
private

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