Platform SDK: Interprocess Communications

DdeAbandonTransaction

The DdeAbandonTransaction function abandons the specified asynchronous transaction and releases all resources associated with the transaction.

BOOL DdeAbandonTransaction(
  DWORD idInst,         // instance identifier
  HCONV hConv,          // handle to conversation
  DWORD idTransaction   // transaction identifier
);

Parameters

idInst
[in] Specifies the application instance identifier obtained by a previous call to the DdeInitialize function.
hConv
[in] Handle to the conversation in which the transaction was initiated. If this parameter is 0L, all transactions are abandoned (that is, the idTransaction parameter is ignored).
idTransaction
[in] Specifies the identifier of the transaction to abandon. If this parameter is 0L, all active transactions in the specified conversation are abandoned.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Errors

The DdeGetLastError function can be used to get the error code, which can be one of the following values:

DMLERR_DLL_NOT_INITIALIZED
DMLERR_INVALIDPARAMETER
DMLERR_NO_ERROR
DMLERR_UNFOUND_QUEUE_ID

Remarks

Only a dynamic data exchange (DDE) client application should call DdeAbandonTransaction. If the server application responds to the transaction after the client has called DdeAbandonTransaction, the system discards the transaction results. This function has no effect on synchronous transactions.

Requirements

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

See Also

Dynamic Data Exchange Management Library Overview, Dynamic Data Exchange Management Functions, DdeClientTransaction, DdeInitialize, DdeQueryConvInfo