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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top