Article View: borland.public.cppbuilder.internet.socket
Article #3048Re: Indy 9: winsock2.h and winsock.h conflict resolution
From: Daniel Stevenson
Date: Thu, 24 Nov 2005 06:49
Date: Thu, 24 Nov 2005 06:49
22 lines
2284 bytes
2284 bytes
> > According to my research, the windows.h calls upon windows.h > > which in turn calls upon winsock.h and therefore the only way to > > stop the errors that are generated is by including winsock2.h prior > > to vcl.h. But if I can compile a form that is directly using the indy > > components without first including winsock2.h, how does this not > > cause a problem with winsock.h? > > If winsock2.h gets included into the precompiler before winsock.h, then > winsock2.h disables winsock.h automatically. Not trying to be picky, but if #include <vcl.h> is always the first include in any form, and if vcl.h calls upon winsock.h (indirectly) then wouldn't that mean that winsock.h will always be included in the precompiler first? and therefore requires #include <winsock2.h> prior to #include <vcl.h>. I think I'm trying to confirm whether my first assumption is correct that vcl.h is in fact calling upon winsock.h? If vcl.h is not calling up winsock.h then I can look to find which of my other headers is calling winsock.h and hopefully resolve this...I just don't like having to include a mandatory #include <winsock2.h> on all forms even though I'm not using any internet components.
Technical Details
Message-ID:
<438bd29a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!195.92.193.196.MISMATCH!nntp.theplanet.net!inewsm1.nntp.theplanet.net!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43824b20$1@newsgroups.borland.com> <43825bf0$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,6c4df013894db185 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Daniel Stevenson" <daniel@ocreage.com.au> Newsgroups: borland.public.cppbuilder.internet.socket References: <43824b20$1@newsgroups.borland.com> <43825bf0$1@newsgroups.borland.com> Subject: Re: Indy 9: winsock2.h and winsock.h conflict resolution Date: Thu, 24 Nov 2005 17:49:17 +1100 Lines: 24 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: 150.101.156.50 Message-ID: <438bd29a@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1133236890 150.101.156.50 (28 Nov 2005 20:01:30 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!195.92.193.196.MISMATCH!nntp.theplanet.net!inewsm1.nntp.theplanet.net!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail