1 // TortoiseOverlays - an overlay handler for Tortoise clients
2 // Copyright (C) 2007 - TortoiseSVN
9 extern UINT g_cRefThisDll
; // Reference count of this DLL.
10 extern HINSTANCE g_hmodThisDll
; // Instance handle for this DLL
31 DLLPointers() : hDll(NULL
)
32 , pDllGetClassObject(NULL
)
33 , pDllCanUnloadNow(NULL
)
34 , pShellIconOverlayIdentifier(NULL
)
39 LPFNGETCLASSOBJECT pDllGetClassObject
;
40 LPFNCANUNLOADNOW pDllCanUnloadNow
;
41 IShellIconOverlayIdentifier
* pShellIconOverlayIdentifier
;
44 // The actual OLE Shell context menu handler
46 * The main class of our COM object / Shell Extension.
47 * It contains all Interfaces we implement for the shell to use.
49 class CShellExt
: public IShellIconOverlayIdentifier
55 vector
<DLLPointers
> m_dllpointers
;
58 int GetInstalledOverlays(void); ///< returns the maximum number of overlays TSVN shall use
59 void LoadRealLibrary(LPCTSTR ModuleName
, LPCTSTR clsid
, LPWSTR pwszIconFile
, int cchMax
, int *pIndex
, DWORD
*pdwFlags
);
60 void LoadHandlers(LPWSTR pwszIconFile
, int cchMax
, int *pIndex
, DWORD
*pdwFlags
);
62 CShellExt(FileState state
);
69 STDMETHODIMP
QueryInterface(REFIID
, LPVOID FAR
*);
70 STDMETHODIMP_(ULONG
) AddRef();
71 STDMETHODIMP_(ULONG
) Release();
75 /** \name IShellIconOverlayIdentifier
76 * IShellIconOverlayIdentifier methods
79 STDMETHODIMP
GetOverlayInfo(LPWSTR pwszIconFile
, int cchMax
, int *pIndex
, DWORD
*pdwFlags
);
80 STDMETHODIMP
GetPriority(int *pPriority
);
81 STDMETHODIMP
IsMemberOf(LPCWSTR pwszPath
, DWORD dwAttrib
);