2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #if !defined(AFX_SHELLEXT_H__DC515C28_6CAC_11D1_BAE7_00C04FD140D2__INCLUDED_)
11 #define AFX_SHELLEXT_H__DC515C28_6CAC_11D1_BAE7_00C04FD140D2__INCLUDED_
15 #endif // _MSC_VER >= 1000
16 // shell_ext.h : header file
21 extern ULONG nCMRefCount; // IContextMenu ref count
22 extern ULONG nSERefCount; // IShellExtInit ref count
23 extern ULONG nICRefCount; // IContextMenu ref count
24 extern ULONG nTPRefCount; // IQueryInfo ref count
25 extern ULONG nXPRefCount; // IPersistFile ref count
27 #define STR_EXT_TITLE TEXT("AfsClientContextMenu")
28 #define STR_REG_PATH TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellIconOverlayIdentifiers")
30 /////////////////////////////////////////////////////////////////////////////
31 // CShellExt command target
33 class CShellExt : public CCmdTarget
35 DECLARE_DYNCREATE(CShellExt)
38 BOOL m_bIsSymlink; // is symbolic link!
39 TCHAR m_szFile[MAX_PATH];
40 BOOL m_bIsOverlayEnabled;
41 BOOL IsOverlayEnabled(){return m_bIsOverlayEnabled;}
43 CStringArray m_astrFileNames;
45 CShellExt(); // protected constructor used by dynamic creation
55 // ClassWizard generated virtual function overrides
56 //{{AFX_VIRTUAL(CShellExt)
58 virtual void OnFinalRelease();
65 // Generated message map functions
66 //{{AFX_MSG(CShellExt)
67 // NOTE - the ClassWizard will add and remove member functions here.
71 // Generated OLE dispatch map functions
72 //{{AFX_DISPATCH(CShellExt)
73 // NOTE - the ClassWizard will add and remove member functions here.
75 DECLARE_DISPATCH_MAP()
77 DECLARE_OLECREATE(CShellExt)
79 // IFileViewer interface
80 BEGIN_INTERFACE_PART(MenuExt, IContextMenu)
81 STDMETHOD(QueryContextMenu)( HMENU hmenu,UINT indexMenu,UINT idCmdFirst,
82 UINT idCmdLast,UINT uFlags);
83 STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici);
84 STDMETHOD(GetCommandString)(UINT idCmd,UINT uType,UINT* pwReserved,LPSTR pszName,
86 END_INTERFACE_PART(MenuExt)
88 // IShellExtInit interface
89 BEGIN_INTERFACE_PART(ShellInit, IShellExtInit)
90 STDMETHOD(Initialize)(LPCITEMIDLIST pidlFolder,LPDATAOBJECT lpdobj, HKEY hkeyProgID);
91 END_INTERFACE_PART(ShellInit)
93 BEGIN_INTERFACE_PART(IconExt, IShellIconOverlayIdentifier)
94 STDMETHOD(GetOverlayInfo)(LPWSTR pwszIconFile,int cchMax,int* pIndex,DWORD* pdwFlags);
95 STDMETHOD(GetPriority)(int* pPriority);
96 STDMETHOD(IsMemberOf)(LPCWSTR pwszPath,DWORD dwAttrib);
97 END_INTERFACE_PART(IconExt)
99 BEGIN_INTERFACE_PART(ToolTipExt, IQueryInfo)
100 STDMETHOD(GetInfoTip)(DWORD dwFlags, LPWSTR *ppwszTip);
101 STDMETHOD(GetInfoFlags)(LPDWORD pdwFlags);
102 END_INTERFACE_PART(ToolTipExt)
104 BEGIN_INTERFACE_PART(PersistFileExt, IPersistFile)
105 STDMETHOD(Load)(LPCOLESTR wszFile, DWORD dwMode);
106 STDMETHOD(GetClassID)(LPCLSID);
107 STDMETHOD(IsDirty)(VOID);
108 STDMETHOD(Save)(LPCOLESTR, BOOL);
109 STDMETHOD(SaveCompleted)(LPCOLESTR);
110 STDMETHOD(GetCurFile)(LPOLESTR FAR*);
111 END_INTERFACE_PART(PersistFileExt)
113 DECLARE_INTERFACE_MAP()
116 /////////////////////////////////////////////////////////////////////////////
118 //{{AFX_INSERT_LOCATION}}
119 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
121 #endif // !defined(AFX_SHELLEXT_H__DC515C28_6CAC_11D1_BAE7_00C04FD140D2__INCLUDED_)