LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLLs

 i need to pass the below structure from labVIEW to C DLL Can any one help me out .....is thr an option to pass without writting a wrapper?PL do help .....

 

typedef struct 

{
unsigned long NumOfParams;
SCONFIG *ConfigPtr;
} SCONFIG_LIST

 

typedef struct
{
unsigned long Parameter;

unsigned long Value;

} SCONFIG

0 Kudos
Message 1 of 11
(4,301 Views)

This should help:

Using Structures in a DLL with Clusters in LabVIEW

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 11
(4,282 Views)

hy adnan.....

thank you for da reply... 

I have gone thru those notes earlier......it does nt gve an answer to my question ..most of examples discussed  is of writing a wrapper DLL.i nd to do it without involving the wrapper.Is thr any way i could represent the  structure mentioned above in labVIEW.....i ve succesfully passed a pointer to a sturcture without wrapping it .....PL do help...... 

Message Edited by vivekn on 01-05-2009 08:10 AM
0 Kudos
Message 3 of 11
(4,266 Views)
A pointer is just an integers. So, while all you need to do is pass an integer for a pointer, the problem is that the pointer has to be valid. In this case you need to get a pointer to an SCONFIG structure and embed that into another structure. This means you need to get the memory location of where the SCONFIG structure is stored. This is not something that LabVIEW was designed to do. Stuff like this is better suited to be done in C, and it's far safer to have it done in a wrapper DLL.
Message 4 of 11
(4,251 Views)
hy
0 Kudos
Message 5 of 11
(4,215 Views)
I'm sorry, but I don't speak text messaging. Can you please rephrase your question using full words?
Message 6 of 11
(4,189 Views)

I will do my best.

 

Thank you for the reply.Am trying myself if i could come up with a solution in labVIEW .Since i dont have much of an  exposure in labVIEW am finding it not that easy.Writing a wrapper DLL would be the the last option.I would like you to confirm that the above mention structure could not be passed so that my time could be saved or is there any way that it could be done in labVIEW?. kindly help me out.Am sure  it would be useful to lot of people.

 

 

 

 

 

 

 

 

Message Edited by vivekn on 01-07-2009 10:36 AM
0 Kudos
Message 7 of 11
(4,165 Views)
Well, I don't believe it's possible for the reason I stated previously. Perhaps Rolf (who knows a lot about this stuff) may be able to provide more insight if this is not the case.
Message 8 of 11
(4,114 Views)
thank you for the inputs
0 Kudos
Message 9 of 11
(4,083 Views)

hey ,

 

Am almost done with my wrapper and i could successfully pass an array of clusters.Now i have a problem where a certain function returns an array of cluster . Could any one tell me how i could do using my wrapper DLL. thanks in advance.given below is my C skelton of  VI.

 

typedef struct {
 long dimSize;
 unsigned char Marks[1];
 } TD3;
typedef TD3 **TD3Hdl;

typedef struct {
 unsigned long Name;
 unsigned long age;
 TD3Hdl elt7;
 } TD2;

typedef struct {
 long dimSize;
 TD2 elt[1];
 } TD1;
typedef TD1 **TD1Hdl;

 

PL help me.

 

 

 

0 Kudos
Message 10 of 11
(3,913 Views)