EventLogInstaller.CopyFromComponent(IComponent) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Copies the property values of an EventLog component that are required at installation time for an event log.
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)
Parameters
- component
- IComponent
An IComponent to use as a template for the EventLogInstaller.
Exceptions
The specified component is not an EventLog.
-or-
The Log or Source property of the specified component is either null
or empty.
Remarks
The component specified by the component
parameter must be an EventLog; otherwise, an exception is thrown.
Typically, you do not call the methods of the EventLogInstaller from within your code; they are generally called only by the Installutil.exe (Installer Tool). CopyFromComponent is used by Installutil.exe to set the property values for the EventLogInstaller to the values of an existing EventLog.
If the Log of the EventLog that is passed in is an empty string (""), you must set the Log property to a valid value before the installer executes.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om