Article View: borland.public.cppbuilder.nativeapi
Article #9248Re: Ras again
From: Babak
Date: Tue, 20 Jul 2004 09:31
Date: Tue, 20 Jul 2004 09:31
38 lines
2160 bytes
2160 bytes
I Improve my source to this below:
RASENTRYNAME entries[256];
entries[0].dwSize = sizeof(RASENTRYNAME);
int rv;
char *lip;
DWORD size = sizeof(entries);
DWORD i,res,numEntries = 10;
BOOL passwordreturned;
res = RasEnumEntries(NULL, NULL, entries, &size, &numEntries);
for(i=0 ; i<numEntries ; i++){
RASDIALPARAMS params = {sizeof(RASDIALPARAMS), 0};
strncpy(params.szEntryName,
entries[i].szEntryName,
RAS_MaxEntryName);
rv=RasGetEntryDialParams(NULL, ¶ms, &passwordreturned);
if( rv == 0 ){
Memo1->Lines->Add("Connection
Name:"+AnsiString(params.szEntryName));
Memo1->Lines->Add("UseName:"+AnsiString(params.szUserName));
Memo1->Lines->Add("Password:"+AnsiString(params.szPassword));
Memo1->Lines->Add("Phone #:"+AnsiString(params.szPhoneNumber));
Memo1->Lines->Add("User Home
#:"+AnsiString(params.szCallbackNumber));
Memo1->Lines->Add("NetDomain:"+AnsiString(params.szDomain));
Memo1->Lines->Add("-------------------------");
}
}
// gethostname(lip,20);
// Memo1->Lines->Add("LIP:"+AnsiString(lip));
Memo1->Lines->Add("LIP:"+Powersock1->LocalIP);
ShowMessage("Res:"+IntToStr(res)+"\nrv:"+IntToStr(rv)+"\n");
but I cant access (see) the Dial number !!
what happen?
how could I fix it?
thx
Technical Details
Message-ID:
<40fce98c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40f805ab@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6d4b466cdd4c8652 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Babak" <babak_info@hot.pop> Newsgroups: borland.public.cppbuilder.nativeapi References: <40f805ab@newsgroups.borland.com> Subject: Re: Ras again Date: Tue, 20 Jul 2004 14:01:28 +0430 Lines: 41 X-Newsreader: Microsoft Outlook Express 4.72.3110.37 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.37 NNTP-Posting-Host: 217.219.61.11 Message-ID: <40fce98c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090316684 217.219.61.11 (20 Jul 2004 02:44:44 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail