DeleteInterpreter Method
Applies To
BasicTcl Object, AdvancedTcl Object
Prototype
DeleteInterpreter(Interpreter As Long) As Long
Input
The "Interpreter" parameter, which must be a valid interpreter pointer.
Output
The "Interpreter" parameter is modified to contain zero.
Returns
Undefined.
COM Results
S_OK: Success.
E_INVALIDARG: Either a NULL pointer was passed or the "Interpreter" parameter is invalid.
E_FAIL: The Tcl API did not appear to delete the interpreter.
Side Effects
During interpreter deletion, various Windows messages may be processed in addition to the normal processing done by Tcl to delete an interpreter.
Description
This method is a wrapper around the Tcl_DeleteInterp function. The interpreter contained in the "Interpreter" parameter is deleted and is set to zero.
Notes
None.
Example
Private Sub Command1_Click()
    Dim poTcl As TclBridge.BasicTcl
    Dim plInterpreter As Long
    Dim psOutput As String

    Set poTcl = New TclBridge.BasicTcl

    Call poTcl.CreateInterpreter(plInterpreter)

    ' psOutput will equal the current clock value in seconds
    ' since the "start of time"

    psOutput = vbNullString
    plResult = poTcl.EvaluateString(plInterpreter, "set x [clock seconds]", psOutput, 0&)

    Call poTcl.DeleteInterpreter(plInterpreter)

    Set poTcl = Nothing
End Sub