我是这样写的:public CoSmsEngineClass SmsEngine=new CoSmsEngineClass();SmsEngine.OnChannelChanged +=new ICoSmsEngineEvents_OnChannelChangedEventHandler(SmsEngine_OnChannelChanged);
SmsEngine.OnNewCall +=new ICoSmsEngineEvents_OnNewCallEventHandler(SmsEngine_OnNewCall);现在遇到这样的问题:
当只引用任意一个事件时,正确,引用两个事件时,就会报错未处理的“System.Runtime.InteropServices.COMException”类型的异常出现在 interop.engine.dll 中。其他信息: HRESULT 中的异常:0x80040202。请问这是什么原因?
SmsEngine.OnNewCall +=new ICoSmsEngineEvents_OnNewCallEventHandler(SmsEngine_OnNewCall);现在遇到这样的问题:
当只引用任意一个事件时,正确,引用两个事件时,就会报错未处理的“System.Runtime.InteropServices.COMException”类型的异常出现在 interop.engine.dll 中。其他信息: HRESULT 中的异常:0x80040202。请问这是什么原因?
未处理的“System.NullReferenceException”类型的异常出现在 WindowsApplication1.exe 中。
其他信息: 未将对象引用设置到对象的实例。
可是已经申明了啊public CoSmsEngineClass SmsEngine=new CoSmsEngineClass();