前一阵因为工作需要写了一个类来进行windows拨号,整理了一下,多封装了几个windows ras api,放上来大家提提意见.现在支持读取windows拨号连接列表.拨号.挂断.创建/删除连接,可以适用98/2000/xp,windows me 与nt没测试过,想来应该是可以的.以后有时间写成component,加入对拨号事件的支持.
【程序编程相关:用DELPHI实现对象持久层(-)】uses 【推荐阅读:Delphi实用代码:自绘XP风格菜单】
type 【扩展信息:为Windows Service添加服务】
ras, classes, sysutils, strutils, windows, forms; eraserror = exception;type
trasconnection = class private fplatform: integer; fconnected: boolean; frasentries: tstringlist; frasconn: hrasconn; fparams: rasdialparams; ferrno: integer; function getpassword: string; procedure setpassword(password: string); function getphoneno: string; procedure setphoneno(number: string); function getcallback: string; procedure setcallback(number: string); function getdomain: string; procedure setdomain(domain: string); function getusername: string; procedure setusername(username: string); function getentryname: string; procedure setentryname(entry: string); function getconnected: boolean; procedure setconnected(avalue: boolean); function getrasentries: tstringlist; public property rasentries: tstringlist read getrasentries; ... 下一页