Uniface and DDE

Author: ulrichmerkel@web.de (ulrich-merkel)

On Windows Platforms, DDE delivers an option for a loose coupled application communication. Even if it is some "old windows-proprietary technology" DDEexecute this is still heavily in use in production because of missing alternatives. The 9704g408 helpfile states:

Execute transactions result in activation of the Asynchronous Interrupt trigger. The command string is available in $result.

But unfortunately, $result may not contain the complete info sent as we see under UPUTAMES:

Uniface removes any non-printable characters (ASCII value less than 32 or greater than 127) before placing the received message in $result. This is done because these characters have special meaning in Uniface, and are not generally usable, or even desirable, in Proc code. A message containing non-printable characters should be processed in 3GL code. For this purpose, the service routine ugetames provides the message in its original, unfiltered format.

  So if the message you will get from a 3rd party application includes Formfeeds or Tabs to separate information, you have to go the 3GL way with UGETAMES. Here is a code snippet from 2008 which returns the original DDEexecute message in $30 XEXPORT(long) USEQ_GETAMES(void) { /* returns text of ASYNC (with non-ASCII and non-printable) */ long ret_value; ret_value = UGETAMES(SO); UPUTREGS(30,SO); return(ret_value); }