Progress
External Program
Interfaces


Initiating a Conversation

After defining the DDE frame, invoke the DDE INITIATE statement for the frame, server name, and an available server topic. Most server applications provide a System topic that is available at startup. The data items for this topic generally include application command strings and other information to support DDE interactions with the application. In Progress, you can use this System topic to make other topics available to the client using the DDE EXECUTE statement. After you have made these topics available, you can open additional conversations for them.

The DDE INITIATE statement retrieves a channel number that uniquely identifies the conversation. You use this channel number with other DDE statements to invoke all other exchanges in the conversation.

For example, the following code fragment opens a conversation with Microsoft Excel’s System topic, returning the channel number to sys. It uses the sys conversation to invoke the Excel NEW command, creating an initial Excel worksheet (Sheet1). It then opens a conversation with the Sheet1 topic, returning the channel number to sheet:

DEFINE VARIABLE sys AS INTEGER.
DEFINE VARIABLE sheet AS INTEGER.
                  .
                  .
                  .
DDE INITIATE  sys FRAME FRAME MainFrame:HANDLE
            APPLICATION "Excel" TOPIC "System".
DDE EXECUTE    sys COMMAND "[new(1)]".
DDE INITIATE  sheet FRAME FRAME MainFrame:HANDLE
            APPLICATION "Excel" TOPIC "Sheet1".
                  .
                  .
                  . 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095