Export (0) Print
Expand All

IVsaEngine.InitNew Method

Provides a notification that the initialization phase is complete and that the script engine is prepared for the addition of IVsaItem objects.

[Visual Basic]
Sub InitNew()
[C#]
void InitNew();
[C++]
void InitNew();
[JScript]
function InitNew();

Remarks

Once a script engine has been initialized, by setting the IVsaEngine.RootMoniker and IVsaEngine.Site properties, the InitNew method must be called to enable the addition of IVsaItem objects.

Once the InitNew method has been called, the IVsaEngine.LoadSourceState method can no longer be called, nor can the InitNew method be called subsequently. Furthermore, either the InitNew or LoadSourceState methods must be called before items can be added to the engine using the IVsaItems.CreateItem method.

The following table shows the exceptions that the InitNew 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.
EngineInitialized The engine has already been initialized and cannot be initialized again.
RootMonikerNotSet The IVsaEngine.RootMoniker property has not been set.
SiteNotSet The IVsaEngine.Site property has not been set.

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

IVsaEngine Interface | IVsaEngine Members | Microsoft.Vsa Namespace | IVsaItem | IVsaItems.CreateItem | IVsaEngine.LoadSourceState

Show:
© 2014 Microsoft