beautypg.com

HP NonStop G-Series User Manual

Page 118

background image

User Hook Library

Extending the Tandem DDE Gateway

8–16

110838 Tandem Computers Incorporated

TdmgwHookPreSendMessage

This function may be called when your client application does a DDE Execute function
with a SEND command.

You must enable the function with TdmgwHookEnableUserHooks function by
returning a value with the TDMGW_HOOK_ENABLE_PRE_SEND_MSG bit set.

The function is called immediately before the request message is sent to the Tandem
server.

Prototype

BOOL FAR PASCAL TdmgwHookPreSendMessage

(HWND hMainWnd,

in

unsigned long ulInitializeServiceSerialNumber,

in

LPSTR lpServiceName,

in

char far * lpBufferStartAddress,

in/out

unsigned int uBufferLength,

in

unsigned int uSendLength,

in

struct tagTdmgwErrorMsg far * pstructErrMsg);

out

Parameters

Return Value

Zero = Error.
Non-zero = No error.

hMainWnd

Window handle of Tandem DDE Gateway main
window.

ulInitializeServiceSerialNumber Number incremented with each

INITIALIZESERVICE command. Starts at zero
when the Tandem DDE Gateway is started. Rolls
over to zero after 4,294,967,295.

lpServiceName

Current ServiceName object (from
INITIALIZESERVICE command).

lpBufferStartAddress

Address of start of the message buffer containing
the message data exactly as it will be sent to the
Tandem server.

uBufferLength

Length of the message buffer as configured for the
ServiceName object (MaxSendLength attribute).

uSendLength

Actual number of bytes sent to the Tandem server.
See DDE Execute function SEND command.

pstructErrMsg

See “Returning Error Messages” earlier in this
section.

TdmgwHookUmsPostReceiveMessage

This function is called immediately after the UMS message is received by the Tandem
DDE Gateway.