串口总是报'Error opening serial port'
Comm1.CommName := '//./' + Trim(combx_Port.Text);
目前串口大于20 用上面方法解决的
网上也有上面方法解决如下错误的。
若是您已会应用SPCOMM且涌现10个以上的串心题目 请改一下串心名 COM1.CommName='//./com18'; 便如许减'//./'就好了我也没有晓得甚么回事....... 比方 Comm1.CommName := '//./'+ComboBox1.Text; //./com18是win]
如果你已经会使用SPCOMM且出现10个以上的串口问题
请改一下串口名
COM1.CommName='//./com18';
就这样 加'//./'就行了我也不知道什么回事.......
比如
Comm1.CommName := '//./'+ComboBox1.Text;
//./com18是windows里边的SymbolLinkName,这个在WINAPI里边就需要这 样写,SPCOMM的这部分的源代码如下:
procedure TComm.StartComm;
var
hNewCommFile: THandle;
begin
// Are we already doing comm?
if (hCommFile <> 0) then
raise ECommsError.Create( 'This serial port already opened' );
hNewCommFile := CreateFile( PChar(FCommName), & lt;------就是这里,要加上//./
GENERIC_READ or GENERIC_WRITE,
0, {not shared}
nil, {no security ??}
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL or FILE_FLAG_OVERLAPPED,
0 {template} );
if hNewCommFile = INVALID_HANDLE_VALUE then
raise ECommsError.Create( 'Error opening serial port' );
^^^^^^^^^^^^^^^^^^^^^^^^^^^如果不是 SymbolLinkName写法,串口号大于9这里就出错了
串口总是报'Error opening serial port'的更多相关文章
- 安装aptana插件报Error opening the editor. java.lang.NullPointerException
Aptana的官方网站下载eclipse的插件: http://update.aptana.com/update/studio/3.2/ ,可以在线安装也可以下载插件后再安装,我是以在线的形式安装的 ...
- Serial Port Programming using Win32 API(转载)
In this tutorial we will learn How to communicate with an external device like a microcontroller boa ...
- 【Flink】flink执行jar报错:java.io.IOException: Error opening the Input Split file 或者 java.io.FileNotFoundException
报错内容 flink执行jar时,报如下错误: org.apache.flink.client.program.ProgramInvocationException: Job failed. (Job ...
- 串口数据监视 Serial Port Monitor
串口数据监视工具 Serial Port Monitor可以在其它应用读写串口时监视串口数据, 很好用,但只有15天试用期.
- 安卓开发error opening trace file: No such file or directory (2)报错原因
error opening trace file: No such file or directory (2) 这个问题的出现是因为运行的测试机android系统版本和项目api不一致导致. 改成一样 ...
- Serial Port Programming on Linux(转载)
This is a tutorial on how to program the Serial Ports on your Linux box.Serial Ports are nice little ...
- Non-standard serial port baud rate setting
////combuad_recv.cpp #include <stdio.h> /*标准输入输出定义*/ #include <stdlib.h> /*标准函数库定义*/ #in ...
- 编写ros串口节点,使用官方serial包
参考http://www.roswiki.com/read.php?tid=557&fid=39 1.通过sudo apt-get install ros-<distro>-ser ...
- [转]How Can I Find Out What Is Using a Busy or Reserved Serial Port?
转自:http://digital.ni.com/public.nsf/allkb/29B079481C5ECE76862578810082394E How Can I Find Out What I ...
随机推荐
- http://stackoverflow.com/questions/12601907/loading-google-maps-in-anonymous-function
http://stackoverflow.com/questions/12601907/loading-google-maps-in-anonymous-function window.gMaps ...
- PHP stdClass Object转array
用json传过来的数组并不是标准的array,所以需要用这个函数进行转换. function object_array($array){ if(is_object($array)) { ...
- css之padding,marging
padding:内边距,所有浏览器都支持,不允许使用负值 继承内部格式生成了10px的边距. 属性: auto:浏览器计算机内边距. length:规定以具体单位计的内边距值,比如像素.厘米等.默认值 ...
- Nokia 的 Scrum标准
Nokia 的 Scrum标准:• 迭代要有固定时长(被称为“时间盒——timebox”),不能超过六个星期.• 在每一次迭代的结尾,代码都必须经过 QA 的测试,能够正常工作.• Scrum 团队必 ...
- Hadoop学习地址
hortonworks: http://zh.hortonworks.com/hdp/downloads/ http://zh.hortonworks.com/hadoop-tutorial/supe ...
- [mysql] mysqldump 导出数据库表
1.mysqldump的几种常用方法: (1)导出整个数据库(包括数据库中的数据) mysqldump -u username -p dbname > dbname.sql (2)导出数据库结构 ...
- rm命令
rm是一个危险的命令,使用的时候要特别当心,尤其对于新手,否则整个系统就会毁在这个命令(比如在/(根目录)下执行rm * -rf).所以,我们在执行rm之前最好先确认一下在哪个目录,到底要删除什么东西 ...
- ios外派—本公司长年提供ios程序员外派业务(北京动点软件,可签合同)
北京动点飞扬长年提供ios工程师外派业务. 我公司程序员平均技术情况如下: 1.二年以上iPhone/ipad开发经验:2.熟练使用Xcode.Objective C编码技能:3.熟悉iOS开发框架, ...
- Func系列4:其他功能
非Python API接口支持 Func通过非Python API实现远程调用,目的是为第三方工具提供调用及返回接口.Func使用func-transmit命令来实现,支持YAML.JSON格式,实现 ...
- nodejs小问题:express不是内部或外部命令
来源:http://jingyan.baidu.com/article/922554468a3466851648f419.html 一时兴起想学习点东西,准备在heroku上部署一个Node.js的小 ...