Pointer to LabVIEW Array
- From: Joe Gerhardstein <x@xxxxxxxx>
- Date: Wed, 10 Aug 2005 10:10:46 -0500 (CDT)
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?
.
- Follow-Ups:
- Re: Pointer to LabVIEW Array
- From: Lycangeek
- Re: Pointer to LabVIEW Array
- Prev by Date: Re: compact MC Access Database with labview
- Next by Date: Re: Closing the current vi when new vi is opened
- Previous by thread: Re: compact MC Access Database with labview
- Next by thread: Re: Pointer to LabVIEW Array
- Index(es):
Relevant Pages
|