Hi,
I have 2 classes in my application: class A and class B.
in CaptureDoc.h
in CaptureDoc.cpp
in winpcap.h
In winpcap.cpp member functions of the CWinpcap class are supposed to call the functions WinpcapThreadEn ded() 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
I have 2 classes in my application: class A and class B.
in CaptureDoc.h
Code:
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;
};
Code:
#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 */
}
Code:
class CWinpcap : public wxThread, wxEvtHandler {
/* ... code*/
virtual void PacketHandler(struct pcap_pkthdr* pkt_header, const unsigned char* pkt_data);
virtual void WinpcapThreadEnded();
/* code */
}
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
Comment