DDE_SERVER

4D - Documentation   Français   English   German   DDE_Tools, Contents   DDE_Tools, Index   Back   Previous   Next

version 6.0


DDE_SERVER

ParameterTypeDescription
This command does not require any parameters

Description

4D can be used as a DDE server once DDE_Tools has been installed. Other applications can also open connections using 4D and either request or send data using the DDE_Request and DDE_Poke commands or even yet by provoking 4D command execution using DDE_Execute.

In light 4D's multi-tasking nature, it is absolutely necessary that 4D's DDE server has an execution context. If an application requests the contents of a variable through the DDE_Request command, it is imperative that the developer be able to know in which process this content must be read.

In order for this to happen, you should use the DDE_SERVER command. When applications communicate with the 4D DDE server, the requests are "piled up". When a process executes the DDE_SERVER command, all previously piled requests are carried out using this process' execution content.

To transform 4D into a DDE server, you can create a process whereby the method will periodically call the DDE_SERVER command. All 4D calls will be executed in the context of this process.

If you would like to access the data of the current record, you can also call the DDE_SERVER command in the form method.

For more information about this command, please refer to the section 4th Dimension as DDE Server.

Examples

(1) Here is a typical "DDEServer" project method:

   Repeat
      DDE_Server
      DELAY PROCESS(Process number; 60)
   Until (<>MustQuit)

This method can be launched from the On Startup Database Method:

   <>MustQuit := False
   Mymethod:=New process("DDEServer"; 32000; "Process DDE")

(2) In the event that you must access the current record's data, you can place the following code in the form method of the entry form displaying the values that you wish to get back in the client DDE application:

      `Entry Form Method
   Case of
      :(Form event=On Load)
         SET TIMER(30)
      :(Form event=On Timer)
         DDE_SERVER
   End case

See Also

4th Dimension as DDE Server.


4D - Documentation   Français   English   German   DDE_Tools, Contents   DDE_Tools, Index   Back   Previous   Next