Please enable JavaScript to view this site.

ESL Documentation

Function

Initiate a single conversation with an application/topic name pair.

 

DDEInitiate ( AppName_SV, Topic_SV )

 

AppName_SV is a string value representing the server's DDE application name.  (If the server is an ESL program, it is the registered name.) AppName_SV cannot be a zero- length string.

Topic_SV is a string value representing the server's associated DDE topic name.  (If the server is an ESL program, it is the registered name.) Topic_SV cannot be a zero-length string.

Description

Called by the client.  This function attempts to initiate a single conversation on a specific application/topic pair. AppName_SV and Topic_SV may have been obtained from a previous poll.  Note that this does not guarantee that a conversation will be started.

 

This function returns a conversation ID if it has successfully acknowledged a conversation; otherwise the function returns 0.

 

If a conversation is established, then the client application will receive a DDE_INITIATEACK event to confirm that all the messages associated with the DDEInitiate have been processed. The client application must ensure all DDEInitiate messages have been handled before continuing the DDE conversation.

Message

Broadcasts a WM_DDE_INITIATE message.

 

Having accepted the WM_DDE_ACK message from the first server that responds to the WM_DDE_INITIATE message, the client sends a WM_DDE_TERMINATE message to all servers who subsequently respond to this broadcast.

 

To prevent this function from stalling, it is possible to set a timeout option. To set the timeout, call the DDESetTimeOut routine.

Example

response to InitiateKey

   copy "Easel" to AppName_SV

   copy "MyTopic" to Topic_SV

   copy DDEInitiate (AppName_SV, Topic_SV) to ConvID_IV

   if (ConvID_IV = 0) then

       send "Conversation is not established \n" to errorlog

   end if

 

response to stimulus DDE DDE_INITIATEACK      # The initiate as been accepted

       make ConnectKey green