SetResult Method
Applies To
BasicTcl Object, AdvancedTcl Object
Prototype
SetResult(Interpreter As Long, CommandOutput As String) As Long
Input
The "Interpreter" parameter, which must be a valid interpreter pointer. The "CommandOutput" parameter, which is the desired result for the specified interpreter.
Output
None.
Returns
Undefined.
COM Results
S_OK: Success.
E_INVALIDARG: Either a NULL pointer was passed or the "Interpreter" parameter is invalid.
E_FAIL: A string conversion error occurred.
Side Effects
The current string result for the specified interpreter is set to the value of the "CommandOutput" parameter.
Description
This method is a wrapper around the Tcl_SetResult function.
Notes
None.
Example
Private Sub Command1_Click()
    Dim poTcl As TclBridge.BasicTcl
    Dim plInterpreter As Long
    Dim psResult As String

    Set poTcl = New TclBridge.BasicTcl

    Call poTcl.CreateInterpreter(plInterpreter)

    Call poTcl.SetResult(plInterpreter, "this is the result")

    psResult = vbNullString
    Call poTcl.GetResult(plInterpreter, psResult)

    MsgBox "The result = " & psResult, vbInformation, App.Title

    Call poTcl.DeleteInterpreter(plInterpreter)

    Set poTcl = Nothing
End Sub