From: This is a command line (aka console) based tool for querying text =
data from=20
DDE servers. It is the counterpart to my much older GUI based tool =
called DDE=20
Query, which is available here, http://www.cix.co.=
uk/~gort/win32.htm#DDEQuery.=20
The tool supports all the major DDE command types, such as =
XTYP_REQUEST,=20
XTYP_ADVSTART, XTYP_POKE & XTYP_EXECUTE via similarly named =
commands. The=20
basic format for invoking DDE Command is to run it with a command type =
and then=20
provide any arguments using switches, e.g. The arguments can be specified using either Windows style (e.g. =
/option) or=20
the more common style (e.g. --option). Each switch has both a short name =
and a=20
longer name and you can see the list of all supported commands using =
"ddecmd=20
-?". Each command has its own help topic that describes it and lists the =
switches that are applicable to it, e.g. ddecmd request -?. This command invokes the XTYP_WILDCONNECT transaction type to list =
the=20
running DDE servers and their supported topics. This transaction type is =
not=20
always supported by servers, and is included more for development use. =
The=20
output is one server and topic per line, separated by a '|', the normal=20
separator used for DDE Links, e.g. The request command is used to retrieve the value for one or more =
items from=20
the server. This is the XTYP_REQUEST transaction type. The items must =
all be=20
from the same server as only a single server and topic can be specified. =
By default the request assumes CF_TEXT (i.e. ANSI text) for the value =
format,=20
but this can be overridden by using the --format switch. See below for =
the=20
format names. To set up one or more advise loops with the server use the advise =
command.=20
This allows you to monitor the updates for a number of items. This =
corresponds=20
to the XTYP_ADVSTART transaction type. The same basic switches that are =
used=20
with the request command can also be used with this one. However, unlike =
the=20
other commands, this causes ddecmd to run indefinitely and so can only =
be=20
stopped by pressing Ctrl+C. The poke command allows you to set a value for an item on servers =
that=20
support it. Unlike the previous request and advise commands you can only =
set the=20
value for a single item and that value will be passed in CF_TEXT format. =
The final transaction type supported is XTYP_EXECUTE via the execute =
command.=20
This is used to send a command string to a server. =
DDE Command v1.0
Introduction
Commands
C:\> ddecmd =
command --option1 value1 --option2 value2
The Servers Command
C:\>ddecmd servers
Excel|System
Excel|[Book1]Sheet3
Excel|[Book1]Sheet2
Excel|[Book1]Sheet1
The Request Command
C:\>ddecmd request --server REUTER --topic IDN_RWS --item =
"GBP=3D,BID ASK" --item "EUR=3D,BID ASK"
+1.9058 +1.9062
+1.2981 +1.2982
The Advise Command
C:\>ddecmd advise -s REUTER -t =
IDN_RWS -i "GBP=3D,BID ASK" -i "EUR=3D,BID ASK"
+1.9060 +1.9062
+1.2981 +1.2986
+1.2980 +1.2982
+1.9059 +1.9064
+1.2978 +1.2983
+1.2982 +1.2984
+1.9059 +1.9062
<CTRL+C>
The Poke Command
C:\>ddecmd poke -s excel -t [book1]sheet1 -i R1C1 --value =
"test"
The Execute Command
C:\>ddecmd execute -s excel -t [book1]sheet1 --command =
"[App.Minimize]"
Clipboard Formats
Format
Description
CF_TEXT
ANSI text.
CF_UNICODETEXT
Unicode text.
This application is freeware - you get what you pay for, nothing = more,=20 nothing less.
The full source code (C++) is available from my web site listed = below.
Using the --version switch will also display my contact details. = Please check=20 the web site for updates.
Email: gort@cix.co.uk
Web: =
www.cix.co.uk/~gort
Chris Oldwood
15th December 2008