The vi I use returns a pointer to a block of data Can you show how a VI returns a pointer
Message Edited by K C on 03-09-2006 08:31 AM
> The vi I use returns a pointer to a block of data.
If by "pointer" you mean a memory address, then I think you're DLL idea is right on track. You could efficiently cast (sort of) the pointer into an array.
The attached .zip contains some VIs that may give you some ideas. In LabVIEW, open the application builder and load CVTDLL.bld. It compiles CVTDLL.vi into CVTDLL.dll. CVTDLLCaller calls the DLL - passing it the pointer and returning an array. The magic will happen in the way the pointer parameter is passed from the VI to the DLL. I think we need the CLF to think it's supposed to be passing a U32 value, where the DLL thinks it receiving a pointer to an array. Then it's just a matter of passing the data back out. There are a bunch of forum contributors who could get this right the first try - "smercurio" and "RolfK" come to mind.
I hope this isn't yet another case where I'm way off track!
Thanks for the follow-up.
Looking at the posted VI, "GetMemory_byPtr.vi" looks like the one.(?) It's missing on my machine, but you've provided plenty of search info - I'm gonna chase this down to see how it's done. That's quite a time savings!