I'm (still) playing with libraries on Linux. Specifically ODBC, but this is
a general question.

I have an "open handle" VI that calls a function in the library that creates
an entity and places a pointer to that entity in a long int, which I create
in the VI as a constant and pass by pointer to the library function.

The way this is being used is that I open three nested layers of handles; an
entity within an entity within an entity.

I initially made the VI reentrant, reasoning that this way I would have
three different copies of the constant which I'm using to provide a location
into which the library can place the pointer. However, I've just discovered
that everything is working quite happily *without* it being set re-entrant,
even though I would expect subsequent "open handle" calls to be overwriting
the pointer that previous calls have placed there.

This makes my head hurt. Can anyone explain how it's able to work like this?
Does Labview automatically make a new copy of a variable when you pass a
pointer to it, hence what is coming out of the node is different from the
memory I thought I needed to pass into it? This would be odd but is the only
way I can see that it would be working.

--
Dr. Craig Graham, Software Engineer
Advanced Analysis and Integration Limited, UK. http://www.aail.co.uk/





Reply via email to