LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

strings through frameworks

This code was complied as a Mac framework and used in the attached vi.

#include "untitled.h"


int test(buf)

char *buf;
{
buf = calloc(100,sizeof(char));
strcpy(buf, "etewrewr");
return 0;
}

Any ideas why I can't get the string out of the Call Library Function?
Thanks

0 Kudos
Message 1 of 5
(2,853 Views)

Does a framework in Mac means the equivalent of a DLL in Windows?

Can I run this in Windows?

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 2 of 5
(2,833 Views)
Yes, no.
And the answer is that if you define the string as char buf[500] instead of char *buf it works. have no idea why.
0 Kudos
Message 3 of 5
(2,825 Views)

Exo,

Could you attach the framework or DLL file that you created from this code so that I can use it in LabVIEW. Thanks!

Cheers,

Jonah
Applications Engineer
National Instruments

Jonah Paul
Marketing Manager, NI Software
0 Kudos
Message 4 of 5
(2,786 Views)
The framework didn't work because I configured it for a string variable when I should have configured it for an array of bytes. Just seeing char *buff can be misleading.

Thanks.
0 Kudos
Message 5 of 5
(2,778 Views)