beautypg.com

HP NonStop G-Series User Manual

Page 116

background image

User Hook Library

Extending the Tandem DDE Gateway

8–14

110838 Tandem Computers Incorporated

If pbSupportedFormat is zero, then you can do the data conversion in your User Hook
Library by returning non-zero in pbSupportedFormat and non-zero in
pbConvertWithOnlyHookCode.

If pbSupportedFormat is non-zero, you can force the client application to hunt for
another clipboard format by setting pbSupportedFormat to zero. If your User Hook
Library contains TdmgwHookDdePokePreConvert and/or
TdmgwHookDdeRequestPostConvert functions, this is useful if you want the client
application to hunt until it gets to a clipboard format that can be understood by those
functions.

Prototype

BOOL FAR PASCAL TdmgwHookIsConvSupported

(HWND hMainWnd,

in

unsigned long ulInitializeServiceSerialNumber,

in

LPSTR lpServiceName,

in

struct tagDdeDictElementData far * pstructElementData,

in

WORD cfFormat,

in

int nDdePokeOrRequest,

in

BOOL far * pbSupportedFormat,

in/out

BOOL far * pbConvertWithOnlyHookCode,

out

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 Gateway is started. Rolls over to zero
after 4,294,967,295.

lpServiceName

Current ServiceName object (from
INITIALIZESERVICE command).

pstructElementData

Description of current data element. (See the
“Tandem DDE Gateway Dictionary Structure”
topic).

cfFormat

Clipboard format of DDE Request function.

nDdePokeOrRequest

Indicates whether the call to the User Hook Library
was caused by a DDE Poke or a DDE Request
function:

TDMGW_HOOK_DDE_POKE = DDE Poke

TDMGW_HOOK_DDE_REQUEST = DDE Request

pbSupportedFormat

Zero = Data conversion between cfFormat and
Tandem data representation is not supported.
Non-zero = Data conversion between cfFormat and
Tandem data representation is supported.