🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #4786

Code problem

#4786
From: Maurice
Date: Tue, 14 Dec 2004 16:21
28 lines
1759 bytes
I tried to use the following piece of code posted by Remy in answer to a 
problem.

void __fastcall WriteRawToSocket(TCustomWinSocket *ASocket, void *AData,
int ASize)
     {
         BYTE *Ptr = (BYTE*) Data;
         int Sent;

         while( ASize > 0 )
         {
             Sent = ASocket->SendBuf(Ptr, ASize);
             if( Sent > -1 )
             {
                 Ptr += Sent;
                 ASize -= Sent;
             }
             else if( WSAGetLastError() != WSAEWOULDBLOCK )
                 return;
         }
     }

When I compile it i get the following error:

[C++ Error] FunctionsUnit.h(6): E2147 'TCustomWinSocket' cannot start a 
parameter declaration. Can anyone help me with this problem?

Maurice
Technical Details
Message-ID: <41bf1302$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,29bbb0e4385845fe,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 14 Dec 2004 16:21:23 +0000
From: Maurice <moheneghan@netscape.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Code problem
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.107.73.25
Message-ID: <41bf1302$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1103041282 81.107.73.25 (14 Dec 2004 08:21:22 -0800)
Lines: 29
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail