1
// ContextMenuExt.h : Declaration of the CContextMenuExt
4
#include "resource.h" // main symbols
5
#include "SyncanyExt_i.h"
7
#if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA)
8
#error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms."
13
extern HMODULE g_hModule;
14
extern BOOL g_isExplorer;
15
extern LONG g_numObject;
20
class CContextMenuExt :
28
TCHAR m_szFile[MAX_PATH];
29
STDMETHODIMP QueryInterface(const IID &riid, void **ppv);
31
STDMETHODIMP_(ULONG) AddRef() {
32
InterlockedIncrement(&g_numObject);
33
return InterlockedIncrement(&m_refcnt);
36
STDMETHODIMP_(ULONG) Release() {
37
InterlockedDecrement(&g_numObject);
38
ULONG res = InterlockedDecrement(&m_refcnt);
39
if (!res) delete this;
45
STDMETHODIMP Initialize(LPCITEMIDLIST, LPDATAOBJECT, HKEY);
48
STDMETHODIMP QueryContextMenu (
49
HMENU hmenu, UINT uMenuIndex, UINT uidFirstCmd,
50
UINT uidLastCmd, UINT uFlags );
52
STDMETHODIMP GetCommandString (
53
UINT_PTR idCmd, UINT uFlags, UINT* pwReserved,
54
LPSTR pszName, UINT cchMax );
56
STDMETHODIMP InvokeCommand (
57
LPCMINVOKECOMMANDINFO pCmdInfo );
b'\\ No newline at end of file'