Describes a routine that is defined on a remote server. After Declare the routine can be called with the Call method.
object.Declare(Library, Procedure[, Alias][, Returns ][, Arguments])
Newlook Smartclient
Newlook Server
Library - (String, Required)
Specifies the name of the library on the remote server that contains the routine to be executed.
Procedure - (String, Required)
Specifies the name of the routine as it is defined on the remote server.
Alias - (String, Optional)
Specifies an alternate name that you can use in the Call method.
Returns - (String, Optional)
Specifies the data type of the return value from the routine.
Arguments - (String, Optional)
Describes the parameters required by the external routine.
The types supported are Byte, Boolean, Integer, Long, Single, Double, String, and WString.
The following example shows an RPC call being performed after an inital RPC Connect Method and Declare Method. VB SCRIPT'Connect to the server App.RpcConnect "SampleConnect", "Network Address=192.168.1.1;Network Port=8475;Use Encryption for Data=False;User ID=test;Password=test;Host CCSID=37;NLV=2924" 'Declare the RPC procedure SampleConnect.Declare "*LIBL", "QWCCVTDT", "ConvertDateFormat", "", "Input IFormat As String * 10, Input IVariable As String * 17, Input OFormat As String * 10, Output fldOutputVariable As String * 17, InputOutput ErrCode As String * 8" 'Call the ConvertDateFormat procedure. SampleConnect.Call "ConvertDateFormat", "InputFormat,InputValue,OutputFormat,OutputValue,ErrorCode", "" 'Disconnect the connection SampleConnect.Disconnect
JSCRIPT'Connect to the server App.RpcConnect ("SampleConnect", "Network Address=192.168.1.1;Network Port=8475;Use Encryption for Data=False;User ID=test;Password=test;Host CCSID=37;NLV=2924"); 'Declare the RPC procedure SampleConnect.Declare ("*LIBL", "QWCCVTDT", "ConvertDateFormat","", "Input IFormat As String * 10, Input IVariable As String * 17, Input OFormat As String * 10, Output fldOutputVariable As String * 17, InputOutput ErrCode As String * 8"); 'Call the ConvertDateFormat procedure SampleConnect.Call ("ConvertDateFormat","InputFormat,InputValue,OutputFormat,OutputValue,ErrorCode", ""); 'Disconnect the connection SampleConnect.Disconnect; |
© 2004-2021 looksoftware. All rights reserved.