
#ifndef _CONTEXTMENU_H_
#define _CONTEXTMENU_H_

typedef struct _tagFILERENAME
{
	char szFilePath[MAX_PATH];
} FILENAME,*LPFILENAME;

class CContextMenu : public 
					IContextMenu, IShellExtInit
{
protected:
    ULONG           m_uiRef;             // Object reference count
private:
	void ErrMessage(DWORD dwErrcode);
public:
    CContextMenu();
    ~CContextMenu();
    
    // IUnknown methods
    STDMETHODIMP            QueryInterface (REFIID, LPVOID FAR *);
    STDMETHODIMP_(ULONG)    AddRef ();
    STDMETHODIMP_(ULONG)    Release ();
    
    // IContextMenu methods
	STDMETHODIMP GetCommandString(UINT idCmd, UINT uFlags, UINT *pwReserved,
							LPSTR pszName, UINT cchMax);
	STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO lpici);
	STDMETHODIMP QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst,
							UINT idCmdLast, UINT uFlags);

    // IShellExtInit method
    STDMETHODIMP    Initialize (LPCITEMIDLIST pidlFolder, 
						LPDATAOBJECT lpdobj, HKEY hKeyProgID);
private:
	LPTSTR m_pszSource;
	UINT m_count;
	LPFILENAME m_files;
	TCHAR	m_pszModulePath[MAX_PATH];
};

#endif // _CONTEXTMENU_H_

