Article View: borland.public.cppbuilder.nativeapi
Article #8647Re: RAS Sample Source Needed
From: Pedram
Date: Fri, 01 Oct 2004 21:01
Date: Fri, 01 Oct 2004 21:01
49 lines
2534 bytes
2534 bytes
"Bob Gonder" <notbg@notmindspring.invalid> wrote :
> > char buffer[100];
> > RASDIALPARAMS params;
> > bool password;
Thanks Bob !
I changed bool to BOOL !!
and I have this :
//------------------------
#define WINVER 0x400
#include <ras.h>
bool TForm1::EnumEntries()
{
RASENTRYNAME *entry = new RASENTRYNAME[30];
DWORD entries, size;
char buffer[100];
RASDIALPARAMS params;
// bool password; is changed to below Gonder teach me !
BOOL password;
entry[0].dwSize = sizeof(RASENTRYNAME);
size = 30 * sizeof(RASENTRYNAME);
RasEnumEntries(NULL, NULL, entry, &size,
&entries);
for(int x = 0; x < (int)entries; x++){
Memo1->Lines->Add(entry[x].szEntryName);
memset(¶ms, 0, sizeof(RASDIALPARAMS));
params.dwSize = sizeof(RASDIALPARAMS);
strcpy(params.szEntryName, entry[x].szEntryName);
RasGetEntryDialParams(NULL, ¶ms,
(LPBOOL)&password);
Memo1->Lines->Add(params.szUserName); // respond OK
Memo1->Lines->Add(params.szPassword); // respond OK
Memo1->Lines->Add(params.szPhoneNumber);// My Problem here
Memo1->Lines->Add("=====================");
}
return true;
}
//-----------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
EnumEntries();
}
//------------------------------------
I read in Help file something about Empty string szPhoneNumber but I cant
understand it !
My Problem still Persists !
some one gim'me a hand plz :">
Technical Details
Message-ID:
<41607808@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<415b0fd9@newsgroups.borland.com> <415b1538@newsgroups.borland.com> <415bf638@newsgroups.borland.com> <t6mol0lip07tfj1a9c46uh61duttldgcju@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,98b2d4516f3e209b X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Pedram" <Pedram@Internet.Network> Newsgroups: borland.public.cppbuilder.nativeapi References: <415b0fd9@newsgroups.borland.com> <415b1538@newsgroups.borland.com> <415bf638@newsgroups.borland.com> <t6mol0lip07tfj1a9c46uh61duttldgcju@4ax.com> Subject: Re: RAS Sample Source Needed Date: Sat, 2 Oct 2004 00:31:54 +0330 Lines: 51 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 213.165.107.128 Message-ID: <41607808@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1096841224 213.165.107.128 (3 Oct 2004 15:07:04 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail