🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Indy and WinSock2.h problem

#4454
From: Bob Gonder
Date: Tue, 08 Feb 2005 23:08
30 lines
2305 bytes
Remy Lebeau (TeamB) wrote:

>> Would it cause run-time conflicts if he used the 2
>> winsocks in different modules?
>
>It would cause compile-time conflicts.  #define statements are global in
>nature.  winsock2.h disables winsock.h via a #define, so if one module
>includes winsock2.h first, the other module will likely fail to compile
>since winsock.h will be disabled from declaring anything that the module is
>using.

Sorry, in my world, different modules produce different OBJs
So a module that includes <Indy> and uses Indy functions should
compile, and a module that contains <winsock> and calls naked sock
functions should compile. The linker should be able to combine them.
But I wonder how it would decide which Sock.DLL to bind each obj to.
That's probably the problem with that.

>> Write Indy code in one, and Winsock code in another?
>
>The only reliable way I know to do that is to put each module into its own
>separate DLL.

Yeah, that'd work.

'Course, it'd be easier for the OP to just use the winsock2 functions.
Or the Indy functions as you mentioned.

Only things I think I saw missing from winsock2 were ip-multicast and
SO_SYNCxxx and "other NT specific options"..
Technical Details
Message-ID: <ncfi01dumn3cn7h27dsm4je1vbkfh7ako1@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4208eb0f@newsgroups.borland.com> <4208f629$1@newsgroups.borland.com> <t51i01puq1d6d5v5h92h300b7d3eni27tm@4ax.com> <42090d9d@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,107c7f042cb7cb6a
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: Indy and WinSock2.h problem
Date: Tue, 08 Feb 2005 15:08:39 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <ncfi01dumn3cn7h27dsm4je1vbkfh7ako1@4ax.com>
References: <4208eb0f@newsgroups.borland.com> <4208f629$1@newsgroups.borland.com> <t51i01puq1d6d5v5h92h300b7d3eni27tm@4ax.com> <42090d9d@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: 67.77.147.252
X-Trace: newsgroups.borland.com 1107904117 67.77.147.252 (8 Feb 2005 15:08:37 -0800)
Lines: 33
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail