Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...