Article View: borland.public.cppbuilder.nativeapi
Article #15971Re: WSA????
From: Remy Lebeau (TeamB)
Date: Thu, 05 Jun 2003 17:24
Date: Thu, 05 Jun 2003 17:24
23 lines
1887 bytes
1887 bytes
"Tharun Pillay" <tharun@webmail.co.za> wrote in message
news:3edf04e1@newsgroups.borland.com...
> I've tried the following code in the OnConnect event
> of the TClientSocket though it returns 10038:
>
> WSAAsyncSelect ((SOCKET)Socket->Handle, Handle, WM_FD_CLOSE, FD_CLOSE)
The Handle property is not a socket at all, it is the HWND that receives the
socket notifications. What you're looking for is the SocketHandle property
instead:
WSAAsyncSelect ((SOCKET)Socket->SocketHandle, Handle, WM_FD_CLOSE,
FD_CLOSE);
However, if you're just trying to close the socket, then you should call the
Socket object's Close() method instead:
Socket->Close();
Gambit
Technical Details
Message-ID:
<3edf7c02$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3edc7a5c@newsgroups.borland.com> <3edc7f28@newsgroups.borland.com> <3edcb8aa@newsgroups.borland.com> <3edccfa2$1@newsgroups.borland.com> <3eddb43a@newsgroups.borland.com> <3ede333d@newsgroups.borland.com> <obssdvopq540mjv03irip73n9rmd9aes4k@4ax.com> <3edf04e1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,30c81141f30ce678 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-06-05 10:30:15 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3edc7a5c@newsgroups.borland.com> <3edc7f28@newsgroups.borland.com> <3edcb8aa@newsgroups.borland.com> <3edccfa2$1@newsgroups.borland.com> <3eddb43a@newsgroups.borland.com> <3ede333d@newsgroups.borland.com> <obssdvopq540mjv03irip73n9rmd9aes4k@4ax.com> <3edf04e1@newsgroups.borland.com> Subject: Re: WSA???? Date: Thu, 5 Jun 2003 10:24:12 -0700 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3edf7c02$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1054833666 207.175.226.26 (5 Jun 2003 10:21:06 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail