#include <shlobj.h>

class CShellExt : public IContextMenu,  public IShellPropSheetExt, public IDropTarget,
	 public IExtractIcon, public IShellExtInit, public IPersistFile
{

    public:
        ULONG           m_RefCount ; 
		char			m_FileName [256] ;

    public:
     	
        CShellExt(void);
        ~CShellExt(void);

        //IUnknown interface members

        STDMETHODIMP	QueryInterface(REFIID, LPVOID FAR *);
        STDMETHODIMP_(ULONG)	AddRef(void);
        STDMETHODIMP_(ULONG)	Release(void);

		// IShellExtInit interface members 

	    STDMETHODIMP	Initialize (LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID) ;

		// IShellPropSheetExt member

		STDMETHODIMP AddPages (LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam) ;
	    STDMETHODIMP ReplacePage (UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplaceWith, LPARAM lParam) ;

		// IDropTarget members

        STDMETHODIMP DragEnter(LPDATAOBJECT, DWORD, POINTL, LPDWORD);
        STDMETHODIMP DragOver(DWORD, POINTL, LPDWORD);
        STDMETHODIMP DragLeave(void);
        STDMETHODIMP Drop(LPDATAOBJECT, DWORD, POINTL, LPDWORD);    

		// IContextMenu methods

	    STDMETHODIMP QueryContextMenu (HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) ;
		STDMETHODIMP InvokeCommand (LPCMINVOKECOMMANDINFO lpici) ;
		STDMETHODIMP GetCommandString (UINT idCmd, UINT uType, UINT * pwReserved, LPSTR  pszName, UINT cchMax) ;


		// IPersistFile methods

        STDMETHODIMP GetClassID(LPCLSID);
        STDMETHODIMP IsDirty(void) ;
        STDMETHODIMP Load(LPCOLESTR, DWORD) ;
        STDMETHODIMP Save(LPCOLESTR, BOOL) ;
        STDMETHODIMP SaveCompleted(LPCOLESTR) ;
        STDMETHODIMP GetCurFile(LPOLESTR FAR *) ;

		// IExtractIcon methods

	    STDMETHODIMP GetIconLocation (UINT   uFlags, LPSTR szIconFile,
			UINT   cchMax, int   * piIndex, UINT  * pwFlags) ;

		STDMETHODIMP Extract (LPCSTR pszFile, UINT   nIconIndex, HICON   *phiconLarge,
			HICON   *phiconSmall, UINT    nIconSize) ;


};

