ReactOS  0.4.15-dev-5455-g015cd25
CNetFolder.cpp File Reference
#include <precomp.h>
Include dependency graph for CNetFolder.cpp:

Go to the source code of this file.

Classes

class  CNetFolderEnum
 

Macros

#define HACKY_UNC_PATHS
 
#define COLUMN_NAME   0
 
#define COLUMN_CATEGORY   1
 
#define COLUMN_WORKGROUP   2
 
#define COLUMN_NETLOCATION   3
 
#define NETWORKPLACESSHELLVIEWCOLUMNS   4
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shell)
 
LPITEMIDLIST ILCreateFromNetworkPlaceW (LPCWSTR lpNetworkPlace)
 
HRESULT CNetFolderExtractIcon_CreateInstance (LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppvOut)
 
HRESULT CALLBACK NetFolderMenuCallback (IShellFolder *psf, HWND hwnd, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam)
 

Variables

static shvheader NetworkPlacesSFHeader []
 

Macro Definition Documentation

◆ COLUMN_CATEGORY

#define COLUMN_CATEGORY   1

Definition at line 104 of file CNetFolder.cpp.

◆ COLUMN_NAME

#define COLUMN_NAME   0

Definition at line 103 of file CNetFolder.cpp.

◆ COLUMN_NETLOCATION

#define COLUMN_NETLOCATION   3

Definition at line 106 of file CNetFolder.cpp.

◆ COLUMN_WORKGROUP

#define COLUMN_WORKGROUP   2

Definition at line 105 of file CNetFolder.cpp.

◆ HACKY_UNC_PATHS

#define HACKY_UNC_PATHS

Definition at line 28 of file CNetFolder.cpp.

◆ NETWORKPLACESSHELLVIEWCOLUMNS

#define NETWORKPLACESSHELLVIEWCOLUMNS   4

Definition at line 108 of file CNetFolder.cpp.

Function Documentation

◆ CNetFolderExtractIcon_CreateInstance()

HRESULT CNetFolderExtractIcon_CreateInstance ( LPCITEMIDLIST  pidl,
REFIID  riid,
LPVOID ppvOut 
)

Definition at line 50 of file CNetFolder.cpp.

51 {
52  CComPtr<IDefaultExtractIconInit> initIcon;
55  return hr;
56 
57  initIcon->SetNormalIcon(swShell32Name, -IDI_SHELL_NETWORK_FOLDER);
58 
59  return initIcon->QueryInterface(riid, ppvOut);
60 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
WCHAR swShell32Name[MAX_PATH]
Definition: folders.cpp:22
#define IID_PPV_ARG(Itype, ppType)
#define IDI_SHELL_NETWORK_FOLDER
Definition: resource.h:5
LONG HRESULT
Definition: typedefs.h:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
HRESULT WINAPI SHCreateDefaultExtractIcon(REFIID riid, void **ppv)

Referenced by CNetFolder::GetUIObjectOf().

◆ ILCreateFromNetworkPlaceW()

LPITEMIDLIST ILCreateFromNetworkPlaceW ( LPCWSTR  lpNetworkPlace)

Definition at line 31 of file CNetFolder.cpp.

32 {
33  int cbData = sizeof(WORD) + sizeof(WCHAR) * (wcslen(lpNetworkPlace)+1);
34  LPITEMIDLIST pidl = (LPITEMIDLIST)SHAlloc(cbData + sizeof(WORD));
35  if (!pidl)
36  return NULL;
37 
38  pidl->mkid.cb = cbData;
39  wcscpy((WCHAR*)&pidl->mkid.abID[0], lpNetworkPlace);
40  *(WORD*)((char*)pidl + cbData) = 0;
41 
42  return pidl;
43 }
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned short WORD
Definition: ntddk_ex.h:93
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define NULL
Definition: types.h:112
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
LPVOID WINAPI SHAlloc(SIZE_T len)
Definition: shellole.c:304

Referenced by CNetFolderEnum::EnumerateRec(), and CNetFolder::ParseDisplayName().

◆ NetFolderMenuCallback()

HRESULT CALLBACK NetFolderMenuCallback ( IShellFolder psf,
HWND  hwnd,
IDataObject pdtobj,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 62 of file CNetFolder.cpp.

68 {
69  switch (uMsg)
70  {
72  return S_OK;
73  case DFM_INVOKECOMMAND:
75  case DFM_GETDEFSTATICID: // Required for Windows 7 to pick a default
76  return S_FALSE;
77  }
78  return E_NOTIMPL;
79 }
#define S_FALSE
Definition: winerror.h:2357
#define DFM_INVOKECOMMAND
Definition: precomp.h:45
#define DFM_GETDEFSTATICID
Definition: precomp.h:47
#define DFM_MERGECONTEXTMENU
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:52
#define E_NOTIMPL
Definition: ddrawi.h:99
#define DFM_INVOKECOMMANDEX
Definition: precomp.h:46

Referenced by CNetFolder::GetUIObjectOf().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shell  )

Variable Documentation

◆ NetworkPlacesSFHeader