forked from gurnec/HashCheck
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathCHashCheckExplorerCommand.hpp
More file actions
58 lines (48 loc) · 1.66 KB
/
CHashCheckExplorerCommand.hpp
File metadata and controls
58 lines (48 loc) · 1.66 KB
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
/**
* HashCheck Shell Extension
* Copyright (C) Kai Liu. All rights reserved.
*
* Please refer to readme.txt for information about this source code.
* Please refer to license.txt for details about distribution and modification.
**/
#ifndef __CHASHCHECKEXPLORERCOMMAND_HPP__
#define __CHASHCHECKEXPLORERCOMMAND_HPP__
#include "globals.h"
enum HASHCHECK_EXPLORER_COMMAND {
HCEC_CREATE = 0,
HCEC_VERIFY = 1,
HCEC_OPTIONS = 2
};
class CHashCheckExplorerCommand : public IExplorerCommand, public IObjectWithSite
{
protected:
CREF m_cRef;
HASHCHECK_EXPLORER_COMMAND m_command;
IUnknown *m_pSite;
public:
CHashCheckExplorerCommand( HASHCHECK_EXPLORER_COMMAND );
~CHashCheckExplorerCommand( );
// IUnknown members
STDMETHODIMP QueryInterface( REFIID, LPVOID * );
STDMETHODIMP_(ULONG) AddRef( ) { return(InterlockedIncrement(&m_cRef)); }
STDMETHODIMP_(ULONG) Release( )
{
LONG cRef = InterlockedDecrement(&m_cRef);
if (cRef == 0) delete this;
return(cRef);
}
// IExplorerCommand members
STDMETHODIMP GetTitle( IShellItemArray *, LPWSTR * );
STDMETHODIMP GetIcon( IShellItemArray *, LPWSTR * );
STDMETHODIMP GetToolTip( IShellItemArray *, LPWSTR * ) { return(E_NOTIMPL); }
STDMETHODIMP GetCanonicalName( GUID * );
STDMETHODIMP GetState( IShellItemArray *, BOOL, EXPCMDSTATE * );
STDMETHODIMP Invoke( IShellItemArray *, IBindCtx * );
STDMETHODIMP GetFlags( EXPCMDFLAGS * );
STDMETHODIMP EnumSubCommands( IEnumExplorerCommand ** ) { return(E_NOTIMPL); }
// IObjectWithSite members
STDMETHODIMP SetSite( IUnknown * );
STDMETHODIMP GetSite( REFIID, void ** );
};
typedef CHashCheckExplorerCommand *LPCHASHCHECKEXPLORERCOMMAND;
#endif