我正在尝试使用调用模式单击按钮。
InvokePattern ipAddMPButton = (InvokePattern)aeAddMPButton.GetCurrentPattern(InvokePattern.Pattern);
try
{
ipAddMPButton .Invoke();
}
catch (System.Runtime.InteropServices.COMException e)
{
// TODO
}
它抛出 COMException,我不知道为什么?
当我运行此代码时,实际上按下了按钮并且功能运行良好。但是它只是停止了一段时间,并抛出了这个异常。