ReactOS  0.4.13-dev-482-ge57f103
shfldr_netconnect.h
Go to the documentation of this file.
1 
2 
3 typedef struct {
4  int colnameid;
5  int pcsFlags;
6  int fmt;
7  int cxChar;
8 } shvheader;
9 
11  public CComCoClass<CNetworkConnections, &CLSID_ConnectionFolder>,
12  public CComObjectRootEx<CComMultiThreadModelNoCS>,
13  public IPersistFolder2,
14  public IShellExtInit,
15  public IShellFolder2,
16  public IOleCommandTarget,
17  public IShellFolderViewCB,
18  public IShellExecuteHookW
19 {
20  public:
23 
24  // IPersistFolder2
25  virtual HRESULT WINAPI GetClassID(CLSID *lpClassId);
28 
29  // IShellFolder
30  virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
31  virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
32  virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
33  virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
35  virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
36  virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
37  virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
39  virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut);
40 
41  // IShellFolder2
42  virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
43  virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
44  virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
45  virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
46  virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
47  virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd);
49 
50  // IShellExtInit
51  virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID);
52 
53  // IOleCommandTarget
54  virtual HRESULT WINAPI Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
55  virtual HRESULT WINAPI QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText);
56 
57  // IShellFolderViewCB
59 
60  // IShellExecuteHookW
62 
63  private:
64 
65  /* both paths are parsible from the desktop */
67  CComPtr<IOleCommandTarget> m_lpOleCmd;
68 
69  public:
70 
73  COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder2)
74  COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2)
75  COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder2)
76  COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2)
77  COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit)
78  COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
79  COM_INTERFACE_ENTRY_IID(IID_IShellFolderViewCB, IShellFolderViewCB)
80  COM_INTERFACE_ENTRY_IID(IID_IShellExecuteHookW, IShellExecuteHookW)
81  END_COM_MAP()
82 
86 };
87 
89  public CComObjectRootEx<CComMultiThreadModelNoCS>,
90  public IContextMenu3,
91  public IObjectWithSite,
92  public IQueryInfo,
93  public IExtractIconW
94 {
95  private:
97  CComPtr<IUnknown> m_pUnknown;
98  CComPtr<IOleCommandTarget> m_lpOleCmd;
99 
100  public:
101  CNetConUiObject();
102  ~CNetConUiObject();
104 
105  // IContextMenu3
106  virtual HRESULT WINAPI QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
107  virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpici);
108  virtual HRESULT WINAPI GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax);
109  virtual HRESULT WINAPI HandleMenuMsg( UINT uMsg, WPARAM wParam, LPARAM lParam);
110  virtual HRESULT WINAPI HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult);
111 
112  // IObjectWithSite
113  virtual HRESULT WINAPI SetSite(IUnknown *punk);
114  virtual HRESULT WINAPI GetSite(REFIID iid, void **ppvSite);
115 
116  // IQueryInfo
117  virtual HRESULT WINAPI GetInfoFlags(DWORD *pdwFlags);
118  virtual HRESULT WINAPI GetInfoTip(DWORD dwFlags, WCHAR **ppwszTip);
119 
120  // IExtractIconW
121  virtual HRESULT STDMETHODCALLTYPE GetIconLocation(UINT uFlags, LPWSTR szIconFile, UINT cchMax, int *piIndex, UINT *pwFlags);
122  virtual HRESULT STDMETHODCALLTYPE Extract(LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
123 
125  COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu3)
126  COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu3)
127  COM_INTERFACE_ENTRY_IID(IID_IContextMenu3, IContextMenu3)
129  COM_INTERFACE_ENTRY_IID(IID_IQueryInfo, IQueryInfo)
130  COM_INTERFACE_ENTRY_IID(IID_IExtractIconW, IExtractIconW)
131  END_COM_MAP()
132 
135 };
136 
CComPtr< IOleCommandTarget > m_lpOleCmd
virtual HRESULT WINAPI GetClassID(CLSID *lpClassId)
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
static HICON
Definition: imagelist.c:84
#define REFIID
Definition: guiddef.h:113
virtual HRESULT WINAPI QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid)
static HMENU hmenu
Definition: win.c:66
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
interface IBindCtx * LPBC
Definition: objfwd.h:18
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
REFIID riid
Definition: precomp.h:44
const GUID IID_IPersist
Definition: proxy.cpp:14
virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE *pidl)
_In_ LPCSTR lpName
Definition: winbase.h:2729
virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:611
HRESULT WINAPI Extract(SESSION *dest, LPCSTR szCabName)
Definition: cabinet_main.c:328
UINT_PTR WPARAM
Definition: windef.h:207
UINT uFlags
Definition: api.c:60
char * LPSTR
Definition: xmlstorage.h:182
#define DECLARE_NO_REGISTRY()
Definition: atlcom.h:599
static LPOLESTR
Definition: stg_prop.c:27
WPARAM wParam
Definition: combotst.c:138
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum)
CComPtr< IUnknown > m_pUnknown
PIDLIST_ABSOLUTE m_pidlRoot
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
Definition: shtypes.idl:71
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
LONG_PTR LPARAM
Definition: windef.h:208
HRESULT ShowNetConnectionProperties(INetConnection *pNetConnect, HWND hwnd)
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags)
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid)
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay)
#define WINAPI
Definition: msvc.h:8
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
const IID IID_IObjectWithSite
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
HRESULT WINAPI GetInfoTip(IUnknown *param8, long paramC, LPTSTR *param10, long cchMax)
UINT cchMax
virtual HRESULT WINAPI MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
virtual HRESULT WINAPI Execute(LPSHELLEXECUTEINFOW pei)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl)
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
virtual HRESULT WINAPI Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
unsigned int UINT
Definition: ndis.h:50
PCUITEMID_CHILD m_pidl
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:639
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
Definition: shtypes.idl:57
const WCHAR * class
Definition: main.c:68
unsigned int ULONG
Definition: retypes.h:1
CComPtr< IOleCommandTarget > m_lpOleCmd
#define END_COM_MAP()
Definition: atlcom.h:552
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LONG_PTR LRESULT
Definition: windef.h:209
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPARAM lParam
Definition: combotst.c:139
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)