Exchange data between Visual FoxPro and other Microsoft Windows-based applications.
Remarks
Visual FoxPro can act as both a server and a client to send and receive data to and from other Microsoft Windows-based applications.
The following naming conventions are used in applications that support DDE (dynamic data exchange).
Name | Description |
Service Name | A name that the server responds to when a client tries to access the server. A server can support many service names. |
Topic Name | A name that specifies a logical set of data. For file-based applications, topic names are usually file names. In other applications, topic names are application-specific. To access the server, the client must specify a topic name in addition to the server's service name. |
Item Name | A name that specifies a unit of data that the server can pass to the client requesting the data. |
To request data from another application, create a Visual FoxPro program that establishes Visual FoxPro as a client. Here is a brief outline for creating a simple Visual FoxPro program that requests data from another application:
The functions above establish a cold link. A cold link exists when the client initiates all the communications between the applications. For a discussion of other types of links, see DDEAdvise( ).
The following is a brief outline for a program that establishes Visual FoxPro as a server:
Note that these DDE functions differ from previous Visual FoxPro function conventions in the following ways:
DDE Function | Description |
DDEAbortTrans( ) | Ends an asynchronous DDE transaction. |
DDEAdvise( ) | Creates a notify link or an automatic link used in DDE. |
DDEEnabled( ) | Enables or disables DDE processing or returns the status of DDE processing. |
DDEExecute( ) | Using DDE, sends a command to another application. |
DDEInitiate( ) | Establishes a DDE channel between Visual FoxPro and another Microsoft Windows-based application. |
DDELastError( ) | Returns an error number for the last DDE function. |
DDEPoke( ) | Sends data between client and server applications in a DDE conversation. |
DDERequest( ) | Requests data from a server application in a dynamic DDE conversation. |
DDESetOption( ) | Changes or returns DDE settings. |
DDESetService( ) | Creates, releases, or modifies service names and settings in Visual FoxPro. |
DDESetTopic( ) | In a DDE conversation, creates or releases a topic name from a service name. |
DDETerminate( ) | Closes a DDE channel established with DDEInitiate( ). |