Reputation: 647
I ported a project from Visual Studio Express (Windows SDK x64 with CMake) to Visual Studio 2010 Professional (Compiling for x64). Everything seems to work. I can compile the .dll projects that I transformed. Getting to my test projects I'm facing a strange behavior. (Link/Include libraries are set up the same way).
Edit Same thing happens for Release/Debug.
I get the following error (when I rune the code in Visual Studio 2010):
KernelBase.dll!RaiseException() + 0x3d bytes
msvcr100.dll!_CxxThrowException() + 0x81 bytes
000007fe8d54a043()
000007fe8d548700()
000007fe8d547d20()
000007fe8d547cee()
000007fe8d547c79()
clr.dll!000007feecbc822e()
[Frames below may be incorrect and/or missing, no symbols loaded for clr.dll]
kernel32.dll!BaseThreadInitThunk() + 0xd bytes
ntdll.dll!RtlUserThreadStart() + 0x21 bytes
Upvotes: 1
Views: 666
Reputation: 647
Problem was solved thanks to the guys for helping me out with the debugging ...
So here's the deal:
I was creating multiple output windows. Every one of them were having a different thread. In the initialization part I had the following code:
m_wndclassName = L"Output App"; // Here's the bug, the names should be different ...
m_wndclass.style = 0;
m_wndclass.lpfnWndProc = (WNDPROC)OpenGLSinkNode::wndProc;
m_wndclass.cbClsExtra = 0;
m_wndclass.cbWndExtra = 0;
m_wndclass.hInstance = NULL;
m_wndclass.hIcon = LoadIcon(NULL, m_wndclassName.c_str());
m_wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
m_wndclass.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
m_wndclass.lpszMenuName = m_wndclassName.c_str();
m_wndclass.lpszClassName = m_wndclassName.c_str();
Solution:
m_wndclassName = L"Output App"; + std::to_wstring( (long double)m_id); // watch out here because std::to_wstring() has a bug ... you have to cast it to (long double), my_id of type int (Only in VS 2010, I read.)
Upvotes: 0