LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

c string pointer from dll in port from 7.0 to 8.0

i'm porting a vi from 7.0 to 8.0. i have a call lilbrary function node that calls into a dll. the return type is String and the format is C String Pointer.

 

in version 7, we used to have to allocate memory and wire it into node as an input. when ported to 8, there is still a wire going to the node, put it doesn't seem like its connected to anything. when i hover the connector tool over the node, in version 7 the node says input param. in version 8 nothing. does memory still have to be allocated?

 

 

0 Kudos
Message 1 of 4
(2,784 Views)

I don't quite understand the not connected to anything. It sounds like the CLFN lost the DLL configuration. Have you checked it to see that it's pointing to the DLL and that the parameters are set correctly? Do you have a screenshot? (Please post PNG files - NO bitmaps!)

 


chucky wrote: 
in version 8 nothing. does memory still have to be allocated?

Yes.

 

0 Kudos
Message 2 of 4
(2,758 Views)

chucky wrote:

i'm porting a vi from 7.0 to 8.0. i have a call lilbrary function node that calls into a dll. the return type is String and the format is C String Pointer.

 

in version 7, we used to have to allocate memory and wire it into node as an input. when ported to 8, there is still a wire going to the node, put it doesn't seem like its connected to anything. when i hover the connector tool over the node, in version 7 the node says input param. in version 8 nothing. does memory still have to be allocated?

 

 


Could you upload the vI in question, or an image of the diagram and the CLN parameter configuration? What you describe so far offers far to little information to even guess what you are exactly seeing.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 4
(2,755 Views)

i think i know a way around this problem. i haven't tried it with this function, but i had a similar problem with another function.

 

it has to do with using the call library function inside a conditional disable structure.

 

here is the prototype of the function:

 

short int myfunction(short int DevNum, void *pMetrics);

 

the output parameter is a pointer to a C structure.

 

we are targeting Windows, LabVIEW RT, and Linux. so i was using a conditional disable to call the library function as it is the same function for each operating system but the library names are different.

 

when i wired the pMetrics parameter to a cluster when the call library function was outside the conditional disable, LabVIEW allowed me to wire it. When it was inside, it would not.

 

what i did was to move the cluster to inside the conditional disable structure and then LabVIEW allowed me to wire it. i then duplicated the subdiagram.

0 Kudos
Message 4 of 4
(2,729 Views)