XTYP_CONNECT

3.1

#include <ddeml.h>

XTYP_CONNECT
hszTopic = hsz1;                  /* handle of topic-name string      */
hszService = hsz2;                /* handle of service-name string    */
pcc = (CONVCONTEXT FAR *)dwData1; /* address of CONVCONTEXT structure */
fSameInst = (BOOL) dwData2;       /* same instance flag               */

A server's DDE callback function receives this transaction when a client specifies a service name that the server supports and a topic name that is not set to NULL in a call to the DdeConnect function.

Parameters

hszTopic

Value of hsz1. Identifies the topic name.

hszService

Value of hsz2. Identifies the service name.

pcc

Value of dwData1. Points to a CONVCONTEXT data structure that contains context information for the conversation. If the client is not a DDEML application, this parameter should be set to zero.

fSameInst

Value of dwData2. Specifies whether the client is the same application instance as the server. If this parameter is TRUE, the client is the same instance; if this parameter is FALSE, the client is a different instance.

Return Value

To allow the client to establish a conversation on the specified service/topic name pair, a server's DDE callback function should return a nonzero value. To deny the conversation, it should return zero. If the callback function returns a nonzero value and a conversation is successfully established, the system passes the conversation handle to the server by issuing an XTYP_CONNECT_CONFIRM transaction to the server's DDE callback function (unless the server specified the CBF_FAIL_CONNECT_CONFIRMS flag in the DdeInitialize function).

Comments

If the server application specified the CBF_FAIL_CONNECTIONS flag in the DdeInitialize function, this transaction is filtered.

A server cannot block this transaction type; the CBR_BLOCK return value is ignored.

See Also

DdeConnect, DdeInitialize