Syntax 1: For single DDE requests
Description
Asks a DDE server application to provide data and stores that data
in the specified variable without requiring an open channel. This syntax
is appropriate when you will make only one or two requests of the
server.
Syntax
|
1 |
GetRemote ( location, target, applname, topicname {, bAnsi} ) |
|
Argument |
Description |
|---|---|
|
location |
A string whose value is the location of the data you |
|
target |
A string variable into which the returned data will be |
|
applname |
A string whose value is the DDE name of the DDE server |
|
topicname |
A string identifying the data or the instance of the |
|
bAnsi (optional) |
A boolean identifying whether the string to get from the |
Return value
Integer.
Returns 1 if it succeeds and a negative integer if an error
occurs. Values are:
-1 — Link was not started
-2 — Request denied
If any argument’s value is null, GetRemote returns null.
Usage
When using DDE, your PowerBuilder application must have an open
window, which will be the client window. For this syntax, the active
window is the DDE client window.
For more information about DDE channels and warm and cold links,
see the two syntaxes of the ExecRemote function.
Examples
These statements ask Microsoft Excel to get the data in row 1
column 2 of a worksheet called PROFIT.XLS and put it in a PowerBuilder
string called ls_ProfData. The single GetRemote call establishes a cold
link, gets the data, and ends the link:
|
1 2 3 |
string ls_ProfData GetRemote("R1C2", ls_ProfData, & "Excel", "PROFIT.XLS") |
See also