<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7600.16625"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px" 
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true" 
name="Compose message area">
<DIV><FONT face=Calibri>Tom,</FONT></DIV>
<DIV><FONT face=Calibri></FONT>&nbsp;</DIV>
<DIV><FONT face=Calibri>you need to make sure that pcap.h is included before 
winsock.h</FONT></DIV>
<DIV><FONT face=Calibri></FONT>&nbsp;</DIV>
<DIV><FONT face=Calibri>Have a nice day</FONT></DIV>
<DIV><FONT face=Calibri>GV</FONT></DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><FONT size=3 face=Calibri></FONT><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=tchapman131@gmail.com 
href="mailto:tchapman131@gmail.com">Tom Chapman</A> </DIV>
<DIV><B>Sent:</B> Wednesday, October 13, 2010 8:41 AM</DIV>
<DIV><B>To:</B> <A title=winpcap-users@winpcap.org 
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV><B>Subject:</B> [Winpcap-users] Using WinPcap with Visual C++ version 
6.</DIV></DIV></DIV>
<DIV><BR></DIV>I have an existing MFC project that uses Visual C++ Version 6. I 
want to add WinPcap to this project. In one of my .cpp files, I added #include 
"pcap.h". When this file is compiled I receive a bunch of compiler errors. 
Apparently WinPcap includes winsock2.h and this conflicts with winsock.h that 
the compiler is already using. I can't find how to make this work. In older 
posts on the web, I have found various "ideas" people have posted as possible 
solutions. Many of these posts are not my exact situation. None of these have 
worked for me.<BR><BR><U><B>How can I get the compiler to work with 
WinPcap?</B></U><BR><BR>FYI: I have installed the platform SDK Aug 2004 edition. 
Do I need to register this somehow within Visual C++? How? Where in the 
menus?<BR><BR><BR>Thank you for helping me.<BR><BR><BR>Below are the first few 
errors that I receive:<BR><BR>c:\program files\microsoft visual 
studio\vc98\include\winsock2.h(99) : error C2011: 'fd_set' : 'struct' type 
redefinition<BR>c:\program files\microsoft visual 
studio\vc98\include\winsock2.h(134) : warning C4005: 'FD_SET' : macro 
redefinition<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c:\program 
files\microsoft visual studio\vc98\include\winsock.h(83) : see previous 
definition of 'FD_SET'<BR>c:\program files\microsoft visual 
studio\vc98\include\winsock2.h(143) : error C2011: 'timeval' : 'struct' type 
redefinition<BR>c:\program files\microsoft visual 
studio\vc98\include\winsock2.h(199) : error C2011: 'hostent' : 'struct' type 
redefinition<BR>c:\program files\microsoft visual 
studio\vc98\include\winsock2.h(212) : error C2011: 'netent' : 'struct' type 
redefinition<BR>c:\program files\microsoft visual 
studio\vc98\include\winsock2.h(219) : error C2011: 'servent' : 'struct' type 
redefinition<BR>c:\program files\microsoft visual 
studio\vc98\include\winsock2.h(226) : error C2011: 'protoent' : 'struct' type 
redefinition<BR>c:\program files\microsoft visual 
studio\vc98\include\winsock2.h(310) : error C2011: 'in_addr' : 'struct' type 
redefinition<BR>c:\program files\microsoft visual 
studio\vc98\include\winsock2.h(368) : error C2011: 'sockaddr_in' : 'struct' type 
redefinition<BR>c:\program files\microsoft visual 
studio\vc98\include\winsock2.h(378) : error C2011: 'WSAData' : 'struct' type 
redefinition<BR>c:\program files\microsoft visual 
studio\vc98\include\winsock2.h(430) : warning C4005: 'SO_DONTLINGER' : macro 
redefinition<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c:\program 
files\microsoft visual studio\vc98\include\winsock.h(391) : see previous 
definition of 'SO_DONTLINGER'<BR><BR>
<P>
<HR>

<P></P>_______________________________________________<BR>Winpcap-users mailing 
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BODY></HTML>