Previous topic

DdeAdvise

Next topic

DdeCallback_Connect

This Page

DdeCallback_AdviseΒΆ

DdeCallback_Advise is called by the server to send data to UniPlot.

bool = DdeCallback_Advise(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

Establish an advise loop with a server:

hconv = DdeInitiate("Service", "Values");
DdeAdvise(hconv, "Data");

The following function will be invoked when the data is changed:

def DdeCallback_Advise(hConv, ssItem, ssTopic, ssData)
{
    printf("---Advise---\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;
}

History

Version Description
5.0.0 New

id-334299