jRCS Server Installation
jRCS uses XML over TCP/IP to communicate with the host, so the client library is not really necessary. However, recognizing the fact that XML is not straight and easy to interpret in all programming languages, it was decided to create a client library written in C++ to simplify this task. The Windows-based ActiveX client we supply is installed in the $JBCRELEASEDIR\JRCSCLIENT folder or in C:\Program Files\JRCSCLIENT if $JBCRELEASEDIR is unavailable on the client computer. Please note that the jRCS client does not require the installation of any jBASE libraries on the client computer.
The C++ dynamic-link library, along with the export library is installed in subfolder lib of the client installation folder. The include folder contains the header files required to compile the client programs, and the OS folder contains OS-specific dependencies of the include files. In order to compile a program using jRCS client, the environment in Microsoft Visual C++ must include the path to the client‟s include folder for pre-processor and lib folder for linker dependencies. The client must also specify jrcs.lib in the list of libraries the program links with. The installation automatically adds jrcs.dll to the system path, so the dynamic loader can find the library on program start-up.
On Windows systems, jRCS adds another layer enabling interoperability with ActiveX containers, such as Visual Basic. The installer writes the library jrcax.dll into the lib folder, along with jRCS.dll. The library is registered on the system as an ActiveX DLL and is accessible from Visual Basic via a list of references. The ActiveX library exposes a full set of jRCS functions to the client, along with error constants and I/O handler interface.
Sample Program using jRCS for ActiveX
In order to test how jRCS can be called from Visual Basic, you need to perform the following steps:
Private Sub Command1_Click()
Dim Conn As New jConnection
Conn.Open "host", , "TEST", "Test035J"
Set TestFile = Conn.OpenFile("TEST")
Replace the name "host" on the open line with the name of your host machine and the blank quote with the password for user TEST.
001 Attribute 1
002 Attribute 2
Your test is now complete. The jRCS ActiveX library is self-documenting, so looking at it in VB‟s Object Browser should give the developer a clear idea of what functions are exposed and how they work.
For a VB.NET project, a reference would need to be added for "JRClient.NET".
The equivalent VB.NET code for the above would be:
Private Sub Command1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Command1.Click
Dim Conn As New jConnection
At the top of the form, the following line will also be required:
otherwise explicit references will need to be used within your code.