WSLinkWaitCallBackObject (C 函数)

是一个 WSTP 类型,表示有如下声明的函数指针:int function(WSLINK l, void *u),其中 l 是一个 WSTP 连接,u 留待以后使用.

更多信息

范例

基本范例  (1)

#include "wstp.h"

int WaitFunction(WSLINK l, void *unused)
{
    return 0;
}

void f(WSLINK l)
{
    switch(WSWaitForLinkActivityWithCallback(l, (WSLinkWaitCallBackObject)WaitFunction))
    {
        catch WSWAITERROR:
            /* handle the error. */
            break;
        catch WSWAITSUCCESS:
            /* Read the data off the link */
            break;
        catch WSWAITCALLBACKABORTED:
        default:
            /* wait was aborted */
    }
}