Advanced COM Result
Result read-only property

Contains the result (if any) of the last operation. Usually this is used when Execute is used to execute a function in the script that returns a value. 

Syntax:

variable = object.Result 

Arguments

 

Examples:

If thread.Wait(30000) Then
  If thread.Success Then
    myvar = thread.Result
    Response.Write myvar
  End If
End If

Remarks:

The Result is the value returned by the last function executed with the Execute method. After a successful completition of an operation/initialization invoked with the Start method it is set to True, but only for some convenience - in general it should be used only if you execute a function that returns a value!

It should be checked after completion of the operation and after ensuring it has been successful (see Success). If a Sub has been executed the value of the Result will be empty.

Note that the value returned by the executed function is "stripped" to value. No objects can be returned! Therefore you should not use Set MyFunction = something as return result in the routine in the thread's script. You can return Arrays but not objects. 

Applies to: COMScriptThread object

newObjects Copyright 2001-2006 newObjects [ ]