神啊~~~,救救我吧,有关串行口通信速率的头痛问题,UP有分

cuiyxy 2002-06-10 10:03:00
两台计算机使用2M光纤互联,其中两端的光端机与计算机之间使用串行口,
因此我使用了WIN2000系统的“直接电缆连接”,连接也成功,但是“直接
电缆连接”服务器端最高的通信速率只有19200 bps,客户端到是稍微高一
点,可以达到115200 bps,因为服务器和客户端通信速率必须相同,所以
“直接电缆连接”的通信速率只能达到19200 bps,这样2M的光纤还没有一
个56K Modem快。我查了一下MSDN,说可以编写一个第三方的DLL文件,
在DLL中加入函数RasAdminAcceptNewConnection,供系统调用,函数中修
改最大连接速率即可,我拷贝了MSDN的例子程序,作好了设置,新建“直
接电缆连接”时出现了RAS服务不能启动的错误,我在控制面板->管理工具
->服务启动RAS服务也出现同样的错误。

不知各位有没有这方面的经验,以及如何解决
...全文
116 22 打赏 收藏 转发到动态 举报
写回复
用AI写文章
22 条回复
切换为时间正序
请发表友善的回复…
发表回复
123hui 2002-06-13
  • 打赏
  • 举报
回复
to:(沧海鲨鱼)(★★★★★)
你是原来的大白鲨吗,?????消息回答!!!
另外帮你up :)
nuaawyd 2002-06-13
  • 打赏
  • 举报
回复
直接用串口通信程序不行吗?
我自己编的就能达到很高的速率。
cuiyxy 2002-06-13
  • 打赏
  • 举报
回复
问题我以解决

MSDN里的例子用的函数如RasAdminAcceptNewConnection之类只以NT40有
效,在WIN2000里需用MprAdminAcceptNewConnection之类,

WIN2000会在网络连接期间内调用以MprAdmin.....开头的函数,详见
MSDN里的说明,在这些函数里,我可以得到一大些参数,但这些参数
大多只可看看罢了,对其改变不会对系统造成什么影响。

最后我是通过以下方式将串口速率提高到115200 bps的

控制面板--》电话或调制解调制器选项--》调制解调制器(TabPage)
--》两台计算机间的通讯电缆 COM(若没有这一条目,选添加Button)
--》属性(Button)--》最大端口速率
wdman 2002-06-13
  • 打赏
  • 举报
回复
up,关注一下。
albert 2002-06-13
  • 打赏
  • 举报
回复
UP
mfkzj 2002-06-13
  • 打赏
  • 举报
回复
继续关注中
cuiyxy 2002-06-13
  • 打赏
  • 举报
回复
继续关注中
dingfeng1977 2002-06-11
  • 打赏
  • 举报
回复
pcomm.h也有
dingfeng1977 2002-06-11
  • 打赏
  • 举报
回复
第三方dll
http://www.moxa.com

software download

pcomm

Pcomm.dll

Pcomm.pas中说明详细
zj_zyq 2002-06-11
  • 打赏
  • 举报
回复
我用API自己设计的串口通讯程序可以达到 115200bps

推荐:
http://emouze.com 有 CommDebug(delphi) 可供下载。他也可以达到

115200bps

使用API的波特率的问题:

MSDN 原则上 要求标准波特率。

但根据我的测试在一定的范围内可以使用非标准波特率。
quengzi 2002-06-11
  • 打赏
  • 举报
回复
学习,串口可以这样使用?
解决之后希望写下心得。
longyii 2002-06-11
  • 打赏
  • 举报
回复
为什么要用直接电缆连接呢??
自己写一个串口通信的程序不就好了
那串口的波特率就可以随意设置了
MSDN里说可以达到256K,当然实际要低得多
cuiyxy 2002-06-11
  • 打赏
  • 举报
回复
谢谢各位的热心帮助

但我还是希望使用“直接电缆”,因为这样,我就可以很简单的
用ADO连接远程的SQL SEVER,就像在普通网卡组成的LAN
herony 2002-06-10
  • 打赏
  • 举报
回复
这东西很是头疼,关注
winne_ll 2002-06-10
  • 打赏
  • 举报
回复
up
aXu 2002-06-10
  • 打赏
  • 举报
回复
UP
mfkzj 2002-06-10
  • 打赏
  • 举报
回复
我也up一下,关注!!!
look__look 2002-06-10
  • 打赏
  • 举报
回复
我也up一下,关注!!!
cuiyxy 2002-06-10
  • 打赏
  • 举报
回复
RasAdminAcceptNewConnection
The RasAdminAcceptNewConnection function is an application-defined function that is exported by a third-party RAS server administration DLL. RAS calls this function when a user tries to establish a remote connection to a RAS server. The function decides whether the user is allowed to connect.

The RAS server calls RasAdminAcceptNewConnection once for each port in a multilink connection.

BOOL RasAdminAcceptNewConnection(
RAS_PORT_1 *pRasPort1, // pointer to information about the
// connection
RAS_PORT_STATISTICS *pRasStats,
// pointer to statistics about the port
RAS_PARAMETERS *pRasParams // pointer to an array of
0A // media-specific parameters and values
);

Parameters
pRasPort1
Pointer to a RAS_PORT_1 structure that contains RAS data about the pending connection. This structure contains the relevant connection information that you need to make a decision about the connection.
pRasStats
Pointer to a RAS_PORT_STATISTICS structure that contains statistics about the port.
pRasParams
Pointer to an array of RAS_PARAMETERS structures. Each structure contains the name of a media-specific key, such as MAXCONNECTBPS, and its associated value.
Return Values
If the function returns TRUE, RAS accepts the new connection.

If the function returns FALSE, RAS does not accept the new connection. There is no exteded error information for this function; do not call GetLastError.

Remarks
The RasAdminAcceptNewConnection function gives more control to a RAS server administration DLL to determine whether a specified remote user should be allowed to connect to a server.

The setup program for a third-party RAS administration DLL must register the DLL with RAS by providing information under the following key in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RAS\AdminDll

To register the DLL, set the following values under this key.

Value Name Value Data
DisplayName A REG_SZ string that contains the user-friendly display name of the DLL.
0ADLLPath A REG_SZ string that contains the full path of the DLL.


For example, the registry entry for a RAS Administration DLL from a fictional company named Netwerks Corporation might be:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RAS\AdminDll
DisplayName : REG_SZ : Netwerks RAS Admin DLL
DLLPath : REG_SZ : C:\nt\system32\ntwkadm.dll

The setup program for a RAS Administration DLL should also provide remove/uninstall functionality. If a user removes the DLL, the setup p
mickey_gxj 2002-06-10
  • 打赏
  • 举报
回复
gz
加载更多回复(2)

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

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