Search code examples
c#memorystreamintptr

Send content of memory pointed by an IntPtr into a MemoryStream variable on C#


Im new to this languaje.

I think the question is very clear, i have an intptr received after calling a dll function and need to save the buffer that it points to into a MemoryStream variable. ¿how do i do it ?


Solution

  • You might want to check out the UnamangedMemoryStream instead:

    http://msdn.microsoft.com/en-us/library/system.io.unmanagedmemorystream.aspx