Article View: borland.public.cppbuilder.internet.socket
Article #366Safe to modify machine-generated headers?
From: Mike K
Date: Wed, 26 Mar 2008 22:33
Date: Wed, 26 Mar 2008 22:33
13 lines
2092 bytes
2092 bytes
Hope this is posted to the right group; the problem surfaced when I created an app that uses TCP sockets. I'm using the WinPCap library to create raw sockets in promiscuous mode. This uses winsock2.h, which is based on winsock 2.2. The app compiles and runs fine. I also need to open a standard TServerSocket to open a pipe to another application. As soon as I drop this component onto the form, the compiler complains about a multiple declaration for 'fd_set', which is defined in both winsock.h and winsock2.h. Turns out the Borland native components call winsock.h in WinSock.hpp, so both winsock header files are used, creating the conflict. Can I modify WinSock.hpp to call winsock2.h instead of winsock.h without destroying previous projects, or creating some kind of rift in the time-space continuum? The change seems innocuous enough, but WinSock.hpp explicitly states "dont modify this machine-generated header". Does this mean that even if I change the reference from winsock to winsock2, it will be overwritten anyway? For various reasons, I'd like to have (int the same application) the use of both my standard Borland socket components and the WinPcap library as well. TIA Mike
Technical Details
Message-ID:
<47eacf28$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!eweka.nl!lightspeed.eweka.nl!213.239.142.2.MISMATCH!feed.xsnews.nl!border-1.ams.xsnews.nl!ecngs!feeder.ecngs.de!news.isoc.lu!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,c924a16d59a4cb70,start X-Google-Attributes: gid11508e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 26 Mar 2008 17:33:13 -0500 From: Mike K <nospam@nospam.net> User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Safe to modify machine-generated headers? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 74.36.61.84 Message-ID: <47eacf28$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1206570792 74.36.61.84 (26 Mar 2008 15:33:12 -0700) Lines: 13 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!eweka.nl!lightspeed.eweka.nl!213.239.142.2.MISMATCH!feed.xsnews.nl!border-1.ams.xsnews.nl!ecngs!feeder.ecngs.de!news.isoc.lu!newsgroups.borland.com!not-for-mail