private void uiContex3Cmd_BeforeQueryStatus(object sender, EventArgs e)
{
OleMenuCommand menuCommand = sender as OleMenuCommand;
if (menuCommand != null)
{
IntPtr hierarchyPtr, selectionContainerPtr;
uint projectItemId;
IVsMultiItemSelect mis;
IVsMonitorSelection monitorSelection = (IVsMonitorSelection)Package.GetGlobalService(typeof(SVsShellMonitorSelection));
monitorSelection.GetCurrentSelection(out hierarchyPtr, out projectItemId, out mis, out selectionContainerPtr);
IVsHierarchy hierarchy = Marshal.GetTypedObjectForIUnknown(hierarchyPtr, typeof(IVsHierarchy)) as IVsHierarchy;
if (hierarchy != null)
{
if (ProjectHelper.IsCPPProject(projectItemId, hierarchy))
{
menuCommand.Visible = false;
menuCommand.Text = "Convert to x64";
return;
}
}
menuCommand.Visible = false;
}
}