🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11742

Re: RasDial

#11742
From: Remy Lebeau (TeamB)
Date: Thu, 22 Jan 2004 19:25
39 lines
1905 bytes
"Babak" <babak_info@hotpop.com> wrote in message
news:401017b7@newsgroups.borland.com...

> Its so nice of somebody if show me a simple sample for these functions:
> RasGetEntryDialParams()
> RasDial()

    #include <ras.h>

    RASDIALPARAMS params = {sizeof(RASDIALPARAMS), 0};
    BOOL bPassword = FALSE;

    strncpy(params.szEntryName, "Your DUN entry name here",
RAS_MaxEntryName);

    if( RasGetEntryDialParams(NULL, &params, &bPassword) == 0 )
    {
        HRASCONN hRasConn = NULL;
        if( RasDial(NULL, NULL, &params, 0, NULL, &hRasConn) == 0 )
        {
            //...

            RasHangup(hRasConn);

            RASCONNSTATUS status = {sizeof(RASCONNSTATUS), 0};
            DWORD dwRet;
            do
            {
                dwRet = RasGetConnectStatus(hRasConn, &status);
                Sleep(0);
            }
            while( (dwRet != ERROR_INVALID_HANDLE) && (status.dwError !=
ERROR_INVALID_HANDLE) );
        }
    }


Gambit
Technical Details
Message-ID: <40102213$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!news.belwue.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <401017b7@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,3481cb0467710dc3
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-22 11:40:36 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <401017b7@newsgroups.borland.com>
Subject: Re: RasDial
Date: Thu, 22 Jan 2004 11:25:20 -0800
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.138.253
Message-ID: <40102213$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1074799123 67.22.138.253 (22 Jan 2004 11:18:43 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!news.belwue.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail