I made a DLL in VC++ using Visual Studio 2008 professional and I'm trying to test(debug) it! So I made another project but when I try to make a step into a class I made it just steps forward.
I also try click on the class and go to the definition (where it appear Cannot Load Symbol)
I try in tool>>options>>Debuging>>symbols to add the path to the .pdb file
My code as the dll declaration
#pragma once
__declspec(dllexport) long sdk_init();
//__declspec(dllexport) long sdk_release();
__declspec(dllexport) long sdk_connect(long handle);
__declspec(dllexport) long sdk_getObjectList(long handle);
//__declspec(dllexport) long sdk_disconnect(long handle);
__declspec(dllexport) long sdk_playStream(long handle, int idx);
__declspec(dllexport) long sdk_stopStream(long handle, int idx);
and then the implemantetion for instance ~
long sdk_init(){
CDataManager* m_DataManager = new CDataManager();
int i = m_DataManager->InitXns();
if(i == 0){
return 0;
}
return (long) m_DataManager;
}
The class I can't step into is the CDataManager, that is a class created by me. #include
using namespace std;
#include <list>
class CDataManager :
public IDeviceSink,
public IMediaSink
{
public:
int InitXns(void);
int Connect(int nDeviceId);
int GetObjectList(void);
int RequestLiveStream(int videoSource);
int StopLiveStream(int videoSource);
private:
int m_bInitXns;
int login;
//store in list?
XNS_DEVICE2 m_sDevice;
//safe store?
XNS_OBJECT *m_pObject;
XNS_OBJECT *m_pVideoSource;
public:
CDataManager();
virtual ~CDataManager();
int SetWnd(HWND hWnd);
long OnResponse(XNS_REQUEST* pReq);
long OnEvent(XNS_EVENT* pEvent);
long OnVideo(UINT nMID, XNS_VIDEO_HEADER* pVideo);
long OnAudio(UINT nMID, XNS_AUDIO_HEADER* pAudio);
I managed to fix my problem: I changed the "Debugger Type" to "Mixed" in configuration properties>>debugging of my test solution
Anyhow, I don't understand the why I need to do that, if someone was an explanation please post.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.