i am using a dll that places an image data in memory and returns to me two wariable long P1 and long P2
i am using C#
P1 is the memory address and P2 is the number of bytes written
i want to place this image in a picturebox named pictureBox1 how can i do this
in c++ the code works like this
stream.write((void*) P1,P2);
its equavalent in C# should be
Stream str = new MemoryStream()
str.Write((void*) P1,0,P2);
pictureBox1.Image = Image.FromStream(str);
or
Stream str = new MemoryStream((void*) P1,0,P2)
pictureBox1.Image = Image.FromStream(str);
my problem P1 is pointer and str.Write function takes a byte array . how can i take the data at P1 and convert it to byte array or from an image from it.
---
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.