On Mar 30, 2005, at 1:44 PM, Mario Hollibaugh wrote:
I am no expert with winpcap by far, but The first thing that strikes me is that you are defining your packet handler as a member of the class TableState. Perhaps your callback function, packet_handler... whatever you decide to call it, needs to be a standalone function and not part of the class. Also you referenced wrapping the code in extern "C", and I see the idea there is to tell the linker to expect C functions not C++. I was reading a site the other day on using the extern keyword with C++ class members to tell the linker to give them C linkage, and I don't think it's that simple from what I read. I just googled for like 15 minutes and I can't find that site again, but I KNOW the site contained details on how to give C linkage to something that's in a C++ class member function.
Some Googling for
calling C++ class members from C
found
http://www.objectvalue.com/articles/LinkingCtoCplusplusV02.html
which says:
3 Linking C to C++ Objects
There’s no way in which you can declare C linkage for member functions of classes. Therefore the only way to call them from C is to go via a non-member function as intermediary. This is referred to as a “glue function”.
================================================================= This is the WinPcap users list. It is archived at http://www.mail-archive.com/winpcap-users@winpcap.polito.it/
To unsubscribe use mailto: [EMAIL PROTECTED] =================================================================