🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: RAS

#10436
From: Babak
Date: Thu, 08 Apr 2004 08:48
26 lines
1561 bytes
    RASENTRYNAME entries[256];
    entries[0].dwSize = sizeof(RASENTRYNAME);
    DWORD numEntries = 0;
    DWORD size = sizeof(entries);
    DWORD res = RasEnumEntries(NULL, NULL, entries, &size, &numEntries);
    if( res == 0 ) // <-- always check return values!!!!!
    {
        for(DWORD i = 0; i < numEntries; ++i)
            ShowMessage(entries[i].szEntryName);
    }
    ShowMessage(res);

This Will Show me 610 !!
I guess its Error Code 610 for RasEnumEntries() :-?
As in raserror.h we have :
#defne RASBASE 600
#define ERROR_BUFFER_INVALID                 (RASBASE+10)
/*
 * An invalid buffer was specified.%0
 */

What should I do now?
why buffer is invalid?
what shoudl I do to corrent?
even the long code you said has not functioning good in my machine.
Thx @};-
Technical Details
Message-ID: <40755285@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.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

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,5fa49b49fea22a15
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-04-08 06:40:09 PST
From: "Babak" <babak_info@hot.pop>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: RAS
Date: Thu, 8 Apr 2004 13:18:14 +0430
Lines: 28
X-Newsreader: Microsoft Outlook Express 4.72.3110.37
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.37
NNTP-Posting-Host: 80.78.132.48
Message-ID: <40755285@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1081430661 80.78.132.48 (8 Apr 2004 06:24:21 -0800)
Path: arc1-ca.pugleaf.net!archiver1.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