what does that red line exactly do? I know it declares a pointer p, but what does the "(void *)" on the right side of the equal sign do?PHP Code:BitmapData bmData = b.LockBits(new Rectangle(0, 0, b.Width, b.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);
int stride = bmData.Stride;
System.IntPtr Scan0 = bmData.Scan0;
unsafe
{
byte * p = (byte *)(void *)Scan0;
.
.
.
also, it accesses p like an array (ie, p[0] ) why is that?




Reply With Quote