Please enable JavaScript to view this site.

ESL Documentation

Subroutine

Register an application/topic name pair with the DDE DLL.

 

call DDERegisterServer ( AppName_SV, Topic_SV, WildCard_BV )

 

AppName_SV is a string value representing the DDE application name by which the server is to be known.  This cannot be a zero-length string.

Topic_SV is a string value representing the associated DDE topic name of the server. This cannot be a zero-length string.

WildCard_BV is a boolean value.  When set to true, the server responds to all client requests that match based on the DDE protocol rules.  (See the table under Description.) When set to false, the server responds only to exact matches.

Description

Called by the server.  This subroutine registers an application/topic name pair with the DDE DLL.  Once this subroutine is called, the DDE DLL responds to all DDE conversation initiation attempts (according to the DDE protocol rules outlined below) by performing the following tasks:

 

Sending the WM_DDE_INITIATEACK message to the partner (thereby accepting the conversation).

 

Invoking a DDE_INITIATE event in the ESL program.

 

The DDE protocol requires that a server respond to client initiation requests according to the following rules:

Application Name

Topic Name

Server Responds Once

zero-length

zero-length

For each application/topic pair it supports.

zero-length

specified

If it supports that topic.

specified

zero-length

For each specified topic it supports, if the application name matches the servers.

specified

specified

If it supports that topic under that application name.

The DDE DLL keeps a list of all application/topic name pairs registered by the ESL server application, and follows the rules outlined above based on the list in effect at the time a WM_DDE_INITIATE message is received.

 

The DDE DLL will not respond based on the first three rules above for any application/topic pair registered with WildCard_BV set to false.  This is useful for servers that want to respond to requests from clients that specify a particular instance of that server.

 

Many DDE-compliant applications use their application name, appended with the ID (available to an ESL program through DDEGetPID) for this purpose.  Such a server would probably register each topic that it supports under its regular name, with WildCard_BV set to true, and then register each topic again with the instance-specific name, with WildCard_BV set to false.  This would allow the server to respond to requests from clients that know the ID of the instance of the application with which they want to converse.

Example

response to start

   copy "EaselApp" to AppName_SV

   copy "System" to Topic_SV

   copy true to WildCard_BV

   call DDERegisterServer (AppName_SV, Topic_SV, WildCard_BV)

   copy "Hotlink" to Topic_SV

   call DDERegisterServer (AppName_SV, Topic_SV, WildCard_BV)

 

response to start

   copy "Easel" DDEGetPID () to ServerName_SV

   copy "MyTopic" to Topic_SV

   copy false to WildCard_BV

   call DDERegisterServer (ServerName_SV, MyTopic_SV, WildCard_BV)