Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

pointers to and from a dll

I'm trying to use the Call Library Function Node where in C the call is

 

int GetSomeData(int Channel, char *name, void *value)

 

The dll should take the void*valuesize and write the size for the array available.

 

The same call (a different instance with a different 'name') should then take the size of the array and return the actual array to the void*valuearray

 

I've not used labVIEW for years, and never with dlls...

 

I'm not sure I've set up the Call Library Function Node correctly, and I don't know how to wire the size variable to the input AND the output.

Equally the Array needs to be an input to the Call Library Function Node and be written from it. The wiring I've tried sofar has shown errors.

 

Any help would be appreciated,

 

Thanks

0 Kudos
Message 1 of 4
(3,561 Views)

Hi cantcodewontcode,

 

Thanks for posting. Can you tell me where i can find the library or send it to me by attaching it on a new forum post and then i'll be able to figure it out for you.

 

Regards

Rico P
Smiley Very Happy
0 Kudos
Message 2 of 4
(3,547 Views)

Thanks for the reply, I had a chance phonecall with someone who gave me the answer. It appears that the pointer to a number isn't actualy a pointer, the node just takes the type of the input, and then the output can be a completely seperate variable. This means I didn't have to wire the input and output to the same variable. The same issue with the array was ok, the initialised array can be taken in a a pointer using the node setting, and passed out the other side with no confusion.

 

I'm not sure I'm right in what I've said, but it works for me, someone else will probbale be able to explain it better!

 

Thanks for the offer of help though, there are things you just can't work out without a little help!

0 Kudos
Message 3 of 4
(3,533 Views)

I know what you mean. There's sooo much stuff on LabVIEW i don't even know about yet.

 

Glad everything's going well and good luck with your application.

 

Regards

Rico P
Smiley Very Happy
0 Kudos
Message 4 of 4
(3,531 Views)