08-06-2005 03:23 AM
Hi,
About the first limitation that I've declared, I think even feeding an empty array won't help in not duplicating the data.
What really frightened me was pointers to pointers! Does anybody know how to manipulate this case? I'm coming to the point that this can not be handled by LabVIEW. Disappointing!
Hope someone can help!
08-08-2005 06:22 AM
08-09-2005 09:54 AM
08-09-2005 10:30 AM
08-09-2005 10:48 AM
08-09-2005 10:53 AM - edited 08-09-2005 10:53 AM
Message Edited by Joe Gerhardstein on 08-09-2005 10:56 AM
08-09-2005 11:17 AM
Brian, great explanation. 5 stars, thanks.
Was the icon in the example you posted created by you or is that the default icon for 8.0?
BTW, how about turning the URL in your signature to a link?
08-09-2005 11:39 AM
01-17-2007 03:41 PM
01-18-2007 04:18 AM
@falkpl wrote:
I have found talking to pointers from labview to be one of the most difficult problems when developing with labview. There is almost always to do it but this problem requires much more work than other issues that arise in labview. Since memory management is shielded from the developer (to some extent) pointers seem foreign to Labview. I have had some trouble when using WIN32 calls which take a pointer to a pointer, usually in the form of an object referenced as a handle which contains a pointer or an array. The only work-around I have found is to write a dll library in c++ which acts as a accessor function, taking the handle to the object and returning a copy of the value stored (or the location of) the data needed. This is time consuming and not all that elegant. I too am interested in similar issues with both .net and c++ interfacing with labview. Sorry if this doesn't answer your question but this discussion topic is of great interest to me.
It's not really much more difficult than using pointers in C. The problem here is that almost everything else is so much easier in LabVIEW than when using C, that this particular issue stands out like the Eiffel tower. And yes, the whole idea of LabVIEW to not make the programmer worry about memory allocation, that makes so many things really easy to do even for non-programmers, creates this huge gap. However there is really not so much LabVIEW can do to make it easier, since the whole interface simply gives not enough information to LabVIEW to do it on its own. A pointer can have many important but completely invisible specifics that depend on the envorinment for which it is and also about the programmer that made the software you want to interface and quite often even if this programmer already had his morning coffee and how well it tasted.
This leaves the user to know how it should be done, how the various translations and difficulties should be dealt with. LabVIEWs Call Library Node for instance does give quite some possibilities to configure pointers and covers with this the most common cases that happen with a standard C interface. There is however no-one preventing a programmer to use his own freaky scheme and create troubles here. On the other hand .Net has a whole slew of new types of pointer types, some of which can be automatically converted, some are at least managed and can be properly although explicitedly dealt with and then you have the ones that you have to do everything on your own. I for one do understand quite a lot about C interfacing, but would never attempt to give advice in something like what the original poster asked with .Net, since I simply do not know enough about .Net to really understand that (and honestly I do hope I can keep it that way for some time in the future ;-).
Rolf Kalbermatter