[Winpcap-users] Borland C++Builder users: Unexpected warning in Microsoft wspiapi.h header file

Sam Picture spicture at socal.rr.com
Thu May 8 08:58:45 GMT 2008


I am using Borland C++Builder 6 and WinPcap 4.0.2. I also got this
unexpected warning when I tried to build the iflist example. I got around it
by modifying Microsoft's wspiapi.h header file as follows.

 

////////////////////////////////////////////////////////////////////////////
//////////////////////

//  Modified by Samuel H. Picture May 5, 2008                             //

//
//

//  Original Code:
//

//  if ((iFlags & NI_NOFQDN) && (pc = strchr(pszNode, '.')))           //

//   *pc = '\0';
//

////////////////////////////////////////////////////////////////////////////
//////////////////////

char _string[40];

char *ptr;

strcpy(_string, ptHost->h_name);

ptr = strchr(_string, c);

if ((iFlags & NI_NOFQDN) && (ptr))

  *pc = '\0';

///////////////////////////////// END MODIFICATION
/////////////////////////////////

 

Also I had to add to add the following preprocessor directive statements at
the beginning of iflist.c:

            

#define WIN32

            #define WPCAP

            #define HAVE_REMOTE

 

Don't forget that you have use Borland C++Builder's \bin\coff2omf.exe to
convert WinPcap's Packet.lib and wpcap.lib from COFF to OMF format before
you can use them.

 

Sincerely,

Samuel Picture

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20080508/a3a774e4/attachment.htm


More information about the Winpcap-users mailing list