I noticed a few posts about the limitation to port 1-16 of MSComm. As I completed my generic ASCOM DSLR driver, I wanted to fix this limitation. There is a hack that can be done to the mscomm file to increase the port number to 1-256: Get an HEX editor open C:\windows\system32\mscomm32.ocx (make a backup copy too) Find the string "66 3D 10 00" (there is only one) Change the string to "66 3D FF 00" Save the file. I just tested it with my driver and my $3 USB to rs232. It would normally go on port 14 but I changed to port 255 and it works great. Maybe this is old news, but just in case you need it... Cheers,

Vincenzo

Another Link:

http://www.foxite.com/archives/mscomm32ocx-hack-0000081167.htm

在项目中,发现 MSComm 32控件默认只支持16个 串口 ,后发现有网友提供了 修改 版的控件下载 http://download.csdn.net/detail/uuwu2000/4094234 ,实测下来只能到达127,对比原版文件和 修改 后的文件发现如下差异: Offsets: 16 进制 3F53: 7F 即原来的0x10被改成了0x7F,如果我们需要支持更大的范围, 其实很多用户玩单机游戏或者安装软件的时候就出现过这种问题,如果是新手第一时间会认为是软件或游戏出错了,其实并不是这样,其主要原因就是你电脑系统的该dll文件丢失了或没有安装一些系统软件平台所需要的动态链接库,这时你可以下载这个 mscomm 32. ocx 文件(挑选合适的版本文件)把它放入到程序或系统目录中,当我们执行某一个.exe程序时,相应的DLL文件就会被调用,因此将缺失的文件放回到原目录之后就能打开你的软件或游戏了.那么出现 mscomm 32. ocx 丢失要怎么解决? 用VB6编写 串口 通信程序, MSCOMM 控件 限制 串口 ,不能大于16个,否则报错。可用以下方法破解: 1、在c:\windows\system32中找到 MSCOMM 32. OCX ; 2、备份之(为安全起见); 3、使用HEXEDIT反汇编工具,打开它; 4、找到 "66 3D 10 00 "(这是文件中唯一一处) 将其 修改 为 "66 3 在MFC 串口 编程中,有两种方式,一种是针对网络中大咖提供的API,这种方式需要有一定的代码逻辑能力。还有一种就是使用 mscomm 插件了。 具体使用的方式这里不再赘述,网络上有一大把,均是插入MFC后进行事件响应的获取以及判断。 但是,在实际使用过程中,我们发现 mscomm 没法支持17及以上的 串口 ,这就比较尴尬了。 因此在百度多种方式后,发现如下办法可行,故记录在此。