未处理的“System.Runtime.InteropServices.COMException”类型(急~~~~~~~~~~~~~)

superliyubo 2006-12-28 12:11:16
private void button1_Click(object sender, System.EventArgs e)
{
MSComm mscom = new MSCommLib.MSCommClass();
mscom.CommPort = 2;
mscom.Settings = "9600,n,8,1";
mscom.InBufferSize = 128;
mscom.OutBufferSize = 128;
mscom.InputMode = MSCommLib.InputModeConstants.comInputModeText;
mscom.InputLen = 1;
mscom.SThreshold = 1;
mscom.RThreshold = 1;
mscom.InBufferCount = 0;
mscom.OutBufferCount = 0;
mscom.PortOpen = true;
}

一触发这个事件就出现
未处理的“System.Runtime.InteropServices.COMException”类型的异常出现在 test.exe 中。

其他信息: 类别未授权使用
...全文
790 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
u2wildman 2007-04-23
  • 打赏
  • 举报
回复
怎么解决啊???????????????????????
superliyubo 2006-12-29
  • 打赏
  • 举报
回复
superliyubo 2006-12-28
  • 打赏
  • 举报
回复
怎么处理
孟子E章 2006-12-28
  • 打赏
  • 举报
回复
权限问题
superliyubo 2006-12-28
  • 打赏
  • 举报
回复
这个是不提示了,又出现
未处理的“System.Runtime.InteropServices.COMException”类型的异常出现在 test.exe 中。

其他信息: HRESULT 中的异常:0x800A1F42。

我是在 windows 2003 server 下面做的,继续求教
孟子E章 2006-12-28
  • 打赏
  • 举报
回复
DCOM授权,或者启用模拟(相关文章网上很多)

111,098

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧