Remote Procedure Callsby Bob Worsley
Remote Procedure Callsby Bob Worsley using packages donated by Michael Kurz IntroductionThis 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 itLoad 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. DownloadRPCTest.zip ~ 23 kB |
|||||||||
Copyright © 1999 - 2024 VDF-GUIdance on all material published, for details see our Disclaimer. |