I am working with some 3rd party API functions which were written a number of years ago. They are for data acquistion purposes. One of the functions returns a handle to a location where the acquired data value is stored. That works fine. Another function takes the handle as input and puts the data stored at that location into another variable. This function keeps returning an "Invalid Buffer" error. However, if I perform the exact same sequence of events in VB6, everything works fine, and the value that is being passed as the handle is in the same numeric range as when I run it in VB.NET. The only change I have made in .NET is that I changed the Longs to Integers.
My question is:
A) Is there a .NET function which will allow me to access the memory buffer directly without having to use these old functions?
B) If not, does anyone know what I might be doing wrong? I can post the code if the answer to A is no.
Thanks.
My question is:
A) Is there a .NET function which will allow me to access the memory buffer directly without having to use these old functions?
B) If not, does anyone know what I might be doing wrong? I can post the code if the answer to A is no.
Thanks.