DdeDisconnect function (ddeml.h)

Terminates a conversation started by either the DdeConnect or DdeConnectList function and invalidates the specified conversation handle.

Syntax

BOOL DdeDisconnect(
  [in] HCONV hConv
);

Parameters

[in] hConv

Type: HCONV

A handle to the active conversation to be terminated.

Return value

Type: BOOL

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

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

Remarks

Any incomplete transactions started before calling DdeDisconnect are immediately abandoned. The XTYP_DISCONNECT transaction is sent to the Dynamic Data Exchange (DDE) callback function of the partner in the conversation. Generally, only client applications must terminate conversations.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ddeml.h (include Windows.h)
Library User32.lib
DLL User32.dll

See also

Conceptual

DdeConnect

DdeConnectList

DdeDisconnectList

Dynamic Data Exchange Management Library

Reference

XTYP_DISCONNECT