2009-05-20 9 views

答えて

0

おかげ共有がインを追加するので、あなたがOnBeginShutdownOnDisconnectionメソッドを実装している必要があり、IDTExtensibility2インタフェースを実装します。 OnDisconnectionはあなたのケースでは、すなわちパワーポイント、あなたのアドインがアンロードされるたびに、OnBeginShutdownは時にホストアプリケーションと呼ばれると呼ばれる、閉じされようとしている:あなたはかなりのunloadイベントを検討するかもしれない

/// <summary> 
///  Implements the OnBeginShutdown method of the IDTExtensibility2 interface. 
///  Receives notification that the host application is being unloaded. 
/// </summary> 
/// <param term='custom'> 
///  Array of parameters that are host application specific. 
/// </param> 
/// <seealso class='IDTExtensibility2' /> 
public virtual void OnBeginShutdown(ref System.Array custom) 
{ 
    // do clean-up when PowerPoint exits. 
} 

注意アンロードイベントは、アドインのクリーンアップが発生する場所であるため、ホストのシャットダウンイベントよりもアドインを実行する必要があります。

関連する問題