未处理COMException(转载)
(2009-03-24 22:01:38)
标签:
windowsmobile透明按钮comexceptionit |
分类: 移动平台开发 |
在前一篇文章中介绍了C#透明按钮的实现,但是实验室其他人反应会出现未处理COMException,晚上把自己手头上任务完成之后,就想看看到底怎么回事,参考网上一篇文章的介绍,修改了一下源文件,测试了一下到现在为止没发现什么问题,但具体情况还有待检验,修改方法如下:
参考:http://www.codeplex.com/alphamobilecontrols/WorkItem/View.aspx?WorkItemId=3720
// We need the MarshalAs attribute here to keep COM interop from sending the buffer down as With: uint CreateImageFromBuffer(IntPtr buffer, uint size, BufferDisposalFlag disposalFlag, out IImage image); |
In
AlphaImage.cs add this in the top of the file:
|