File: ShellExt.h

package info (click to toggle)
bitcollider 0.3.1-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,116 kB
  • ctags: 573
  • sloc: sh: 5,490; ansic: 4,805; cpp: 245; makefile: 109
file content (60 lines) | stat: -rw-r--r-- 1,326 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// ShellExt.h : Declaration of the CShellExt

#ifndef __SHELLEXT_H_
#define __SHELLEXT_H_

// {EAB841A0-9550-11cf-8C16-00805F1408F3}

#include "resource.h"       // main symbols

#include <shlobj.h>
#include <comdef.h>
#include <string>
#include <vector>

using namespace std;

/////////////////////////////////////////////////////////////////////////////
// CShellExt
class ATL_NO_VTABLE CShellExt : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CShellExt, &CLSID_ShellExt>,
	public IDispatchImpl<IShellExt, &IID_IShellExt, &LIBID_BCSHELLEXTLib>,
    public IShellExtInit,
    public IContextMenu
{
public:
	CShellExt()
	{
	}

protected:

    vector<string> oFileList;
    void AnalyzeFiles(void);

public:
    // IShellExtInit
    STDMETHOD(Initialize)(LPCITEMIDLIST, LPDATAOBJECT, HKEY);

    // IContextMenu
    STDMETHOD(GetCommandString)(UINT, UINT, UINT*, LPSTR, UINT);
    STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO);
    STDMETHOD(QueryContextMenu)(HMENU, UINT, UINT, UINT, UINT);

DECLARE_REGISTRY_RESOURCEID(IDR_SHELLEXT)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CShellExt)
	COM_INTERFACE_ENTRY(IShellExt)
	COM_INTERFACE_ENTRY(IDispatch)
    COM_INTERFACE_ENTRY(IShellExtInit)
    COM_INTERFACE_ENTRY(IContextMenu)
END_COM_MAP()

// IShellExt
public:
};

#endif //__SHELLEXT_H_