HP NonStop G-Series User Manual
Page 65

DDE Functions
Creating Client Applications
110838 Tandem Computers Incorporated
4–9
If the DataElementValue is too large or too long to fit in its intended place in the
message, then it will lose trailing characters (if alphanumeric) or leading digits (if
numeric).
Examples:
POKE ("READ-REQUEST.EMPNUM", "23")
POKE ("MONTHLY-COUNT(12,2)", "-47")
POKE ("UPDATE-REQUEST.SALARY", "12939.93")
POKE ("UPDATE-REQUEST.FIRST-NAME", "ROGER")
POKE ("UPDATE-REQUEST.COMMENT-FIELD", "")
Note
The examples above all use literals for the DataElementValue. Client application and tools can also use
variables, but the syntax used depends on the application or tool being used.
Binary-Pass-Through Approach
To use the binary-pass-through approach, set the DataElementName to the reserved
name _TDMGW-BINARY-BUFFER. You must use the standard clipboard format
CF_TEXT or the registered clipboard format TdmgwBinaryBuffer. Prior to issuing the
DDE Poke function, your client application must define a message buffer and fill it
with converted application data.
Your client application is responsible for converting the data in the buffer to the data
representation required by the Tandem server. You can find details of the data
conversion functions provided with the Tandem DDE Gateway in Section 6, “Data
Conversion.”
Define the buffer with the exact layout required by the Tandem server, but with an
unsigned long integer (4-byte two’s complement number) byte count at the beginning.
Set this count to the length of the buffer excluding the count itself. The count will be
used by the Tandem DDE Gateway and will not be sent to the Tandem server. For
example, a buffer definition in the C language looks like this:
struct tagReadRequest {
unsigned long ulByteCount; // should be set to 2
unsigned int uEmpnum;
};
DDE Request Function
The DDE Request function is used to retrieve data in a Tandem server reply message
from the Tandem DDE Gateway. If the element-by-element approach is being used,
then the data is converted to the clipboard format specified with the DDE Request
function. You can use many DDE Request functions with different DataElementName
parameters to retrieve the individual data elements of the Tandem server reply
message.
Syntax
REQUEST (DataElementName)
REQUEST (DataElementName(Subscript1, ..., Subscript7))