口袋数码论坛's Archiver

openext 发表于 2006-6-2 16:25

太好了楼主,我正需要能发送和接收16进制的例子呢!不过我是用的vb.net2003  楼主能把上面的例子该成vb.net2003下的吗?我现在写的程序发送和接收16进制都不太正常,所以希望楼主能给改成vb.net2003下的例子。
谢谢了楼主,同时希望您早日转正,去掉见习二字:D

openext 发表于 2006-6-5 14:30

把问题顶上去

openext 发表于 2006-6-6 16:51

问楼主个问题,我用的是就是你给的vb.net下的串口例子改的程序,从程序往下发个命令,然后下位机返回16进制的数组,但我接收到的数组是乱码 请问楼主,该如何解决呢?

openext 发表于 2006-6-7 08:56

顶上去

openext 发表于 2006-6-12 09:45

把问题顶上去

openext 发表于 2006-6-14 09:06

期待楼主献身

LyquidCrystal 发表于 2006-6-16 18:06

LZ怎么不编一个能够使用的?

openext 发表于 2006-6-19 16:06

期待楼主献身

MacintoshM 发表于 2006-6-20 09:27

乱码问题,只是普通的编码转换的问题。因为已经解决了读写设置问题,其他问题都是程序的具体安排了。这些问题都和VB能够提供的具体功能相关,大家可以通过查阅资料自己来解决。如果什么都编写出来,我没那水平,就算做出来了,也并不能起到好的促进作用。

MacintoshM 发表于 2006-7-7 14:27

访问编号大于9的串口的方法[来源MSDN]

访问编号大于9的串口的方法[来源MSDN]

How to specify Serial ports lager than COM9
CreateFile() can be used to get a handle to a serial port. The "Win32 Programmer's Reference" entry for "CreateFile()" mentions that the share mode must be 0, the create parameter must be OPEN_EXISTING, and the template must be NULL.

CreateFile() is successful when you use "COM1" through "COM9" for the name of the file; however, the message

INVALID_HANDLE_VALUE
is returned if you use "COM10" or greater.

If the name of the port is \\.\COM10, the correct way to specify the serial port in a call to CreateFile() is as follows: CreateFile(
"\\\\.\\COM10", // address of name of the communications device
fdwAccess, // access (read-write) mode
0, // share mode
NULL, // address of security descriptor
OPEN_EXISTING, // how to create
0, // file attributes
NULL // handle of file with attributes to copy
);


NOTES: This syntax also works for ports COM1 through COM9. Certain boards will let you choose the port names yourself. This syntax works for those names as well.

访问COM1到COM9,可以使用“COM9:”这样的方式,注意在WinCE下要加冒号。也可以使用"\\\\.\\COM9:"的方式,前者是后者的简化。
但打开大于9的串口,这种简化方式就会出现问题,就必须使用"\\\\.\\COM12:"的方式了。这点可能容易被忽略。
前面的程序没有提供这个功能,不过可以通过自己修改源代码来完成!

wzqing 发表于 2006-7-28 23:11

太谢谢了!!!!

x_c_m_ren 发表于 2006-8-1 13:53

我发现斑竹的语言功底,太好了。

djsfd 发表于 2006-10-6 11:52

我下载EVC的版本,编译出错,可能是CPU的原因
不知道怎么改才能支持(arm4i)的CPU?

ly5120 发表于 2006-11-29 18:31

请问如修改 VB.NET版串口调试程序 内的串口波特率,校验位,停止位?

zhaobin2002 发表于 2006-12-6 16:28

WINCE下数据库编程

有人有WINCE下的数据库编程的程序吗?

ly5120 发表于 2006-12-8 19:48

修改波特率

在VB.NET中的串口调试程序,不管波特率设为多少,打开端口时的波特率始终是9600
请问怎么解决这个问题

zhyhaa 发表于 2006-12-21 20:31

:) 好,谢谢。太感谢了!!!!

lysgyx 发表于 2007-1-4 20:44

非常感谢!
严重支持!

evagjj 发表于 2007-3-26 21:16

lz,我用了你的编译到2005下的程序,能运行,但是怎么发送接收都不行呢?
先初始化,然后点击打开串口,然后写入字符点击发送,怎么没有反应呢?谢谢:(

echohu2006 发表于 2007-6-2 16:35

Thanks

Thank you for share

页: 1 [2] 3

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.