Please enable JavaScript to view this site.

ESL Documentation

Invoked in:        

Client

Message from Partner:

WM_DDE_DATA

 

Remarks:

This event is invoked in a client when data has arrived from a server.

Required Response:

Upon receipt of data from a server, the DDE protocol requires that the client respond as follows if the DDE_FACKREQ status flag is set.  (Query the status by calling DDEGetStatus to see if this is true.)  

The client must respond to this event before attempting to transmit another event to the partner.

Acknowledgment

Subroutine Called

Message

Positive

(Data was successfully received)

DDEAck with

DDE_FACK status flag set

WM_DDE_ACK with

DDE_FACK status bit set

Negative

(Data was not successfully received)

DDEAck with

DDE_FACK status flag not set

WM_DDE_ACK with

DDE_FACK status bit cleared

Advise State Notes:

If the client has one or more active advise states, it should query the status (call DDEGetStatus) to see if the DDE_FRESPONSE status flag is set.  If the status flag is not set, this data is offered in response to a previous advise request.

 

How the client can retrieve data depends on whether DDE_FNODATA status flags are set:

If this data is the result of an advise state and the DDE_FNODATA status flag was set when the advise state was established, then the client should not attempt to retrieve the data through DDEGetStringData.  (This will result in an error.)  If the client wants the data, it can request it by calling DDERequest.

 

If the DDE_FNODATA status flag was not set, data was sent.  It must be retrieved now by calling DDEGetStringData.

Default Processing:

The DDE DLL default processing is to send a positive acknowledgment if the ESL program does not send an acknowledgment.

Available Queries:

DDEGetAppName

DDEGetTopic

DDEGetItemName

DDEGetStatus

DDEGetFormat

DDEGetErrorID

 

Example:

response to stimulus DDE DDE_DATA

    copy eventparam to ConvID_IV

    copy DDEGetStatus(ConvID_IV) to Status_IV

    if (not (DDEQueryStatusFlag (Status_IV,

             DDE_FRESPONSE)))

    then

        #This data is part of an ongoing ADVISE

        #to find out if we're getting data

        copy DDEGetItemName(ConvID_IV) to ItemName_SV

        copy DDEGetFormat(ConvID_IV) to Format_SV

        call CheckAdviseData(ConvID_IV, ItemName_SV, Format_SV, Result_BV)

        if (Result_BV) then

            #we are getting data with this message

            #ADVISE was not sent with DDE_FNODATA

            #set

            copy DDEGetStringData(ConvID_IV) to

                StringData_SV

         end if

    else

        #This data is in response to a request

        copy DDEGetStringData(ConvID_IV) to StringData_SV

    end if