Article View: borland.public.cppbuilder.internet.socket
Article #1528Re: TClientSocket in consolle applications
From: Bob Gonder
Date: Sun, 24 Dec 2006 19:06
Date: Sun, 24 Dec 2006 19:06
25 lines
1885 bytes
1885 bytes
Stefano Bonifazi wrote:
>> I was going to show the Charles Petzold way (plain WinAPI),
>
>Please do!
There is a link in here, under Programming Windows 95
http://www.charlespetzold.com/books.html
I took a random look at Chapter 3, sysmets1.c, and it has what appears
to be a fully functional WinMain and WinProc.
Strip the function and paramters off WinMain, and inject the naked
function into a thread
Adjust the case() statements in the WinProc to handle the messages
your TClient requires.
>> void __fastcall TMyThread::Execute()
>> {
naked WinMain function code goes here
>> }
Also, I'm sure there are more involved examples in the later chapters,
if you are interested in WinAPI programming.
Technical Details
Message-ID:
<d8jto297tbj4frodou41a9kjgn8fqhfmfj@4ax.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<458d3f0d@newsgroups.borland.com> <rklqo2pjrnk6arfk43f665lq65djkr55vq@4ax.com> <458d72cc@newsgroups.borland.com> <fv1ro296vpodms19ois98boakdgo5cd59r@4ax.com> <458e6fe3@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,dab0ff5b2d1109 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: TClientSocket in consolle applications Date: Sun, 24 Dec 2006 11:06:05 -0800 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <d8jto297tbj4frodou41a9kjgn8fqhfmfj@4ax.com> References: <458d3f0d@newsgroups.borland.com> <rklqo2pjrnk6arfk43f665lq65djkr55vq@4ax.com> <458d72cc@newsgroups.borland.com> <fv1ro296vpodms19ois98boakdgo5cd59r@4ax.com> <458e6fe3@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 71.0.35.145 X-Trace: newsgroups.borland.com 1166987142 71.0.35.145 (24 Dec 2006 11:05:42 -0800) Lines: 27 Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail