HP NonStop G-Series User Manual
Page 77
![background image](/manuals/398537/77/background.png)
Application Design Considerations
Creating Client Applications
110838 Tandem Computers Incorporated
4–21
Use the Tandem DDE Gateway binary-pass-through approach.
Use the TdmgwBinaryElement registered clipboard format. For details, see the
descriptions of DDE Poke and DDE Request in the DDE Functions topic earlier in
this section of the manual.
Develop a custom data conversion function for your binary data, possibly using a
clipboard format other than CF_TEXT. Implement the custom conversion function
in the Tandem DDE Gateway User Hook Library. Identify the items needing the
custom conversion by entering a directive into the DDL source used when you run
the Bridge program. This flag is transferred to the Tandem DDE Gateway
Dictionary on the workstation so that your User Hook Code can identify the items
needing special conversions. For an example, see the EXAMPLES\USERHOOK
subdirectory.
Client Application
Literal Limits
When designing your application, consider your development tool’s storage of literals.
Data element names in DDE Poke and DDE Request functions will often be literals,
and in a large application a large number of these DDE functions might be used. You
need only consider the literal storage if you are using the DDE element-by-element
approach (where many different data element names are used).
In Microsoft Visual Basic (Version 1.0), each form, module, and global module gets its
own data segment (up to 64K) for the allocation of all static data, strings, and simple
variables (declared in the General section and Sub and Function procedures). Each
array of any data type gets its own data segment, up to 64K.
In the C language, limits depend on the memory model you use. Also, consider how
many application executables are in your application and whether some application
functions are in dynamic link libraries. In applications where you plan to put a great
many DDE Poke and DDE Request functions in one Windows executable, consider
using Windows string resources to store data element names.
Using Microsoft Excel
You can use Microsoft Excel, a spreadsheet program, to develop a Tandem DDE
Gateway client application. To do this, create an Excel macro sheet and write a macro
using the Excel functions INITIATE, TERMINATE, EXECUTE, POKE, and REQUEST.
An example Excel client application is provided with the Tandem DDE Gateway in the
\EXAMPLES subdirectory.
Consider the following when writing the Excel macro:
You can POKE only one cell at a time and that cell must contain either a string, a
number, or be left blank. Excel Boolean values and errors (such as #NULL,
#VALUE, #N/A) are not accepted by the Tandem DDE Gateway.
The POKE function data reference should be to a spreadsheet cell and not be a
literal string. For example, POKE(channel, "FIRST-NAME", "ROGER") should not
be used. Although this format is accepted by Excel, it does not cause Excel to
actually do a DDE POKE function. Replace the string "ROGER" with a reference to
a cell containing the string "ROGER".