The following code works fine in AGD 10.3.1, but managed debug assistant throws a PInvokeStackImbalance error in AGD 10.4 (ESRI.ArcGIS.ADF.Local!ESRI.ArcGIS.ADF.Native::memcpy). Any fix other than ignoring this kind of exception?
private void LoadCustomizations()
{
try
{
ICommandBar pContextMenu = GetCommandBar("{7D931EAE-D31F-11D2-9F40-00C04F6BC78E}");
if (pContextMenu == null)
{
return;
}
UID pUIDSubmit = new UID();
pUIDSubmit.Value = "SubmitVersion.cmdSubmitVersion";
Object indexObj = Type.Missing;
ICommandBar subVercmd = pContextMenu.Add(pUIDSubmit, ref indexObj) as ICommandBar;
((ICommandItem)pContextMenu).Refresh();
m_isMenuPresent = true;
}