CONNX Remote Procedures
A CONNX Remote Procedure is a VMS program or function with which the client computer communicates. The CONNX server, running on the VMS system, passes messages, known as remote procedure calls (RPC), back and forth between the computer application and the VMS-based remote procedure. Since applications can vary widely in functionality, the CONNX server is able to pass the messages without regard to content or format. It is up to the application programmer to ensure both the computer and VMS programs are working within the same message format and structure.
CONNX comes with two sample RPC stubs: RPC_BAS, written in VAX BASIC, and RPC_CPP.RPC, written in DEC C++. They can be found in the directory into which CONNX is installed on the VMS system.
C syntax example:
long rpc (char * lpszRPCName, int nSendLength, char * lpszSendBuff, int nReceiveLength, char * lpszReceiveBuff, int nLog)
The following table describes the parameters:

Parameter | Description
IpszRCPName | Name of the VAX procedure with which to communicate. Maximum length is 16 characters.
NSendLength | Length of IpszSendBuff.
IpszSendBuff | Message to be transmitted to the VAX>
NReceiveLength | Length of IpszReceiveBuff.
IpszReceiveBuff | Message received from the VAX. This buffer must be one byte longer than nReceiveLength.
NLog | Flag that determines if detailed logging message should be sent to standard output (printf).

RPC is a function that returns a long integer representing the status of the function as its value. Unless otherwise altered within the RPC, a success status of 1 is assumed. This status is passed back to the computer as the value of the computer's RPC function. While any value may be assigned, note that only actual VMS status codes may be translated via the vmsstatus function. Consequently, it is recommended that VMS status codes are assigned as the value of the RPC function.
A remote procedure is invoked by the computer via the RPC function available in the CONNX OLE Server.