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 "AfsClientContextMenu"
28 #define _STR_EXT_TITLE2 "AfsClientOverlayHandler"
29 #define STR_EXT_TITLE TEXT(_STR_EXT_TITLE)
30 #define STR_EXT_TITLE2 TEXT(_STR_EXT_TITLE2)
31 #define STR_REG_PATH TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellIconOverlayIdentifiers")
33 /////////////////////////////////////////////////////////////////////////////
34 // CShellExt command target
36 class CShellExt
: public CCmdTarget
38 DECLARE_DYNCREATE(CShellExt
)
41 BOOL m_bIsSymlink
; // is symbolic link!
42 TCHAR m_szFile
[MAX_PATH
];
43 BOOL m_bIsOverlayEnabled
;
45 BOOL
IsOverlayEnabled(){return m_bIsOverlayEnabled
;}
47 CStringArray m_astrFileNames
;
49 CShellExt(); // protected constructor used by dynamic creation
57 int GetOverlayObject() {return m_overlayObject
;}
59 // ClassWizard generated virtual function overrides
60 //{{AFX_VIRTUAL(CShellExt)
62 virtual void OnFinalRelease();
69 // Generated message map functions
70 //{{AFX_MSG(CShellExt)
71 // NOTE - the ClassWizard will add and remove member functions here.
75 // Generated OLE dispatch map functions
76 //{{AFX_DISPATCH(CShellExt)
77 // NOTE - the ClassWizard will add and remove member functions here.
79 DECLARE_DISPATCH_MAP()
81 DECLARE_OLECREATE(CShellExt
)
83 // IFileViewer interface
84 BEGIN_INTERFACE_PART(MenuExt
, IContextMenu
)
85 STDMETHOD(QueryContextMenu
)( HMENU hmenu
,UINT indexMenu
,UINT idCmdFirst
,
86 UINT idCmdLast
,UINT uFlags
);
87 STDMETHOD(InvokeCommand
)(LPCMINVOKECOMMANDINFO lpici
);
88 STDMETHOD(GetCommandString
)(UINT_PTR idCmd
,UINT uType
,UINT
* pwReserved
,LPSTR pszName
,
90 END_INTERFACE_PART(MenuExt
)
92 // IShellExtInit interface
93 BEGIN_INTERFACE_PART(ShellInit
, IShellExtInit
)
94 STDMETHOD(Initialize
)(LPCITEMIDLIST pidlFolder
,IDataObject
*lpdobj
, HKEY hkeyProgID
);
95 END_INTERFACE_PART(ShellInit
)
97 BEGIN_INTERFACE_PART(IconExt
, IShellIconOverlayIdentifier
)
98 STDMETHOD(GetOverlayInfo
)(LPWSTR pwszIconFile
,int cchMax
,int* pIndex
,DWORD
* pdwFlags
);
99 STDMETHOD(GetPriority
)(int* pPriority
);
100 STDMETHOD(IsMemberOf
)(LPCWSTR pwszPath
,DWORD dwAttrib
);
101 END_INTERFACE_PART(IconExt
)
103 BEGIN_INTERFACE_PART(ToolTipExt
, IQueryInfo
)
104 STDMETHOD(GetInfoTip
)(DWORD dwFlags
, LPWSTR
*ppwszTip
);
105 STDMETHOD(GetInfoFlags
)(LPDWORD pdwFlags
);
106 END_INTERFACE_PART(ToolTipExt
)
108 BEGIN_INTERFACE_PART(PersistFileExt
, IPersistFile
)
109 STDMETHOD(Load
)(LPCOLESTR wszFile
, DWORD dwMode
);
110 STDMETHOD(GetClassID
)(LPCLSID
);
111 STDMETHOD(IsDirty
)(VOID
);
112 STDMETHOD(Save
)(LPCOLESTR
, BOOL
);
113 STDMETHOD(SaveCompleted
)(LPCOLESTR
);
114 STDMETHOD(GetCurFile
)(LPOLESTR FAR
*);
115 END_INTERFACE_PART(PersistFileExt
)
117 DECLARE_INTERFACE_MAP()
120 class CShellExt2
: public CShellExt
123 DECLARE_DYNCREATE(CShellExt2
)
124 CShellExt2() : CShellExt()
131 DECLARE_OLECREATE(CShellExt2
)
134 /////////////////////////////////////////////////////////////////////////////
136 //{{AFX_INSERT_LOCATION}}
137 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
139 #endif // !defined(AFX_SHELLEXT_H__DC515C28_6CAC_11D1_BAE7_00C04FD140D2__INCLUDED_)