Pointer to LabVIEW Array



LabVIEW memory management question:

Question Part 1: When I write a C .dll that takes a LabVIEW array,
LabVIEW passes a pointer into LabVIEW's memory to the array to C. 
Can C return the pointer to me (e.g., not the array I passed in, but
it's memory location)?

i.e.: void GetNativeMemoryPointer(float *pointer, float *array);

where *array is my input array, and GetNativeMemoryPointer returns the pointer to this array on *pointer.

Question Part 2: What issues will I run in to if I pass this returned
pointer to another .dll call.  What if this .dll call is in
NET? 

Concerns: How does LabVIEW hold this array in memory?  When I call
GetNativeMemoryPointer, does LabVIEW make a copy and send this a
pointer to the copy to the dll, or is the pointer to the
original?  Will LabVIEW ever "move" the original, e.g., will my
pointer become invalid after some time?
.



Relevant Pages

  • Re: Calling a library that expects array of pointers as argument (unsigned char **)
    ... I am trying to use a library function (DLL) from LabVIEW 8.0.  ... array of character pointers.  Basically this a 2D array of strings ... (null terminated char strings).  Each line is a null terminated ...
    (comp.lang.labview)
  • Re: LabVIEW and C++ Pointers
    ... getting a void* back from a .NET method, and you ... C++ code is in DLL? ... assumed LabVIEW would be able to access the structure in the normal C++ ... Perhaps you are trying to cast the pointer and then use it as a C++ ...
    (comp.lang.labview)
  • Re: LabVIEW and C++ Pointers
    ... my pointer is to a complex data type that includes some pointers to ... other complex data types, which probably include pointers to other complex data types, etc. ... trying to move the data from C into LabVIEW, ... LabVIEW must allocate the array and C ...
    (comp.lang.labview)
  • Re: C# - Problem to receive data from a C++ Dll
    ... I'm asking me something else also: the dll I'm using is a dll which was ... created by embedded Visual C++ 3.0 and I want to use it on a Pocket PC 2003 ... > array to a single char array? ... > (pointer to a pointer to a pointer to a character....) ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Need a method to send byte arrays from Unmanaged C DLL to VB
    ... before calling the C routine. ... you can use a StringBuffer instead of a byte array. ... from a C DLL to VB? ... with ByRef Byteas a parameter, then treating it in C as a pointer to ...
    (microsoft.public.dotnet.languages.vb)