我无法启动Windows窗体应用程序。我的应用程序使用AcroPDFLib组件以Windows窗体查看PDF。当我启动应用程序时,我收到上面指出的错误。看看StackTrace,我发现了对AxHost的多次调用,所以我很确定这与AcroPDF ActiveX组件有关。我有Adobe Reader 11。
以下是我的尝试:
这是堆栈跟踪:
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
答案 0 :(得分:0)
您可能在IE中启用了有问题的加载项。
请转到IE中的加载项并禁用 Adobe Acrobat Sharepoint OpenDocuments Control
加载项。现在检查您的应用程序是否正确启动此插件似乎与Adobe PDF Reader插件冲突。
此插件用于提示用户打开或保存在Sharepoint中单击的PDF文档。如果禁用加载项,PDF将直接在IE中显示。