Platform SDK: Interprocess Communications

ReuseDDElParam

The ReuseDDElParam function enables an application to reuse a packed DDE lParam parameter, rather than allocating a new packed lParam. Using this function reduces reallocations for applications that pass packed DDE messages.

LPARAM ReuseDDElParam(
  LPARAM lParam,   // posted lParam to be reused
  UINT msgIn,      // received message
  UINT msgOut,     // posted message
  UINT_PTR uiLo,   // low-order word of new lParam
  UINT_PTR uiHi    // high-order word of new lParam
);

Parameters

lParam
[in] Specifies the lParam parameter of the posted DDE message being reused.
msgIn
[in] Specifies the identifier of the received DDE message.
msgOut
[in] Specifies the identifier of the DDE message to be posted. The DDE message will reuse the packed lParam parameter.
uiLo
[in] Specifies the value to be packed into the low-order word of the reused lParam parameter.
uiHi
[in] Specifies the value to be packed into the high-order word of the reused lParam parameter.

Return Values

The return value is the new lParam value.

Remarks

The return value must be posted as the lParam parameter of a DDE message; it must not be used for any other purpose. Once the return value is posted, the posting application need not perform any action to dispose of the lParam parameter.

Use ReuseDDElParam instead of FreeDDElParam if the lParam parameter will be reused in a responding message. ReuseDDElParam returns the lParam appropriate for reuse.

This function allocates or frees lParam parameters as needed, depending on the packing requirements of the incoming and outgoing messages. This reduces reallocations in passing DDE messages.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Dde.h; include Windows.h.
  Library: Use User32.lib.

See Also

Dynamic Data Exchange Overview, Dynamic Data Exchange Functions, FreeDDElParam, PackDDElParam, UnpackDDElParam