labview调用c语言dll,Labview调用dll参数设置:结构体、指针、数组、簇

本文详细介绍了如何在LabVIEW中使用Call Library Function Node调用C/C++ DLL,涉及传递和接收整型指针、数组、字符串及结构体的步骤。通过设置不同参数类型,如将Pass设为Pointer to Value来传递指针,或设置数据类型为Array来传递数组。对于字符串和结构体,也有相应的配置方法。同时,文章还讨论了如何处理返回的指针,包括直接解引用和手动解引用内存地址。
摘要由CSDN通过智能技术生成

Passing Pointers

C and C++ functions often accept pointers in their function prototypes. A pointer is basically an integer value representing a memory address.

To pass a pointer to a DLL, that is, the memory address of a value to a DLL from LabVIEW, you have to configure the Call Library Function Node to pass the data by reference, rather than by value. You cannot directly pass in the memory address as LabVIEW does not expose the memory allocation of data to programmers.Passing Pointers to Integers (and other primitives)

The following is the Call Library Function Node configuration for a function that takes a pointer to an integer. The Pass dropdown should be changed to Pointer to Value.

void ReturningValuesByReference_Integer(int x, int y, int *sum);

0db56d494694dfd97c5ae51c827e9086.pngPas

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值