This documentation is archived and is not being maintained.

IVsaEngine.SaveSourceState Method

Directs the script engine to persist its source state to the specified IVsaPersistSite object.

[Visual Basic]
Sub SaveSourceState( _
   ByVal site As IVsaPersistSite _
void SaveSourceState(
   IVsaPersistSite site
void SaveSourceState(
   IVsaPersistSite* site
function SaveSourceState(
   site : IVsaPersistSite


The site established by the IVsaPersistSite interface to which source state is saved.


The SaveSourceState method calls back to the host-implemented site established by the IVsaPersistSite interface using a call to the IVsaPersistSite.SaveElement method to save the properties and items that comprise the state of the script engine. The script engine calls the IVsaPersistSite.SaveElement method with a null reference to the name parameter to save meta-information for the script engine such as a project file for mapping names to project items.

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

Exception Type Condition
EngineBusy The engine is currently executing code for another thread.
EngineClosed The IVsaEngine.Close method has been called and the engine is closed.
EngineNotInitialized The engine has not been initialized.
EngineRunning The engine is already running.
SaveElementFailed A callback to the IVsaPersistSite.SaveElement method failed.


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

IVsaEngine Interface | IVsaEngine Members | Microsoft.Vsa Namespace | IVsaPersistSite.SaveElement