Remote Procedure Calls
by Bob Worsley
Summary
This is an example of how to send a message between different VDF programs using the packages created by Michael Kurz. If the recipient program is not running it will be activated so that it can receive the message. |
Size: 23 KB |
Download |
Date Created: |
21/01/2012 |
Date Updated: |
23/01/2012 |
Author: |
Bob Worsley
|
Remote Procedure Calls
by Bob Worsley using packages donated by Michael Kurz
Introduction
This is an example of how to send a message between different VDF programs using the packages created by Michael Kurz. If the recipient program is not running it will be activated so that it can receive the message.
The communication between the applications is handled using a technique called Remote Procedure Calls.
The example used here shows you how you can use this technique from within your Visual DataFlex applications.
How to use it
Load the example workspace, compile RPCServerView.src first, then compile RPCClientView.src and run it to show the "client" view. Enter a message in the indicated field and click the button. The "server" program will be activated and show the message.
It's relatively simple to modify an existing set of programs using the code from the example.
1. Copy the indicated code from RPCClientView.src to your .SRC program that you want to use as a client. Repeat for the code in RPCServerView.src. Be sure and copy procedure doCommunicateWithServerView as well.
2. In your client view add whatever code you need to send the appropriate message to your server. In the example, procedure DoCallFromClient.
3. In your server view, add whatever code you need to receive and process the message you want to send from the client. In the example, doReceiveMessage.
That's all there is to it. Easy to use, but a lot under the hood.
OpenWiki Format Parsing Error, no content passed.
Download
RPCTest.zip ~ 23 kB
|