System.Drawing.Image类型的接口怎么用在VC.NET的win32程序中?
用C#做了一个COM,其中一个接口返回类型是通过调用System.Drawing.Bitmap.GetHIcon()得到的IntPtr。
在VC.NET的win32程序中,当调用该接口时,会发生0x80131600错误,即_com_error &错误:
ex{0x80131600}_com_error &
__vfptr0x0041c2d8 const _com_error::`vftable '*m_hresult0x80131600const HRESULT
m_perrinfo0x001d0a2cIErrorInfo *
m_pszMsg0x00000000 <错误的指针> wchar_t *
说到底,就是接口中返回的System.Drawing.Bitmap的位图如何在vc.net win32程序中正确返回?
[解决办法]
心有余而力不足,帮楼主顶顶
[解决办法]
其中一个接口返回类型是通过调用System.Drawing.Bitmap.GetHIcon()得到的IntPtr。
=======================
作为参数传递,一般com 接口返回的是HRESULT