This documentation is archived and is not being maintained.

IVsaItem.SetOption Method

Sets implementation-specific options for a script engine.

[Visual Basic]
Sub SetOption( _
   ByVal name As String, _
   ByVal value As Object _
void SetOption(
   string name,
 object value
void SetOption(
   String* name,
 Object* value
function SetOption(
   name : String,
 value : Object


The name of the option to set.
A new value for the option.


Implementation-specific options include, for example, compiler-specific switches passed in to the script engine that turn warnings into exceptions. Consult the documentation for the script engine language to determine which options an engine supports.

The following table shows the exceptions that the SetOption 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.
OptionNotSupported The engine does not support the specified option.
EngineRunning The engine is currently running.
OptionNotSupported The engine does not support the specified option.


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

IVsaItem Interface | IVsaItem Members | Microsoft.Vsa Namespace | IVsaItem.GetOption