question about a variable of type void* in C#

I'm using some unsafe code in a C# project of mine because it needs to be able to communicate with a C++ DLL.  One of the variables that's going between each language is a pointer of type "void* ".  Its actually a buffer containing pixel values of an image.  I'm just wondering how to access the values in C#.  buffer[x] isn't a valid way to get the xth pixel.

anybody know where i can find information on what i can do to a "void *" in C#?
Who is Participating?
dave4dlConnect With a Mentor Commented:
Read this on pointer conversions to c# :

i.e. use byte*
.NET representation of void* is IntPtr. C# code can read native memory using unsafe programming or Marshal.Copy, Marshal.Read methods.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.