beautypg.com

HP NonStop G-Series User Manual

Page 108

background image

User Hook Library

Extending the Tandem DDE Gateway

8–6

110838 Tandem Computers Incorporated

can understand. Built-in data conversion functions will still be called for the
accepted clipboard format, but you can modify the input or output of the function.

If you want to implement a new data conversion, accept the clipboard format that
you can convert to or from and set the pbConvertWithOnlyHookCode flag; no
built-in data conversion functions will then be called.

When your client application does a DDE Poke function and you are supplementing
an automatic data conversion (you accepted the clipboard format in the
TdmgwHookIsConvSupported function, but did not set the
pbConvertWithOnlyHookCode flag), the TdmgwHookDdePokePreConvert function is
called. You can modify the data sent by your client application before it is forwarded
to the built-in data conversion function. The data will be passed to the
TdmgwHookDdePokePreConvert function in the clipboard format accepted by the
prior TdmgwHookIsConvSupported function. The TdmgwHookDdePokePreConvert
function must be enabled by the TdmgwHookEnableUserHooks function.

When your client application does a DDE Request function and you are
supplementing an automatic data conversion (you accepted the clipboard format in
the TdmgwHookIsConvSupported function, but did not set the
pbConvertWithOnlyHookCode flag), the TdmgwHookGetRequestDdeSize and
TdmgwHookDdeRequestPostConvert functions are called. The
TdmgwHookGetRequestDdeSize function allows you to override the amount of
storage to be allocated for the converted data. This is to make space for decoration
data that you might add.

The automatic built-in data conversion is then done, and you can modify the data
returned by the built-in data conversion function with the
TdmgwHookDdeRequestPostConvert function. The data will be passed to the
TdmgwHookDdeRequestPostConvert in the clipboard format accepted by the prior
TdmgwHookIsConvSupported function. The TdmgwHookDdeRequestPostConvert
and TdmgwHookGetRequestDdeSize functions must be enabled by the
TdmgwHookEnableUserHooks function.

When your client application does a DDE Poke function and you are implementing a new
conversion (you accepted the clipboard format in the TdmgwHookIsConvSupported
function and set the pbConvertWithOnly-HookCode flag), the TdmgwHookDdePoke
function is called.

In this function, you do the data conversion. The data will be passed to the
TdmgwHookDdePoke function in the clipboard format accepted by the prior
TdmgwHookIsConvSupported function. The TdmgwHookDdePoke function is not
enabled by the TdmgwHookEnableUserHooks function, but is called because the
pbConvertWithOnlyHookCode flag was set by the prior
TdmgwHookIsConvSupported function.

When your client application does a DDE Request function and you are implementing a
new conversion (you accepted the clipboard format in the
TdmgwHookIsConvSupported function and set the pbConvertWithOnly-HookCode
flag), then the TdmgwHookGetRequestDdeSize and TdmgwHookDdeRequest functions
are called. The TdmgwHookGetRequest-DdeSize function requires you to specify the