Click to Rate and Give Feedback

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual Studio Automation and Extensibility Reference
DTEEventsClass.OnMacrosRuntimeReset Event

This event supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Occurs when the common language runtime resets, clearing all global variable data and losing all event connections.

Namespace: EnvDTE
Assembly: EnvDTE (in envdte.dll)

Visual Basic (Declaration)
Public Event OnMacrosRuntimeReset As _dispDTEEvents_OnMacrosRuntimeResetEventHandler Implements _dispDTEEvents_Event.OnMacrosRuntimeReset
Visual Basic (Usage)
Dim instance As DTEEventsClass
Dim handler As _dispDTEEvents_OnMacrosRuntimeResetEventHandler

AddHandler instance.OnMacrosRuntimeReset, handler
C#
public virtual event _dispDTEEvents_OnMacrosRuntimeResetEventHandler _dispDTEEvents_Event.OnMacrosRuntimeReset
C++
public:
virtual event _dispDTEEvents_OnMacrosRuntimeResetEventHandler^ OnMacrosRuntimeReset {
    void add (_dispDTEEvents_OnMacrosRuntimeResetEventHandler^ A_1) = _dispDTEEvents_Event::OnMacrosRuntimeReset::add;
    void remove (_dispDTEEvents_OnMacrosRuntimeResetEventHandler^ A_1) = _dispDTEEvents_Event::OnMacrosRuntimeReset::remove;
}
J#
J# supports the use of explicit interface implementations, but not the declaration of new ones.
JScript
JScript supports the use of events, but not the declaration of new ones.

If you connect event handlers not in the EnvironmentEvents host item or initialize global variables, you must re-execute that code in the OnMacrosRuntimeReset event handler, because resetting the macros runtime destroys global variable values and event connections.

Visual Basic
Public Sub DTEEvents_OnMacrosRuntimeReset() Handles DTEEvents.OnMacrosRuntimeReset
    MsgBox("The CLR is being reset.")
End Sub
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker