02-15-2006 06:52 AM
02-15-2006 08:07 AM
02-15-2006 03:40 PM
Basically you treat the pointer as an uInt32, configuring in the CLN a parameter Numeric, type: uInt32, Pointer to Value. Then you need two more things. One to copy some data into or out of this pointer, and second some fucntion to deallocate the pointer once your done, otherwise you create a memory leak. The second one will depend on the memory manager function called by the external library to allocate that pointer and should be documented in the function description. Usually a library will export a specific function for deallocation, since just assuming that malloc and free will work the same both in the library and in the caller is dangerous at least.
@falkpl wrote:I have had the same problem when trying to call some system functions which require pointer to pointers (address of a pointer) since there is no easy method of pointer dereferencing I was stuck using a wrapper function with a compatible type. I would also love to know the best way to do this. Since LV manages the memory like a managed language it becomes very hard to gain access to the actual memory structures of a dll like is easily done in a language like c++.Paul
02-21-2006 11:38 PM
Thanks Rolf Kalbermatter
The method that you pointed out is working fine.
This looks like a round about fashion of accessing the memories via LabVIEW.
Thank you.
Vivek