UINT DdeQueryConvInfo(hConv, idTransaction, lpConvInfo) | |||||
HCONV hConv; | /* handle of conversation | */ | |||
DWORD idTransaction; | /* transaction identifier | */ | |||
PCONVINFO lpConvInfo; | /* address of structure with conversation data | */ |
The DdeQueryConvInfo function retrieves information about a dynamic data exchange (DDE) transaction and about the conversation in which the transaction takes place.
hConv
Identifies the conversation.
idTransaction
Specifies the transaction. For asynchronous transactions, this parameter should be a transaction identifier returned by the DdeClientTransaction function. For synchronous transactions, this parameter should be QID_SYNC.
lpConvInfo
Points to the CONVINFO structure that will receive information about the transaction and conversation. The cb member of the CONVINFO structure must specify the length of the buffer allocated for the structure.
The CONVINFO structure has the following form:
#include <ddeml.h>
typedef struct tagCONVINFO { /* ci */
DWORD cb;
DWORD hUser;
HCONV hConvPartner;
HSZ hszSvcPartner;
HSZ hszServiceReq;
HSZ hszTopic;
HSZ hszItem;
UINT wFmt;
UINT wType;
UINT wStatus;
UINT wConvst;
UINT wLastError;
HCONVLIST hConvList;
CONVCONTEXT ConvCtxt;
} CONVINFO;
For a full description of this structure, see the Microsoft Windows Programmer's Reference, Volume 3.
The return value is the number of bytes copied into the CONVINFO structure, if the function is successful. Otherwise, it is zero.
Use the DdeGetLastError function to retrieve the error value, which may be one of the following:
DMLERR_DLL_NOT_INITIALIZED
DMLERR_NO_CONV_ESTABLISHED
DMLERR_NO_ERROR
DMLERR_UNFOUND_QUEUE_ID
DdeConnect, DdeConnectList, DdeQueryNextServer