Receiving A Byte Array from dll? [modified]
-
Hello All! I have been unable to receive a Byte[] in MC++. Whats the right syntax this is the C# dll method. public byte[] GetPictureBytes(Image _Pic) { byte[] _rtval = null; MemoryStream mstr = new MemoryStream(); _Pic.Save(mstr, ImageFormat.Jpeg); _rtval = mstr.GetBuffer(); return _rtval; } Now i have to call this C# dll method in VC++.NET 2005 the syntax that i m using to call and receive this byte array is as follows but its creating some error. " array^ myImage = gcnew array^(1); myImage = dllobj->GetPictureBytes(_myImage); " OR "array^ myImage = gcnew array^(1); myImage = dllobj->GetPictureBytes(_myImage);" // dllobj is of C# dll Class type that contains metod GetPictureBytes(Image _Pic); // _myImage is Image type i have used some other combinations also to receive the Byte array but cant having some errors. Plz guide me writing correct syntax to receive this Byte array in VC++.Net THNX in Advance -- modified at 5:55 Wednesday 16th August, 2006