如何在启动机器时自动运行adsl拨号(1)[5]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 zhujunfeng 的 blog

function rasconnectionstatetostring(nstate : integer) : string;
begin
    case nstate of
    rascs_openport:             result := 'opening port';
    rascs_portopened:           result := 'port opened';
    rascs_connectdevice:        result := 'connecting device';
    rascs_deviceconnected:      result := 'device connected';
    rascs_alldevicesconnected:  result := 'all devices connected';
    rascs_authenticate:         result := 'starting authentication';
    rascs_authnotify:           result := 'authentication notify';
    rascs_authretry:            result := 'authentication retry';
    rascs_authcallback:         result := 'callback requested';
    rascs_authchangepassword:   result := 'change password requested';
    rascs_authproject:          result := 'projection phase started';
    rascs_authlinkspeed:        result := 'link speed calculation';
    rascs_authack:              result := 'authentication acknowledged';
    rascs_reauthenticate:       result := 'reauthentication started';
    rascs_authenticated:        result := 'authenticated';
    rascs_prepareforcallback:   result := 'preparation for callback';
    rascs_waitformodemreset:    result := 'waiting for modem reset';
    rascs_waitforcallback:      result := 'waiting for callback';
    rascs_projected:            result := 'projected';
{$ifdef winver400}
    rascs_startauthentication:  result := 'start authentication';
    rascs_callbackcomplete:     result := 'callback complete';
    rascs_logonnetwork:         result := 'logon network';
{$endif}
    rascs_subentryconnected:    result := '';
    rascs_subentrydisconnected: result := '';
    rascs_interactive:          result := 'interactive';
    rascs_retryauthentication:  result := 'retry authentication';
    rascs_callbacksetbycaller:  result := 'callback set by caller';
    rascs_passwordexpired:      result := 'password expired';
    rascs_connected:            result := 'connected';
    rascs_disconnected:         result := 'disconnected';
    else
        result := 'connection state #' + inttostr(nstate);
    end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
function rasgetipaddress: string;
var
    rasconns   : trasconn;
    dwsize     : dword;
    dwcount    : dword;
    raspppip   : traspppip;
begin
    result          := '';
    rasconns.dwsize := sizeof(trasconn);
    raspppip.dwsize := sizeof(raspppip);
    dwsize          := sizeof(rasconns);
    if rasenumconnectionsa(@rasconns, @dwsize, @dwcount) = 0 then begin
        if dwcount > 0 then begin
            dwsize := sizeof(raspppip);
            raspppip.dwsize := sizeof(raspppip);
            if rasgetprojectioninfoa(rasconns.hrasconn,

本文关键:adsl 拨号 服务
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top