DDEACKNOWLEDGE (send acknowledgement from DDE server)

Top  Previous  Next

 

DDEACKNOWLEDGE( response )

DDEACKNOWLEDGE

Sends acknowledgement of the current DDEPOKE or DDEEXECUTE statement sent to the DDE server.

Response

An integer constant, variable, or expression containing zero (0) or one (1) to indicate negative or positive acknowledgement.

The DDEACKNOWLEDGE procedure allows a DDE server program to immediately acknowledge unsolicited data sent from DDEPOKE, or commands sent from DDEEXECUTE. This allows the client application to immediately continue its processing. Although a CYCLE statement after EVENT:DDEpoke or EVENT:DDEexecute also signals positive acknowledgement to the client, DDEACKNOWLEDGE allows you to send negative acknowledgement.

Example:

 !The client application's code contains:

WinOne  WINDOW,AT(0,0,160,400)

       END

SomeServer LONG

DDEChannel LONG

CODE

OPEN(WinOne)

DDEChannel = DDECLIENT('MyServer','System') !Open a channel to MyServer app

DDEEXECUTE(DDEChannel,'[ShowList]')         !Tell it to do something

 

 

   !The server application's code contains:

WinOne  WINDOW,AT(0,0,160,400)

       END

DDEChannel  LONG

CODE

OPEN(WinOne)

DDEChannel = DDESERVER('MyServer','System') !Open channel

ACCEPT

 CASE EVENT()

 OF EVENT:DDEExecute

  CASE DDEVALUE()                           !Check the requested action

  OF 'ShowList'

  DDEACKNOWLEDGE(1)                        !Send positive acknowledgement

   DO ShowList                              !and take the action

  ELSE                                      !If requested action is unknown

  DDEACKNOWLEDGE(0)                        !Send negative acknowledgement

  END

 END

END

See Also:

DDEPOKE

DDEEXECUTE