⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sample10dde.c

📁 labwindows 源码 CVI的 DDE数据交换源代码 这是CVI和VB2种平台之间的数据交互
💻 C
字号:
//此程序为主程序,主要是应用DDE库,连接VB和Labwindows/CVI

#include <cvirte.h>    /* Needed if linking in external compiler; harmless otherwise */
#include <userint.h>    /* InstallMainCallback(), RunUserInterface() */
#include <stdio.h>      /* NULL */
#include "sample10svr.h"     /* TRUE, FALSE, ActivateServer(), ActivateClient(),
                           DeactivateServer(), DeactivateClient(),
                           ProcessServerIdleEvent(), ProcessClientIdleEvent() */


int CVICALLBACK MainCallback (int panelOrMenuBar, int controlOrMenuItem, int event,
        void *callbackData, int eventData1, int eventData2);


//主函数
int main (int argc, char *argv[])
{
    if (InitCVIRTE (0, argv, 0) == 0)    /* Needed if linking in external compiler; harmless otherwise */
        return -1;    /* out of memory */
    
    InstallMainCallback (MainCallback, NULL, TRUE);
    SetIdleEventRate (200);
    ActivateServer();
    RunUserInterface();     /* the server will eventually terminate this call */
    DeactivateServer();

    return 0;
}



int CVICALLBACK MainCallback (int panelOrMenuBar, int controlOrMenuItem, int event,
    void *callbackData, int eventData1, int eventData2)
{
    if (event == EVENT_IDLE) {
       // ProcessServerIdleEvent();
#if 0    /* formerly excluded lines */
        ProcessClientIdleEvent();
#endif   /* formerly excluded lines */
        }

    return FALSE;           /* FALSE --> event should not be swallowed */
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -