613-518-1166 info@zimdatabases.com

Zim 9 Connectivity

About DDE Services

< All Topics

About DDE Services
Zim provides DDE services for applications through the function $DDEFunction. These DDE services include the ability to send data to another application, retrieve data from another application, and pass commands to another application. While you can write your own implementation of $DDEFunction, Zim provides a standard implementation in the form of a Dynamic Link Library (DLL) and several Zim programs that provide an easy-to-use interface to the services of the DLL.

Using the DDE Services Provided by ZIM
The actual name of the DLL accessed by $DDEFunction is defined by the DDEFUNC entry in the registry. If you do not have a DDEFUNC entry, the name of the DLL is assumed to be z32dde.dll and the file is assumed to be in the same directory in which your Zim software was installed. Upon Zim installation, the registry value of DDEFUNC is not set because Zim automatically assumes the required values on its absence.

Using Special DDE Services Provided by the User

If you want to use your own special DDE services support, you must build a DLL that follows the same standards as any $UserFunction and set the DDEFUNC registry like this example before starting your Zim for Windows session:


Invoking the DDE Services
The standard DDE services provided by Zim can be accessed in two ways:

through the set of Zim programs that provide an interface to the DDE DLL (z32dde.dll)
by calling $DDEFunction directly (always referencing z32dde.dll)
These two ways distinguish from each other from the fact that the Zim programs are easier to deal with because they provide all error handling and parameter checking and converting. On the other side, the $DDEFunction usage can provide more flexibility but requires more attention from the programmer.

Invoking the DDE Services Through the Zim Interface Programs
Your Zim installation provides a set of Zim programs as a means of an easy interface to DDE services. These programs are located in the $DeployServices directory that must be accessed via the command prior to any reference to these programs:

access $DeployServices

The programs are all compiled, but the corresponding source code is located in the operating system directory “dpserv/dpsdocs”. They implement five different operations against the DDE services as follows:

DDEConnect, which connects to the desired service;

DDEExecute, which executes a specific operation on the service;

DDEPeek, which gets some value from the service;

DDEPoke, which sets any values to the service;

DDEDisconnect, which disconnects and ends to conversation to the service.

Please refer to the corresponding documentation of each of these commands for more details.

Invoking the DDE Services Directly Through $DDEFunction
The DDE services can be accessed by invoking the Zim function $DDEFunction directly. $DDEFunction is invoked with the syntax

$DDEFunction ( p1, p2, p3, … )

where p1, p2, and so on, indicate the desired DDE service and the data required by that service. Specifically, p2 passes the desired operation to be performed against the DDE services. The operations are exactly the same as those provided by the Zim Interface Programs.

Please, refer to the documentation of the function $DDEFunction for more details.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?

Submit a Comment

Your email address will not be published. Required fields are marked *

Table of Contents