The DdeDisconnect function terminates a conversation started by either the DdeConnect or DdeConnectList function and invalidates the specified conversation handle.
BOOL DdeDisconnect(
HCONV hConv | // handle to conversation |
); |
Parameters
hConv
Identifies the active conversation to be terminated.
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 may be one of the following values:
DMLERR_DLL_NOT_INITIALIZED
DMLERR_NO_CONV_ESTABLISHED
DMLERR_NO_ERROR
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.
See Also
DdeConnect, DdeConnectList, DdeDisconnectList, XTYP_DISCONNECT