DdeCallback_PokeΒΆ
DdeCallback_Poke is called by the client to send data to UniPlot.
-
bool = DdeCallback_Poke(hConv, ssItem, ssTopic, ssData)
Return Value
bool is TRUE (1) if the function call was successful, otherwise FALSE (0).
Parameters
-
hConv
hConv is the channel number.
-
ssItem
ssItem is the item name.
-
ssTopic
ssTopic is the topic name.
-
ssData
ssData is the data send to UniPlot.
Example
The following Word-Basic program sends data to UniScript using the function DdeCallback_Poke:
Sub Main
chan = DDEInitiate("UniPlotSL", "xydata")
DDEPoke(chan, "xydata", "1,5,3,4,8,12")
DDETerminate(chan)
End Sub
The Word-Basic command DDEPoke(chan, "xydata", "1,5,3,4,8,12")
,
should create a diagram with a x/y dataset in UniPlot. To do so, we have
to make the following changes to the DdeCallback_Poke function in
the UniPlot/script/obj_dde.ic
file:
def DdeCallback_Poke(hConv, ssItem, ssTopic, ssData)
{
printf("---Poke---\n";
printf("Conversation-No.: %x, Item: %s, Topic: %s, Data: %s\n\n", ..
hConv, ssItem, ssTopic, ssData);
ss = strtok(ssData, ",")
rvData = strtod(ss)
plot(1:len(rvData), rvData);
return TRUE;
}
See also
Overview DDE, DdeCallback_Connect, DdeCallback_ConnectConfirm, DdeCallback_Disconnect, DdeCallback_Request, DdeCallback_Execute
id-105871