How to Set Up Asynchronous DDE TransactionsLast reviewed: October 18, 1996Article ID: Q109853 |
The information in this article applies to:
SUMMARYBy default, a dynamic data exchange (DDE) conversation is processed synchronously. This means the application waits for a response from the other application before continuing execution. Therefore, a synchronous transaction does not allow FoxPro for Windows program execution to continue until the server application has processed the DDE request, whereas an asynchronous transaction allows FoxPro for Windows program execution to continue without waiting for the server application. For an example of how to set up an asynchronous transaction, see below.
MORE INFORMATIONThe DDERequest(), DDEExcute(), and DDEPoke() commands support asynchronous transactions. These commands have additional parameters in the form of user- defined functions (UDFs) that are required for asynchronous transactions. When a UDF is specified with the DDERequest(), DDEExcute(), or DDEPoke() functions, this UDF will be called when the server application is finished processing the DDE request. The following code demonstrates how to use the DDEExecute() function asynchronously:
RUN/N c:\winword\WINWORD.EXE channel=DDEInitiate('WinWord','System') IF channel>=0 =DDEExecute(channel,'[FileOpen "c:\winword\GRAPHICS.DOC"]',; 'asyncUDF') WAIT WINDOW "Calling asynchronous UDF" ENDIF =DDETerminate(channel) PROCEDURE asyncUDF && asynchronous transaction UDF PARAMETERS mChannel, mAction, mItem, mData, mFormat, mTransnum DISPLAY MEMORY LIKE m* WAIT RETURN .T.NOTE: The syntax for DDEExecute() is incorrect on page L3-363 of the FoxPro for Windows version 2.6 "Language Reference" manual and in the help file. The correct syntax is DDEExecute(<expN>, <expC1>[, <expC2>])where <expC2> is the name of a UDF.
|
Additional reference words: 5.00 VFoxWin 3.00 FoxWin 2.50 2.50a 2.50b
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |