0

C# で AxHost を使用して ActiveX コントロールを埋め込むライブラリを使用するアプリケーションをデプロイしようとしています。

インストールしたアプリをテスト リグで実行すると、次の例外をキャッチして表示します。

Unexpected exception.

This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
   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.AxHost.EndInit()
   at ....InitializeComponent()
   at ...

0x800736B1 をググったので、ファイルを読み込めなかったことを意味することがわかりました。

現在の大きな問題は、ロードできないファイル見つける方法です。

有効にできる何らかのログ機能がありますか、それとも例外から詳細情報を取得できる方法がありますか?

4

1 に答える 1

0

あなたの ActiveX コードでない限り、これは困難または不可能です。ProcessMonitorのようなツールを使用して、失敗したファイル ハンドルを見つけることをお勧めします。コードがある場合は、デバッグ モードで実行するか、ログを改善できます。

もちろん、いつでも試すことができます

アプリケーションを再インストールすると、この問題が解決する場合があります

于 2009-04-21T12:27:13.907 に答える