From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
|
#include <stdio.h>如上所述,用户如果输入的是0,则DLL返回0,当用户输入55,(一个非0数),DLL则返回1。
#include "LVbool.h"
// This code shows how to pass a LVBoolean to a DLL built with LabVIEW 6.0. To do this,
// pass an int to the DLL using a 0 for false and 1 (or anything but 0) for a true.
int main(void)
{
int var1, var2;
scanf("%d", &var1);
var2 = LVbool(&var1);
printf("%d", var2);
return(0);
}
C:\TEMP\LVBOOL\DEBUG>boolNote: 上面的程序是在Visual C++中编译的,但你必须把位于<labview>cintools路径中的下列文件添加到你的工程中:
0
0
C:\TEMP\LVBOOL\DEBUG>bool
55
1
|