Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
RemoveEventSource Method
Collapse the table of content
Expand the table of content

IVsaCodeItem.RemoveEventSource Method

Removes the specified event source from the code item.

[Visual Basic]
Sub RemoveEventSource( _
   ByVal eventSourceName As String _
)
[C#]
void RemoveEventSource(
   string eventSourceName
);
[C++]
void RemoveEventSource(
   String* eventSourceName
);
[JScript]
function RemoveEventSource(
   eventSourceName : String
);

Parameters

eventSourceName
The programmatic name of the event source to be removed.

Remarks

Removing an event source does not remove the underlying event handler from source text. Rather, events no longer raise notifications to the event handler. Therefore, you will get a compiler error if you delete an event source but leave the underlying function in the source code.

The following table shows the exceptions that the RemoveEventSource method can throw.

Exception Type Condition
EngineClosed The IVsaEngine.Close method has been called and the engine is closed.
EngineBusy The engine is currently executing code for another thread.
EngineRunning The engine is running.
EventSourceNotFound The named event source is not currently in use by the item.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

IVsaCodeItem Interface | IVsaCodeItem Members | Microsoft.Vsa Namespace

Show:
© 2015 Microsoft