1 Unhandled exception in MyTest.exe:0xC000005:Access Violation
程序中调用某个dll,编译正常,运行时报错如上。产生此问题的原因好像多种,有说是dll内问题和dll内有new有关、有说调用问题接口写错之类等等
我程序中遇到该问题为:没有继承dll中某个类,可能是与dll的设计有关、对所调用的dll理解不够
2 类指针强制转换
问题现象:A类调用B类的方法并传递A的指针,在B中回调A的某个方法时并未实现回调的效果。
A中 (注:A继承了,VilarEventHandler, DataRecver)
int A::OpenStream()
{
return m_pDev->OpenStream(&m_lSourceStreamID, m_nChn, m_bSubStream, this, (long)this);
//return m_pDev->OpenStream(&m_lSourceStreamID, m_nChn, m_bSubStream,this, this, (long)this);
}