读书人

急Activex顶用MSCOMM.ocx控件出错

发布时间: 2013-10-25 14:36:53 作者: rapoo

急!Activex中用MSCOMM.ocx控件出错!
我用VC6.0写了一个ACTIVEX控件,带界面的,编译测试都正常,但我给界面上加了一个Activex控件(叫MSCOMM,我想用它开发串口通讯)编译后测试就出错了,我用的测试工具是ActiveX Control Test Container, 插入我的Activex控件后就出错了,我把这个MSCOMM控件移除又可以了,错误提示如下:
请高手指点:
我做这个Activex控件的目的是想开发一个串口通讯程序,做成Activex控件 给Web调用。

---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!

Program: ...Files (x86)\Microsoft Visual Studio\Common\Tools\TSTCON32.EXE
File: winocc.cpp
Line: 279

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)
---------------------------
中止(A) 重试(R) 忽略(I)
---------------------------
Activex?
[解决办法]
在app初始化中,加人CoInitilize
[解决办法]
你还是先换台电脑运行哈试试(最好是别人能使用串口的) 我当时也是系统中注册过mscomm32.ocx ,也有Licenses 最后还是重装系统搞定的

读书人网 >VC/MFC

热点推荐