forked from notepad-plus-plus/nppShell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExplorerCommandBase.cpp
63 lines (48 loc) · 1.39 KB
/
ExplorerCommandBase.cpp
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
61
62
63
#include "pch.h"
#include "ExplorerCommandBase.h"
using namespace NppShell::CommandHandlers;
const EXPCMDFLAGS ExplorerCommandBase::Flags()
{
return ECF_DEFAULT;
}
IFACEMETHODIMP ExplorerCommandBase::GetTitle(IShellItemArray* psiItemArray, LPWSTR* ppszName)
{
UNREFERENCED_PARAMETER(psiItemArray);
wstring title = Title();
SHStrDup(title.data(), ppszName);
return S_OK;
}
IFACEMETHODIMP ExplorerCommandBase::GetIcon(IShellItemArray* psiItemArray, LPWSTR* ppszIcon)
{
UNREFERENCED_PARAMETER(psiItemArray);
wstring icon = Icon();
SHStrDup(icon.data(), ppszIcon);
return S_OK;
}
IFACEMETHODIMP ExplorerCommandBase::GetToolTip(IShellItemArray* psiItemArray, LPWSTR* ppszInfotip)
{
UNREFERENCED_PARAMETER(psiItemArray);
UNREFERENCED_PARAMETER(ppszInfotip);
return E_NOTIMPL;
}
IFACEMETHODIMP ExplorerCommandBase::GetState(IShellItemArray* psiItemArray, BOOL fOkToBeSlow, EXPCMDSTATE* pCmdState)
{
UNREFERENCED_PARAMETER(fOkToBeSlow);
*pCmdState = State(psiItemArray);
return S_OK;
}
IFACEMETHODIMP ExplorerCommandBase::GetFlags(EXPCMDFLAGS* flags)
{
*flags = Flags();
return S_OK;
}
IFACEMETHODIMP ExplorerCommandBase::GetCanonicalName(GUID* pguidCommandName)
{
*pguidCommandName = GUID_NULL;
return S_OK;
}
IFACEMETHODIMP ExplorerCommandBase::EnumSubCommands(IEnumExplorerCommand** ppEnum)
{
*ppEnum = nullptr;
return E_NOTIMPL;
}