This topic has been archived. It cannot be replied.
-
工作学习 / 学科技术讨论 / c#dll里载入了一幅图像(Btye[] pBuffer); c++主程序如何得到这个图像的地址?
-smile2007(smile2007);
2007-12-7
(#4106002@0)
-
c# interface: public int GetImageData(ref Byte[] pImageBuffer, ref UInt32 nImageWidth, ref UInt32 nImageHeight, ref UInt32 nImageBPP)
-smile2007(smile2007);
2007-12-7
(#4106007@0)
-
I guess image loaded (initiated) inside the function. then the interface should be public int GetImageData(out Byte[] pImageBuffer, ref UInt32 nImageWidth, ref UInt32 nImageHeight, ref UInt32 nImageBPP) . it will be exactly same as c++ interface.
-tjhong(我检讨);
2007-12-8
(#4108137@0)
-
Amazing. U r cs programmer, too?
-smile2007(smile2007);
2007-12-9
(#4109180@0)
-
BTW, in this way can c++ use cs's pImageBuffer directly ?
-smile2007(smile2007);
2007-12-9
(#4109183@0)
-
Yes, same way as using .NET FrameWork in C++.
-tjhong(我检讨);
2007-12-9
(#4109517@0)
-
c++ interface: int GetRawBuffer(BYTE* pImageBuffer, UINT& nImageWidth, UINT& nImageHeight, UINT& nImageBPP)
-smile2007(smile2007);
2007-12-7
(#4106010@0)
-
在c++中如何把c#的 byte[] 转换到从c++的 byte× 中?
-smile2007(smile2007);
2007-12-7
(#4106015@0)
-
我曾经抄过一段代码:MemoryStream ms = new MemoryStream ();
int length=(int)ms.Length;
byte[] bytearr = ms.GetBuffer();
unsafe
{
fixed (byte* pSrc = bytearr)
{
int nTemp = *((int*)(pSrc+i) );
...
}
}
-holdon(again);
2007-12-20
{224}
(#4134307@0)