EventLogInstaller.CopyFromComponent(IComponent) メソッド

定義

インストール時に必要な EventLog コンポーネントのプロパティ値をイベント ログにコピーします。

public:
 override void CopyFromComponent(System::ComponentModel::IComponent ^ component);
public override void CopyFromComponent (System.ComponentModel.IComponent component);
override this.CopyFromComponent : System.ComponentModel.IComponent -> unit
Public Overrides Sub CopyFromComponent (component As IComponent)

パラメーター

component
IComponent

IComponent にテンプレートとして使用する EventLogInstaller

例外

指定したコンポーネントが EventLog ではありません。

- または -

指定したコンポーネントの Log プロパティまたは Source プロパティが null または空です。

注釈

パラメーターで component 指定するコンポーネントは である EventLog必要があります。それ以外の場合は例外がスローされます。

通常、コード内から の EventLogInstaller メソッドは呼び出しません。通常は 、Installutil.exe (インストーラー ツール) によってのみ呼び出されます。 CopyFromComponentは、 のプロパティ値を既存EventLogの の値EventLogInstallerに設定するために、Installutil.exe によって使用されます。

Log渡される の EventLog が空の文字列 ("") の場合は、インストーラーを実行する前に、 プロパティを有効な値に設定Logする必要があります。

適用対象