HP NonStop G-Series User Manual
Page 109

User Hook Library
Extending the Tandem DDE Gateway
110838 Tandem Computers Incorporated
8–7
amount of storage to be allocated for the converted data. This storage is allocated by the
Tandem DDE Gateway and the TdmgwHookDdeRequest function is called.
In this function you convert the data from the Tandem representation to the clipboard
format accepted with the prior TdmgwHookIsConvSupported function. The
TdmgwHookGetRequestDdeSize function and the TdmgwHookDdeRequest function
are not enabled by the TdmgwHookEnableUserHooks function, but they are called
because the pbConvertWithOnlyHookCode flag was set by the prior
TdmgwHookIsConvSupported function.
When your client does a DDE Execute function with a SEND command, the
TdmgwHookPreSendMessage and TdmgwHookPostReplyMessage functions are called.
These functions allow your User Hook Library code to examine and modify the
complete Tandem server request message just before it is sent, and the complete
Tandem server reply message just after it is received by the Tandem DDE Gateway.
These functions must be enabled with the TdmgwHookEnableUserHooks function.
If you return an error from a User Hook Library function (by setting the return value
to zero), then the current processing will be aborted and your client application will
get a DDE “not processed” error.
You can examine and change UMS messages using the User Hook Library
TdmgwHookUmsPostReceiveMessage function.
TdmgwHookDdePoke
This function may be called when your client application does an element-by-element
DDE Poke function.
The function is enabled when the previous call to TdmgwHookIsConvSupported
returns non-zero in both the pbSupportedFormat and pbConvertWithOnlyHookCode
parameters.
Convert the value at lpPokeDataElementValue that is in clipboard format cfFormat to
the correct Tandem data representation at byte address lpBufferOffset. Details of the
data element (such as element name, size, data type) are in the
tagDdeDictElementData structure pointed to by pstructElementData.
Prototype
BOOL FAR PASCAL TdmgwHookDdePoke
(HWND hMainWnd,
in
unsigned long ulInitializeServiceSerialNumber,
in
LPSTR lpServiceName,
in
struct tagDdeDictElementData far * pstructElementData,
in
WORD cfFormat,
in
void far * lpPokeDataElementValue,
in
void far * lpBufferOffset,
out
struct tagTdmgwErrorMsg far * pstructErrMsg);
out
Parameters
Return Value
Zero = Error.
Non-zero = No error.