Hi,
I have 2 classes in my application: class A and class B.
in CaptureDoc.h
-
class CCaptureDoc : public CWinpcap
-
{
-
public:
-
CCaptureDoc(wxFrame* capframe, CCaptureWindow* capwindow);
-
-
void PacketHandler(struct pcap_pkthdr* pkt_header, const unsigned char* pkt_data);
-
-
void WinpcapThreadEnded();
-
-
bool m_capmaxperform;
-
private:
-
CCaptureWindow* m_capwindow;
-
wxFrame* m_capframe;
-
};
-
in CaptureDoc.cpp
-
#include "CaptureDoc.h"
-
-
CCaptureDoc::CCaptureDoc(wxFrame* capframe, CCaptureWindow* capwindow)
-
{
-
/* here some code */
-
}
-
-
void CCaptureDoc::PacketHandler(struct pcap_pkthdr* packet_header, const unsigned char* packet_data)
-
{
-
/* here some code */
-
}
-
-
void CCaptureDoc::WinpcapThreadEnded()
-
{
-
/* here some code */
-
}
-
in winpcap.h
-
class CWinpcap : public wxThread, wxEvtHandler {
-
/* ... code*/
-
virtual void PacketHandler(struct pcap_pkthdr* pkt_header, const unsigned char* pkt_data);
-
virtual void WinpcapThreadEnded();
-
/* code */
-
}
-
In winpcap.cpp member functions of the CWinpcap class are supposed to call the functions WinpcapThreadEnded() and PacketHandler()
I need the overriden functions in the derived class to get called by the base class and do their job. Is this the right way to solve this problem. However, I get an error LNK2001: unresolved external symbol....
If it cannot be done in this way, what would another way be ?
Any help would be very appreciated :)
Thanks,
Adina