Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66844

Efficient way to Pass and Receive Pointers with C/C++ DLLs from LabVIEW

$
0
0

What is the best way to pass a handle by using dll programmed in Labwindows/CVI among Labview library call node?

 

I read a very helpful post on 

https://decibel.ni.com/content/docs/DOC-9080/version/5 about passing and receiving pointers with C dll in Labview.

 

However, my application is to interface Labview with a camera.  In the camera API, it defines 

#define void* CameraHandle

 

And then a variable CamHandle needs to be used by a bunch of other function.

 

In CVI, if not used as dll in Labview,  I would have

void OpenCamera()

{CameraHandle CamHandle;}

 

void SetParameter(CameraHandle CamHandle)

{

}

 

void CloseCamera(CameraHandle CamHandle)

{

}

 

If CamHandle is a void* type, how can I pass it from one node/function to the next in Labview when I use Call Library Function configuration?  In the post I read, it tell how to get the value the pointer points by using pointer to value and then dereferencing pointer.  However, what I need is to pass the pointer itself.  

 

Thank you very much!

 

Best,

Charles


Viewing all articles
Browse latest Browse all 66844

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>