Copying Memory to an Array

  • Thread starter Thread starter Si
  • Start date Start date
S

Si

Thanks in Advance,

I don't know if I need to copy the memory to an Array (thats what I
would have done it in vb6), I just need to be able to read/access it.

I have a Callback function that is handing me a block of memory -

Function BufferCB(ByVal SampleTime As Double, ByVal pBuffer As IntPtr,
ByVal BufferLen As Integer) As Integer Implements _ISampleGrabberCB.BufferCB
SyncLock Me

Dim BAR() As Byte
ReDim BAR(BufferLen) ' This creates the buffer but I need to copy
' the data from the memory location in pBuffer ' pointer.
End SyncLock
Return 0
End Function


Thanks Again.
 
Si said:
I don't know if I need to copy the memory to an Array (thats what I
would have done it in vb6), I just need to be able to read/access it.

Check out the members of 'System.Runtime.InteropServices.Marshal'.
 
Back
Top