半天RAS总结

 

===========================================================================

 

用RAS操作ADSL。

 

①.RasEnumEntries 

The RasEnumEntries function lists all entry names in a remote access phone book.

 

②.RasSetEntryProperties 

The RasSetEntryProperties function changes the connection information for an entry in the phone book or creates a new phone-book entry.

 

函数原型:

 

DWORD RasSetEntryProperties(

  __in          LPCTSTR lpszPhonebook,

  __in          LPCTSTR lpszEntry,

  __in          LPRASENTRY lpRasEntry,

  __in          DWORD dwEntryInfoSize,

  __in          LPBYTE lpbDeviceInfo,

  __in          DWORD dwDeviceInfoSize

);

 

第三个参数参照MSDN。

 

除了上面(MSDN)说的几个成员需要提供外。

还有

dwSize 推荐:sizeof(RASENTRY)-------------此成员不设置函数会返回632

dwfOptions2 推荐:RASEO2_Internet---------见图2.

dwfNetProtocols 推荐:RASNP_Ip------------见图1.

 

对于要求的dwfOptions 推荐:RASEO_RemoteDefaultGateway(见图2.) |RASEO_ModemLights(见图3.)

 

③.RasDial 

The RasDial function establishes a RAS connection between a RAS client and a RAS server. The connection data includes callback and user-authentication information.

 

④.RasEnumConnections 

The RasEnumConnections function lists all active RAS connections. It returns each connection's handle and phone-book entry name.

 

⑤.RasHangUp 

The RasHangUp function terminates a remote access connection. The connection is specified with a RAS connection handle. The function releases all RASAPI32.DLL resources associated with the handle.

图1.

 

图2.

图3.

 

 

 

 

 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值