GetCompiledState Method
Collapse the table of content
Expand the table of content

IVsaSite.GetCompiledState Method

Gets the compiled state of a script engine, and, optionally, associated debugging information.

[Visual Basic]
Sub GetCompiledState( _
   <Out()> ByRef pe() As Byte, _
   <Out()> ByRef debugInfo() As Byte _
void GetCompiledState(
   out byte[] pe,
   out byte[] debugInfo
void GetCompiledState(
] unsigned char* pe __gc[],
] unsigned char* debugInfo __gc[]
function GetCompiledState(
   pe : Byte[],
 debugInfo : Byte[]


The compiled state of the engine; an assembly in byte form.
The debugging information for the assembly, or a null reference if such information does not exist or is not available.


The host initially stores a script engine's compiled state along with debugging information, if available, using the IVsaEngine.SaveCompiledState method and specifying a location to which the compiled state should be persisted. The compiled state of the engine is uniquely identified by the IVsaEngine.RootMoniker property of the script engine that is currently associated with the IVsaSite object.

If debugging information is not available or does not exist, you will be unable to resolve breakpoints in the debugger.

This method is only called by an engine subsequent to a call by the host to the IVsaEngine.Run method. It should not be called at any other time.

A default implementation of the IVsaSite interface, including use of the GetCompiledState method, is provided in Microsoft.Vsa.BaseVsaSite, which is available on the Visual Studio for Applications SDK. BaseVsaSite implements two properties, Assembly and DebugInfo, to get the compiled state. You can derive from this class to provide specific functionality.

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

Exception Type Condition
GetCompiledStateFailed The compiled state could not be loaded.
CompiledStateNotFound There was no existing compiled state for the engine.
CallbackUnexpected The host was not expecting a call at this time.


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

IVsaSite Interface | IVsaSite Members | Microsoft.Vsa Namespace | IVsaEngine.SaveCompiledState | IVsaEngine.RootMoniker | IVsaEngine.Run

© 2016 Microsoft