Windows フォーム アプリケーションの起動に問題があります。私のアプリケーションは、AcroPDFLib コンポーネントを使用して Windows フォームで PDF を表示します。アプリケーションを起動すると、上記のエラーが表示されます。StackTrace を見ると、AxHost への呼び出しが複数あることがわかります。これは、AcroPDF ActiveX コンポーネントに関係していると確信しています。Adobe Reader 11 を持っています。
これが私が試したことです:
- IE で Adobe PDF Reader アドインを有効にします。
- [編集] -> [アクセシビリティ] -> [設定アシスタント] で [ブラウザに PDF を表示] 設定を確認します。
- WinForms アプリの再インストール。
- コンピューターを再起動しています。
- インターネット上の他の PDF を開くことができます。
スタック トレースは次のとおりです。
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)