[SHELL32]

- Fix getting name for context menu item. Fixes two "find" items in My Computer context menu.
- Minor code and comments improvements

svn path=/trunk/; revision=54688
This commit is contained in:
Rafal Harabien 2011-12-18 23:41:49 +00:00
parent 9286dc7ef8
commit 6146fd09b2
4 changed files with 83 additions and 109 deletions

View file

@ -139,7 +139,7 @@ HRESULT WINAPI CDefaultContextMenu::Initialize(const DEFCONTEXTMENU *pdcm)
} }
void void
CDefaultContextMenu::AddStaticEntry(const WCHAR *szVerb, const WCHAR * szClass) CDefaultContextMenu::AddStaticEntry(const WCHAR *szVerb, const WCHAR *szClass)
{ {
PStaticShellEntry curEntry; PStaticShellEntry curEntry;
PStaticShellEntry lastEntry = NULL; PStaticShellEntry lastEntry = NULL;
@ -178,16 +178,10 @@ CDefaultContextMenu::AddStaticEntry(const WCHAR *szVerb, const WCHAR * szClass)
return; return;
} }
if (lastEntry) if (lastEntry)
{
lastEntry->Next = curEntry; lastEntry->Next = curEntry;
}
else else
{
shead = curEntry; shead = curEntry;
}
} }
void void
@ -196,19 +190,17 @@ CDefaultContextMenu::AddStaticEntryForKey(HKEY hKey, const WCHAR * szClass)
LONG result; LONG result;
DWORD dwIndex; DWORD dwIndex;
WCHAR szName[40]; WCHAR szName[40];
DWORD dwName; DWORD dwSize;
dwIndex = 0; dwIndex = 0;
do do
{ {
szName[0] = 0; szName[0] = 0;
dwName = sizeof(szName) / sizeof(WCHAR); dwSize = sizeof(szName) / sizeof(WCHAR);
result = RegEnumKeyExW(hKey, dwIndex, szName, &dwName, NULL, NULL, NULL, NULL); result = RegEnumKeyExW(hKey, dwIndex, szName, &dwSize, NULL, NULL, NULL, NULL);
szName[(sizeof(szName)/sizeof(WCHAR))-1] = 0;
if (result == ERROR_SUCCESS) if (result == ERROR_SUCCESS)
{
AddStaticEntry(szName, szClass); AddStaticEntry(szName, szClass);
}
dwIndex++; dwIndex++;
} while(result == ERROR_SUCCESS); } while(result == ERROR_SUCCESS);
} }
@ -600,7 +592,6 @@ CDefaultContextMenu::AddStaticContextMenusToMenu(
UINT idResource; UINT idResource;
PStaticShellEntry curEntry; PStaticShellEntry curEntry;
WCHAR szVerb[40]; WCHAR szVerb[40];
WCHAR szTemp[50];
DWORD dwSize; DWORD dwSize;
UINT fState; UINT fState;
UINT Length; UINT Length;
@ -618,6 +609,8 @@ CDefaultContextMenu::AddStaticContextMenusToMenu(
while(curEntry) while(curEntry)
{ {
fState = MFS_ENABLED; fState = MFS_ENABLED;
mii.dwTypeData = NULL;
if (!wcsicmp(curEntry->szVerb, L"open")) if (!wcsicmp(curEntry->szVerb, L"open"))
{ {
fState |= MFS_DEFAULT; fState |= MFS_DEFAULT;
@ -644,38 +637,26 @@ CDefaultContextMenu::AddStaticContextMenusToMenu(
if (idResource > 0) if (idResource > 0)
{ {
if (LoadStringW(shell32_hInstance, idResource, szVerb, sizeof(szVerb) / sizeof(WCHAR))) if (LoadStringW(shell32_hInstance, idResource, szVerb, sizeof(szVerb) / sizeof(WCHAR)))
{ mii.dwTypeData = szVerb; /* use translated verb */
/* use translated verb */
szVerb[(sizeof(szVerb)/sizeof(WCHAR))-1] = L'\0';
mii.dwTypeData = szVerb;
}
else else
{
ERR("Failed to load string, defaulting to NULL value for mii.dwTypeData\n"); ERR("Failed to load string, defaulting to NULL value for mii.dwTypeData\n");
}
} }
else else
{ {
WCHAR wszKey[256];
Length = wcslen(curEntry->szClass) + wcslen(curEntry->szVerb) + 8; Length = wcslen(curEntry->szClass) + wcslen(curEntry->szVerb) + 8;
if (Length < sizeof(szTemp) / sizeof(WCHAR)) if (Length < sizeof(wszKey) / sizeof(WCHAR))
{ {
wcscpy(szTemp, curEntry->szClass); wcscpy(wszKey, curEntry->szClass);
wcscat(szTemp, L"\\shell\\"); wcscat(wszKey, L"\\shell\\");
wcscat(szTemp, curEntry->szVerb); wcscat(wszKey, curEntry->szVerb);
dwSize = sizeof(szVerb); dwSize = sizeof(szVerb);
if (RegGetValueW(HKEY_CLASSES_ROOT, szTemp, NULL, RRF_RT_REG_SZ, NULL, szVerb, &dwSize) == ERROR_SUCCESS) if (RegGetValueW(HKEY_CLASSES_ROOT, wszKey, NULL, RRF_RT_REG_SZ, NULL, szVerb, &dwSize) == ERROR_SUCCESS)
{ mii.dwTypeData = szVerb; /* use description for the menu entry */
/* use description for the menu entry */
mii.dwTypeData = szVerb;
}
else else
{ mii.dwTypeData = curEntry->szVerb; /* use verb for the menu entry */
/* use verb for the menu entry */
mii.dwTypeData = curEntry->szVerb;
}
} }
} }
mii.cch = wcslen(mii.dwTypeData); mii.cch = wcslen(mii.dwTypeData);
@ -689,7 +670,7 @@ CDefaultContextMenu::AddStaticContextMenusToMenu(
return indexMenu; return indexMenu;
} }
void WINAPI _InsertMenuItemW ( void WINAPI _InsertMenuItemW(
HMENU hmenu, HMENU hmenu,
UINT indexMenu, UINT indexMenu,
BOOL fByPosition, BOOL fByPosition,

View file

@ -42,7 +42,6 @@ CDrivesFolderEnum is only responsible for returning the physical items.
class CDrivesFolderEnum : class CDrivesFolderEnum :
public IEnumIDListImpl public IEnumIDListImpl
{ {
private:
public: public:
CDrivesFolderEnum(); CDrivesFolderEnum();
~CDrivesFolderEnum(); ~CDrivesFolderEnum();
@ -79,17 +78,18 @@ HRESULT WINAPI CDrivesFolderEnum::Initialize(HWND hwndOwner, DWORD dwFlags)
{ {
if (CreateMyCompEnumList(dwFlags) == FALSE) if (CreateMyCompEnumList(dwFlags) == FALSE)
return E_FAIL; return E_FAIL;
return S_OK; return S_OK;
} }
/************************************************************************** /**************************************************************************
* CDrivesFolderEnum::CreateMyCompEnumList() * CDrivesFolderEnum::CreateMyCompEnumList()
*/ */
static const WCHAR MyComputer_NameSpaceW[] = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\Namespace";
BOOL CDrivesFolderEnum::CreateMyCompEnumList(DWORD dwFlags) BOOL CDrivesFolderEnum::CreateMyCompEnumList(DWORD dwFlags)
{ {
BOOL bRet = TRUE; BOOL bRet = TRUE;
static const WCHAR MyComputer_NameSpaceW[] = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\Namespace";
TRACE("(%p)->(flags=0x%08x)\n", this, dwFlags); TRACE("(%p)->(flags=0x%08x)\n", this, dwFlags);
@ -361,9 +361,9 @@ HRESULT WINAPI CDrivesFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVO
} }
/************************************************************************** /**************************************************************************
* ISF_MyComputer_fnGetAttributesOf * CDrivesFolder::GetAttributesOf
*/ */
HRESULT WINAPI CDrivesFolder::GetAttributesOf (UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) HRESULT WINAPI CDrivesFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut)
{ {
HRESULT hr = S_OK; HRESULT hr = S_OK;
static const DWORD dwComputerAttributes = static const DWORD dwComputerAttributes =
@ -662,7 +662,7 @@ HRESULT WINAPI CDrivesFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags
} }
/************************************************************************** /**************************************************************************
* ISF_MyComputer_fnSetNameOf * CDrivesFolder::SetNameOf
* Changes the name of a file object or subfolder, possibly changing its item * Changes the name of a file object or subfolder, possibly changing its item
* identifier in the process. * identifier in the process.
* *

View file

@ -59,11 +59,11 @@ typedef struct _LANGANDCODEPAGE_
WORD code; WORD code;
} LANGANDCODEPAGE, *LPLANGANDCODEPAGE; } LANGANDCODEPAGE, *LPLANGANDCODEPAGE;
HANDLE OpenMRUList(HKEY hKey); static HANDLE OpenMRUList(HKEY hKey);
void LoadItemFromHKCU(POPEN_WITH_CONTEXT pContext, const WCHAR * szExt); static VOID LoadItemFromHKCU(POPEN_WITH_CONTEXT pContext, const WCHAR * szExt);
void LoadItemFromHKCR(POPEN_WITH_CONTEXT pContext, const WCHAR * szExt); static VOID LoadItemFromHKCR(POPEN_WITH_CONTEXT pContext, const WCHAR * szExt);
void InsertOpenWithItem(POPEN_WITH_CONTEXT pContext, WCHAR * szAppName); static VOID InsertOpenWithItem(POPEN_WITH_CONTEXT pContext, WCHAR * szAppName);
COpenWithMenu::COpenWithMenu() COpenWithMenu::COpenWithMenu()
{ {
@ -76,7 +76,7 @@ COpenWithMenu::~COpenWithMenu()
TRACE(" destroying IContextMenu(%p)\n", this); TRACE(" destroying IContextMenu(%p)\n", this);
} }
VOID static VOID
AddItem(HMENU hMenu, UINT idCmdFirst) AddItem(HMENU hMenu, UINT idCmdFirst)
{ {
MENUITEMINFOW mii; MENUITEMINFOW mii;
@ -105,8 +105,7 @@ AddItem(HMENU hMenu, UINT idCmdFirst)
InsertMenuItemW(hMenu, -1, TRUE, &mii); InsertMenuItemW(hMenu, -1, TRUE, &mii);
} }
static static VOID
void
LoadOWItems(POPEN_WITH_CONTEXT pContext, LPCWSTR szName) LoadOWItems(POPEN_WITH_CONTEXT pContext, LPCWSTR szName)
{ {
const WCHAR * szExt; const WCHAR * szExt;
@ -138,8 +137,6 @@ LoadOWItems(POPEN_WITH_CONTEXT pContext, LPCWSTR szName)
} }
} }
HRESULT WINAPI COpenWithMenu::QueryContextMenu( HRESULT WINAPI COpenWithMenu::QueryContextMenu(
HMENU hmenu, HMENU hmenu,
UINT indexMenu, UINT indexMenu,
@ -204,13 +201,13 @@ HRESULT WINAPI COpenWithMenu::QueryContextMenu(
mii.wID = Context.idCmdFirst; mii.wID = Context.idCmdFirst;
mii.fType = MFT_STRING; mii.fType = MFT_STRING;
if (InsertMenuItemW( hmenu, pos, TRUE, &mii)) if (InsertMenuItemW(hmenu, pos, TRUE, &mii))
Context.Count++; Context.Count++;
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Context.Count); return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Context.Count);
} }
void static VOID
FreeListItems(HWND hwndDlg) FreeListItems(HWND hwndDlg)
{ {
HWND hList; HWND hList;
@ -234,7 +231,8 @@ FreeListItems(HWND hwndDlg)
} }
} }
BOOL HideApplicationFromList(WCHAR * pFileName) static BOOL
HideApplicationFromList(WCHAR * pFileName)
{ {
WCHAR szBuffer[100] = {'A', 'p', 'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', 's', '\\', 0}; WCHAR szBuffer[100] = {'A', 'p', 'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', 's', '\\', 0};
DWORD dwSize = 0; DWORD dwSize = 0;
@ -257,7 +255,7 @@ BOOL HideApplicationFromList(WCHAR * pFileName)
return FALSE; return FALSE;
} }
VOID static VOID
WriteStaticShellExtensionKey(HKEY hRootKey, const WCHAR * pVerb, WCHAR *pFullPath) WriteStaticShellExtensionKey(HKEY hRootKey, const WCHAR * pVerb, WCHAR *pFullPath)
{ {
HKEY hShell; HKEY hShell;
@ -287,7 +285,7 @@ WriteStaticShellExtensionKey(HKEY hRootKey, const WCHAR * pVerb, WCHAR *pFullPat
RegCloseKey(hShell); RegCloseKey(hShell);
} }
VOID static VOID
StoreNewSettings(LPCWSTR szFileName, WCHAR *szAppName) StoreNewSettings(LPCWSTR szFileName, WCHAR *szAppName)
{ {
WCHAR szBuffer[100] = { L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\"}; WCHAR szBuffer[100] = { L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\"};
@ -326,7 +324,7 @@ StoreNewSettings(LPCWSTR szFileName, WCHAR *szAppName)
RegCloseKey(hKey); RegCloseKey(hKey);
} }
VOID static VOID
SetProgrammAsDefaultHandler(LPCWSTR szFileName, WCHAR * szAppName) SetProgrammAsDefaultHandler(LPCWSTR szFileName, WCHAR * szAppName)
{ {
HKEY hKey; HKEY hKey;
@ -404,7 +402,7 @@ SetProgrammAsDefaultHandler(LPCWSTR szFileName, WCHAR * szAppName)
RegCloseKey(hKey); RegCloseKey(hKey);
} }
void static VOID
BrowseForApplication(HWND hwndDlg) BrowseForApplication(HWND hwndDlg)
{ {
WCHAR szBuffer[64] = {0}; WCHAR szBuffer[64] = {0};
@ -450,7 +448,7 @@ BrowseForApplication(HWND hwndDlg)
SendMessage(Context.hDlgCtrl, LB_SETCURSEL, count, 0); SendMessage(Context.hDlgCtrl, LB_SETCURSEL, count, 0);
} }
POPEN_ITEM_CONTEXT static POPEN_ITEM_CONTEXT
GetCurrentOpenItemContext(HWND hwndDlg) GetCurrentOpenItemContext(HWND hwndDlg)
{ {
LRESULT result; LRESULT result;
@ -468,7 +466,7 @@ GetCurrentOpenItemContext(HWND hwndDlg)
return (POPEN_ITEM_CONTEXT)result; return (POPEN_ITEM_CONTEXT)result;
} }
void static VOID
ExecuteOpenItem(POPEN_ITEM_CONTEXT pItemContext, LPCWSTR FileName) ExecuteOpenItem(POPEN_ITEM_CONTEXT pItemContext, LPCWSTR FileName)
{ {
STARTUPINFOW si; STARTUPINFOW si;
@ -492,8 +490,8 @@ ExecuteOpenItem(POPEN_ITEM_CONTEXT pItemContext, LPCWSTR FileName)
} }
} }
static INT_PTR CALLBACK
static INT_PTR CALLBACK OpenWithProgrammDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) OpenWithProgrammDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
LPMEASUREITEMSTRUCT lpmis; LPMEASUREITEMSTRUCT lpmis;
LPDRAWITEMSTRUCT lpdis; LPDRAWITEMSTRUCT lpdis;
@ -636,7 +634,7 @@ static INT_PTR CALLBACK OpenWithProgrammDlg(HWND hwndDlg, UINT uMsg, WPARAM wPar
return FALSE; return FALSE;
} }
void static VOID
FreeMenuItemContext(HMENU hMenu) FreeMenuItemContext(HMENU hMenu)
{ {
INT Count; INT Count;
@ -664,7 +662,6 @@ FreeMenuItemContext(HMENU hMenu)
} }
} }
HRESULT WINAPI HRESULT WINAPI
COpenWithMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpici ) COpenWithMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpici )
{ {
@ -788,10 +785,7 @@ GetManufacturer(WCHAR * szAppName, POPEN_ITEM_CONTEXT pContext)
HeapFree(GetProcessHeap(), 0, pBuf); HeapFree(GetProcessHeap(), 0, pBuf);
} }
static VOID
void
InsertOpenWithItem(POPEN_WITH_CONTEXT pContext, WCHAR * szAppName) InsertOpenWithItem(POPEN_WITH_CONTEXT pContext, WCHAR * szAppName)
{ {
MENUITEMINFOW mii; MENUITEMINFOW mii;
@ -843,13 +837,13 @@ InsertOpenWithItem(POPEN_WITH_CONTEXT pContext, WCHAR * szAppName)
} }
} }
void static VOID
AddItemFromProgIDList(POPEN_WITH_CONTEXT pContext, HKEY hKey) AddItemFromProgIDList(POPEN_WITH_CONTEXT pContext, HKEY hKey)
{ {
FIXME("implement me :)))\n"); FIXME("implement me :)))\n");
} }
HANDLE static HANDLE
OpenMRUList(HKEY hKey) OpenMRUList(HKEY hKey)
{ {
CREATEMRULISTW info; CREATEMRULISTW info;
@ -866,7 +860,7 @@ OpenMRUList(HKEY hKey)
return CreateMRUListW(&info); return CreateMRUListW(&info);
} }
void static VOID
AddItemFromMRUList(POPEN_WITH_CONTEXT pContext, HKEY hKey) AddItemFromMRUList(POPEN_WITH_CONTEXT pContext, HKEY hKey)
{ {
HANDLE hList; HANDLE hList;
@ -900,9 +894,7 @@ AddItemFromMRUList(POPEN_WITH_CONTEXT pContext, HKEY hKey)
FreeMRUList(hList); FreeMRUList(hList);
} }
static VOID
void
LoadItemFromHKCR(POPEN_WITH_CONTEXT pContext, const WCHAR * szExt) LoadItemFromHKCR(POPEN_WITH_CONTEXT pContext, const WCHAR * szExt)
{ {
HKEY hKey; HKEY hKey;
@ -986,7 +978,7 @@ LoadItemFromHKCR(POPEN_WITH_CONTEXT pContext, const WCHAR * szExt)
} }
} }
void static VOID
LoadItemFromHKCU(POPEN_WITH_CONTEXT pContext, const WCHAR * szExt) LoadItemFromHKCU(POPEN_WITH_CONTEXT pContext, const WCHAR * szExt)
{ {
WCHAR szBuffer[MAX_PATH]; WCHAR szBuffer[MAX_PATH];
@ -1013,7 +1005,7 @@ LoadItemFromHKCU(POPEN_WITH_CONTEXT pContext, const WCHAR * szExt)
} }
HRESULT HRESULT
COpenWithMenu::SHEOW_LoadOpenWithItems(IDataObject *pdtobj) COpenWithMenu::LoadOpenWithItems(IDataObject *pdtobj)
{ {
STGMEDIUM medium; STGMEDIUM medium;
FORMATETC fmt; FORMATETC fmt;
@ -1024,7 +1016,7 @@ COpenWithMenu::SHEOW_LoadOpenWithItems(IDataObject *pdtobj)
LPCITEMIDLIST pidl; LPCITEMIDLIST pidl;
DWORD dwType; DWORD dwType;
LPWSTR pszExt; LPWSTR pszExt;
static const WCHAR szShortCut[] = { '.', 'l', 'n', 'k', 0 }; static const WCHAR szShortCut[] = L".lnk";
fmt.cfFormat = RegisterClipboardFormatW(CFSTR_SHELLIDLIST); fmt.cfFormat = RegisterClipboardFormatW(CFSTR_SHELLIDLIST);
fmt.ptd = NULL; fmt.ptd = NULL;
@ -1100,7 +1092,7 @@ COpenWithMenu::Initialize(LPCITEMIDLIST pidlFolder,
if (pdtobj == NULL) if (pdtobj == NULL)
return E_INVALIDARG; return E_INVALIDARG;
return SHEOW_LoadOpenWithItems(pdtobj); return LoadOpenWithItems(pdtobj);
} }
HRESULT WINAPI HRESULT WINAPI

View file

@ -1,5 +1,5 @@
/* /*
* Open With Context Menu extension * Open With Context Menu extension
* *
* Copyright 2007 Johannes Anderwald <janderwald@reactos.org> * Copyright 2007 Johannes Anderwald <janderwald@reactos.org>
* Copyright 2009 Andrew Hill * Copyright 2009 Andrew Hill
@ -23,43 +23,44 @@
#define _SHE_OCMENU_H_ #define _SHE_OCMENU_H_
class COpenWithMenu : class COpenWithMenu :
public CComCoClass<COpenWithMenu, &CLSID_OpenWithMenu>, public CComCoClass<COpenWithMenu, &CLSID_OpenWithMenu>,
public CComObjectRootEx<CComMultiThreadModelNoCS>, public CComObjectRootEx<CComMultiThreadModelNoCS>,
public IContextMenu2, public IContextMenu2,
public IShellExtInit public IShellExtInit
{ {
private: private:
LONG wId; LONG wId;
BOOL NoOpen; BOOL NoOpen;
UINT count; UINT count;
WCHAR szPath[MAX_PATH]; WCHAR szPath[MAX_PATH];
HMENU hSubMenu; HMENU hSubMenu;
public:
COpenWithMenu();
~COpenWithMenu();
HRESULT SHEOW_LoadOpenWithItems(IDataObject *pdtobj);
// IContextMenu public:
virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); COpenWithMenu();
virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); ~COpenWithMenu();
virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); HRESULT LoadOpenWithItems(IDataObject *pdtobj);
// IContextMenu2 // IContextMenu
virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi);
virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen);
// IShellExtInit // IContextMenu2
virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);
DECLARE_NO_REGISTRY() // IShellExtInit
DECLARE_NOT_AGGREGATABLE(COpenWithMenu) virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID);
DECLARE_PROTECT_FINAL_CONSTRUCT() DECLARE_NO_REGISTRY()
DECLARE_NOT_AGGREGATABLE(COpenWithMenu)
BEGIN_COM_MAP(COpenWithMenu) DECLARE_PROTECT_FINAL_CONSTRUCT()
COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2)
COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) BEGIN_COM_MAP(COpenWithMenu)
COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit) COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2)
END_COM_MAP() COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu)
COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit)
END_COM_MAP()
}; };
#endif // _SHE_OCMENU_H_ #endif // _SHE_OCMENU_H_