[ Team LiB ] Previous Section Next Section

The DDE Extension

Dynamic Data Exchange (DDE) is a communication protocol used among Windows applications. The protocol exchanges data with a server identified by name. Each service implements a number of operations known as topics. The data exchange can be synchronous or asynchronous. The dde command is implemented as an extension that is distributed with Tcl. You must use package require dde to load the extension. Table 55-2 summarizes the dde command.

Table 55-2. The dde command options

dde servername ?topic?

Registers the current process as a DDE service with name TclEval and the given topic. If topic is not specified, this command returns the currently registered topic.

dde ?-async? execute service topic data

Sends data to the service with the given topic.

dde ?-async? eval topic cmd ?arg ...?

Sends cmd and its arguments to the TclEval service with the given topic. This is an alternative to the Tk send command.

dde ?-async? poke service topic data

Similar to the execute operation, but some services export operations under poke instead of execute.

dde ?-async? request service topic item

Fetches the named item from the service with the given topic.

dde services server topic

Returns server and topic if that server currently exists; otherwise, it returns the empty string.

dde services server {}

Returns all the topics implemented by server.

dde services {} topic

Returns all servers that implement topic.

dde services {} {}

Returns all server, topic registrations.

    [ Team LiB ] Previous Section Next Section