AKlijn wrote:
> This was, indeed, the solution. Thanks so much for taking the time.
> I must say I could not find this preallocation concept in the labview
> documentation, but perhaps they assume a more experienced programmer
> would be reading it.
As far as I remember it is mentioned in the tutorial. However this is a
very basic C programming concept, that the caller has to allocate and
deallocate buffers passed to functions. This is because there are
basically a myriad of ways to allocate memory and if the allocation and
deallocation is not done by the same entity you have to exactly specify
which memory pool has to be used. Windows itself has about three or four
different memory management libraries and most C runtime libraries add
th
eir own again, although the Microsoft Visual C runtime library does
redirect its malloc() calls to one of the WinAPI memory management
calls. But Borland runtimes typically have their own meory management
library and if a DLL created in Borland C or Delphi would allocate
memory and you would try to deallocate it in a Visual C application you
would get very bad crashes.
Rolf Kalbermatter
Rolf Kalbermatter
My Blog 
DEMO, Electronic and Mechanical Support department, room 36.LB00.390