beautypg.com

HP NonStop G-Series User Manual

Page 66

background image

DDE Functions

Creating Client Applications

4–10

110838 Tandem Computers Incorporated

Element-by-Element Approach

To use the element-by-element approach, the DataElementName parameter is set to a
data element name from the Tandem DDE Gateway Data Dictionary you created with
the Bridge program. The data element name uniquely identifies a data item by using
all the levels in the data naming hierarchy for the message (such as READ-
REPLY.EMPLOYEE-TABLE.FIRST-NAME). To find out the DataElementName
parameter, you can use the Browser or the Tandem DDE Gateway Dictionary Report
output by the Bridge. (The Browser also allows you to use “cut and paste” to transfer
the DataElementName into your client application.)

You can subscript the DataElementName parameter with up to seven (7) subscripts
(starting at 1) if the data element is defined in the Tandem DDL as being in a table.
The Tandem DDE Gateway does no subscript limit checking (except to ensure that a
buffer is not overrun).

The data that you identified with the DataElementName is converted from the
Tandem data representation returned by the Tandem server to the clipboard format
that you identified in the DDE Request function. This must be a clipboard format
supported by a data conversion function in the Tandem DDE Gateway.

The data conversion functions provided with the Tandem DDE Gateway support the
CF_TEXT clipboard format in which data consists of a string of characters terminated
with a byte of binary zeros.

The Tandem DDE Gateway also supports a special clipboard format that allows you to
DDE Request individual data elements from the Tandem DDE Gateway without any
automatic data conversion being done. Use the registered clipboard format
TdmgwBinaryElement to DDE Request the data item. The client application must
perform any necessary data conversions on the data that is returned.

You can use the TdmgwBinaryElement clipboard format with any data element name
and the use of subscripts is permitted. Generally, registered clipboard formats cannot
be used with the DDE verbs built into client tools by their publishers and so you must
make calls to the Microsoft DDE Management Library (DDEML). Example client
applications using the DDEML are provided in the EXAMPLES\ subdirectory.

Register the TdmgwBinaryElement clipboard format for use in a client application by
making a Windows RegisterClipboardFormat call. Call RegisterClipboardFormat
during your client application's initialization logic with a single string parameter of
"TdmgwBinaryElement". Use the 16-bit integer that is returned as the clipboard
format parameter in subsequent calls to the DDEML. RegisterClipboardFormat is in
the Windows USER library.

You can support additional clipboard formats by creating a User Hook Library. See
Section 8, “Extending the Tandem DDE Gateway,” for detailed information on how to
do this. For detailed information on how data items are converted, see Section 6,
“Data Conversion.”