πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #1322

problema con RasDial

#1322
From: alex
Date: Mon, 21 Jun 2004 18:54
55 lines
2738 bytes
per assicurarmi che il mio computer sia sempre connesso a internet, ho
fatto questo programmino

Private Type RASDIALPARAMS
    dwSize As Long
    szEntryName As String * RAS_MaxEntryName
    szPhoneNumber As String * RAS_MaxPhoneNumber
    szCallbackNumber As String * RAS_MaxCallbackNumber
    szUserName As String * UNLEN
    szPassword As String * PWLEN
    szDomain As String * DNLEN
End Type

Private Declare Function rasDial Lib "RasApi32.DLL" Alias "RasDialA"
(lpRasDialExtensions As Any, ByVal lpszPhonebook As String,
lprasdialparams As Any, ByVal dwNotifierType As Long, lpvNotifier As
Long, lphRasConn As Long) As Long
Private Declare Function RasHangUp Lib "RasApi32.DLL" Alias
"RasHangUpA" (ByVal hRasConn As Long) As Long

Function dial(nomeCon$, user$, pass$) As Long
    Dim RasDialP As RASDIALPARAMS
    Dim hRasConn As Long
    
    With RasDialP
        .dwSize = 1052
        .szPhoneNumber = vbNullChar
        .szCallbackNumber = vbNullChar
        .szDomain = vbNullChar
        .szEntryName = nomeCon & vbNullChar
        .szUserName = user & vbNullChar
        .szPassword = pass & vbNullChar
    End With

    Do
        While InternetGetConnectedState(0&, 0&)
            DoEvents
        Wend
        
        dial = rasDial(ByVal 0&, vbNullString, RasDialP, &HFFFF, hWnd,
hRasConn)
        
        If dial <> 0 Then
            MsgBox "errore " & dial
            RasHangUp ByVal dial
        End If
    Loop
End Function

perοΏ½ come al solito c'οΏ½ un problema.
Appena lo lancio la connessioene viene stabilita regolarmente, ma se
poi mi disconnetto di proposito, e ovviamente il programma tenta la
riconnessione, la variabile dial mi restituisce il codice di errore
756.
Cosa significa?
Technical Details
Message-ID: <u3t1zlhf.4zzrtzlc.w7zqtqrj.a0bdqzf3.kswgyqg4@izm9q.afv7o.ezjpl.yeyuw8>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!zen.net.uk!dedekind.zen.co.uk!newsfeed.tpinternet.pl!newsfeed.gazeta.pl!news.gazeta.pl!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f94ee,5f146a4584f9b00,start
X-Google-Attributes: gidf94ee,public
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!zen.net.uk!dedekind.zen.co.uk!newsfeed.tpinternet.pl!newsfeed.gazeta.pl!news.gazeta.pl!not-for-mail
From: alex <ilnewsgroup@despammed.com>
Newsgroups: free.it.visual-basic
Subject: problema con RasDial
Date: Mon, 21 Jun 2004 18:54:02 GMT
Organization: Portal Gazeta.pl -> http://www.gazeta.pl
Lines: 56
Message-ID: <u3t1zlhf.4zzrtzlc.w7zqtqrj.a0bdqzf3.kswgyqg4@izm9q.afv7o.ezjpl.yeyuw8>
NNTP-Posting-Host: host51-161.pool80104.interbusiness.it
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: inews.gazeta.pl 1087844067 3495 80.104.161.51 (21 Jun 2004 18:54:27 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Mon, 21 Jun 2004 18:54:27 +0000 (UTC)
X-User: alex.giusti
X-Proces-App-Title: Power News 1.0.0