DDESetTopic( ) Function
Creates or releases a topic name from a service name in a dynamic data exchange (DDE) conversation.
DDESetTopic(cServiceName, cTopicName [, cUDFName]) |
Parameters
- cServiceName
-
Specifies the service name. Additional service names can be created with DDESetService( ).
- cTopicName
-
Specifies the topic name to create or release. If you include cUDFName, DDESetTopic( ) creates the topic name cTopicName. If you omit cUDFName, the topic name cTopicName is released. If cTopicName is an empty string, the user-defined function specified with cUDFName is executed for any topic name that is not explicitly declared.
- cUDFName
-
Specifies the name of the user-defined function executed when a client application makes a request to the topic name. If you omit cUDFName, the topic name cTopicName is released from the service name.
When the user-defined function is executed, it is passed the following six parameters in the order given below:
Parameter Contents Channel Number
The client channel number.
Action
ADVISE, EXECUTE, INITIATE, POKE, REQUEST, or TERMINATE.
Item
The item name; for example, R1C1 for a Microsoft Excel worksheet cell.
Data
Data from the client.
Format
The data format; for example, CF_TEXT.
Advise Status
The link type (0 = manual, 2 = notify or automatic).
The values of the Item, Data, and Advise Status parameters depend on the Action parameter. The following table lists the Action parameter values and the values contained in the Item, Data, and Advise Status parameters. A dash (–) indicates that the parameter value is the empty string.
Action value Item value Data value Advise status INITIATE
–
Topic name
–
TERMINATE
–
–
–
POKE
Item name
New data
–
REQUEST
Item name
–
–
EXECUTE
–
New command
–
ADVISE
Item name
–
Link type
If the user-defined function successfully handles the client request, the user-defined function should return true (.T.). If the request cannot be handled or an error occurs, the user-defined function should return false (.F.). If false is returned when the Action parameter value is INITIATE, the client topic name request is rejected. If false is returned when the value is POKE, REQUEST, or EXECUTE, the request is ignored. If false is returned when the value is ADVISE, the client request for a notify or automatic link is rejected.
Return Value
Remarks
Example
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic