CallRemote function
Makes a remote call to the specified vault.
Syntax
Function CallRemote (ShareName, DocGlobalID, FunctionName, _ FunctionArguments, TimeOut)
Return value
When successful, returns the result of the remote function. This may be a variant, including a variant array. When an error occurred, returns the string CallRemote: followed by the error message. When a timeout occurred, returns Null.
Remarks
All remote calls are performed using the account specified in the configuration of the share as described in Creating and editing a share and therefore require basic authentication. If the existing site must use Windows authentication only, see Creating a GCF website with basic authentication.
Example
Assume the following VBScript function is defined at the remote vault:
Function RemoteFunction (Argument1, Argument2)
Dim vResult (4)
vResult (0) = "Argument 1 = " & Argument1
vResult (1) = "Argument 2 = " & Argument2
vResult (3) = "Local Vault = " & Vault.Name
vResult (4) = "Current document = " & Document.Filename
RemoteFunction = vResult
End Function
The function can be called remotely by using the following VBScript:
Dim objGCFSupport
Set objGCFSupport = CreateObject("BlueCieloECM.GcfSupport")
Dim vArgs (2)
vArgs (0) = "Argument 1"
vArgs (1) = "Argument 2"
vReturn = objGCFSupport.CallRemote("OtherShare", Document.GlobalID, _ "RemoteFunction", vArgs)
Set objGCFSupport = Nothing
If IsArray (vReturn) Then
s = ""
For i = LBound (vReturn) To UBound (vReturn)
s = s & vReturn (i) & vbCrLf
Next
WinMsgBox s
End If