Tpsec06, 6 data conversion – HP NonStop G-Series User Manual
Page 87

6 Data Conversion
110838 Tandem Computers Incorporated
6–1
Your client application can use two different approaches to sending data to the
Tandem DDE Gateway. Your choice of approach determines the way in which you
convert data between Tandem and workstation data representations and define
message layouts.
If you use the element-by-element approach, the message layouts are defined to
the Tandem DDE Gateway by using the Bridge program and, if your client
application uses the CF_TEXT clipboard format, data is converted automatically
by the Tandem DDE Gateway as you use DDE Poke and DDE Request for each
data element. (If your client application uses the registered clipboard format
TdmgwBinaryElement data is not converted. See Section 4, “Creating Client
Applications” for detailed information.)
If you use the binary-pass-through approach, you define message layouts in your
client application and convert the data with client application logic. In this case
you will find the data conversion library provided with the Tandem DDE
Gateway useful.
Note
You can use both approaches in one client application, one client program, or even one DDE
conversation.
Automatic Data
Conversion
Automatic data conversion functions are provided with the Gateway for most Tandem
data types. Review the automatic data conversion table (Table 6-1) in this section to
see which data types have functions provided and how the data is converted. The
functions provided convert between the listed Tandem data representations and the
Windows clipboard format CF_TEXT.
Note
To provide good Microsoft Excel DDE performance, the Tandem DDE Gateway internally supports the
Excel registered clipboard format XlTable.
If you use the DDE Poke function to send data to the Tandem DDE Gateway in the
CF_TEXT clipboard format, the data is edited by the data conversion functions in the
following way before being converted to the Tandem data representation:
1.
Trailing carriage-return and line-feed characters are removed.
2.
Then, if the string both starts and ends with double-quote characters (“ ”), they are
removed.
Data sent with the DDE Poke function that is destined for a numeric Tandem data item
is not validated. Invalid data results in an invalid conversion (or no conversion) by the
automatic data conversion functions. You should validate data input by the
application user in your client application. Alternatively, you could create a User
Hook Library to perform data validation as data is sent to the Tandem DDE Gateway
with element-by-element DDE Poke functions.