Converting IntPtr to byte[]

  • Thread starter Thread starter Brian Harleton
  • Start date Start date
B

Brian Harleton

Having trouble figuring out the best way to convert an
IntPtr to a byte[] without losing any data. Looks like I
need to use Marshal.PtrToStructure(), but I'm not having
any luck with that.
Any help would be appreciated.
 
Does the IntPtr actaully point to a byte[] or is it something else?

It sounds like you are trying to get the bytes occupied by an object ...

Can you be more specific what you are trying to do, then I can help better.
Christoph
Sofware Architect, .NET Mentor
MS MVP XML .NET
 
Back
Top