如何取得拨号连接中modem与pc连接的端口?

holmesma 2006-07-29 04:12:34
函数或方法,急。最好给个例子。 谢谢各位大虾
...全文
412 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
qidai628 2007-01-23
  • 打赏
  • 举报
回复
用我们的USB MODEM连接上网后,在托盘区会显示一个黄色的连接速率的标签,总是显示115200bps,但我们的速率达到了1.8Mbps,请问怎么更改这个速率?谢谢。
holmesma 2006-08-11
  • 打赏
  • 举报
回复
// ModemInfo.h
class CModemInfo
{
// Construction
public:
CModemInfo();
virtual ~CModemInfo();

// Operations
public:
const CString GetModemInitString( const CString strName, const int nSpeakerVolume = -1 ) const;

const int GetModemComPort( const CString strName ) const;

const BOOL GetModemHasSpeaker( const CString strName ) const;

const int GetModemVolumeLevelsCount( const CString strName ) const;

const CString GetModemName( const int nIndex ) const;

const CString GetModemComPortName( const CString strName ) const;


protected:
const int GetModemIndex( CString strName ) const;
const CString GetModemRegistrySection( const int nIndex ) const;
const CString GetProfileString( LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszDefault, HKEY hKey ) const;
const int GetModemComPortByIndex( const int nIndex ) const;
const CString GetPaddedIndex( const int nIndex ) const;
const CString GetModemClassGuid() const;
const CString GetModemComPortNameByIndex( const int nIndex ) const;
};
holmesma 2006-08-02
  • 打赏
  • 举报
回复
有没有通过注册表的方法?
qizhao2001 2006-07-31
  • 打赏
  • 举报
回复
用一个mscomm控件,对所有COM口遍历。
其实查看modem驱动。就可以看到modem到底用的是哪个com,如果是内猫,一般是com3
holmesma 2006-07-31
  • 打赏
  • 举报
回复
谢了,还有没有其他方法? 再顶!,顶者有分
holmesma 2006-07-31
  • 打赏
  • 举报
回复
up
KYOLoveVC 2006-07-29
  • 打赏
  • 举报
回复
对于你提供的条件,按我的理解,你可以用循环的方式来列举端口,每列举到一个端口就试绑定,如果不成功,证明这端口是modem与pc连接的端口,一般电脑会默认有16个端口,但用其他软件会模拟到1024个端口,希望对你有帮助
holmesma 2006-07-29
  • 打赏
  • 举报
回复
up

2,640

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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