StopHotLink

Description

Terminates a hot link with a DDE server application.

Caution

All arguments must match the arguments in an earlier StartHotLink call.

Syntax

StopHotLink ( location, applname, topic )

Argument

Description

location

A string whose value is the location at which you want to end the hot link, as specified in the StartHotLink function that established the link

applname

A string whose value is the DDE name of the server application, as specified in the StartHotLink function

topic

A string identifying the data or the instance of the application in which the hot link is stopped, as specified in the StartHotLink function


Return value

Integer.

Returns 1 if it succeeds. If an error occurs, StopHotLink returns a negative integer. Values are:

-1 -- Link was not started

-2 -- Request denied

-3 -- Could not terminate server

If any argument's value is null, StopHotLink returns null.

Examples

If another PowerBuilder application called StartServerDDE to establish itself as a server using the name MyPBApp, then your application can act as a DDE client and call StartHotLink to establish a hot link with MyPBApp. The following statement ends that hot link. The values you specify for location and topic depend on conventions established by MyPBApp:

StopHotLink("Any", "MyPBApp", "Any")

This statement stops the hot link with Microsoft Excel for row 1 column 2 in the spreadsheet REGION.XLS:

StopHotLink("R1C2", "Excel", "Region.XLS")

See also

StartHotLink