Hi All,
This is a long shot but after 2 days of coding I figure I'm unable to fix my problem, which is...
I have a C# GUI that references a C++ .NET DLL (managed) that makes calls to underlying C++ (unmanaged) DLL's. One of the methods in my C++ .NET DLL starts a thread that calls to my underlying C++ DLL, that code looks like this:
m_oThread = gcnew Thread(gcnew ParameterizedThreadStart(this, &MyClass::MethodToRunOnThread));
m_oThread->Start(MyParameter);
void MyClass::MethodToRunOnThread(Object^ step)
{
}
The problem is my underlying DLL calls
CWinThread::PumpMessage
, and my app crashes when I hit that line. It feels like some kind of timing/locking problems because if I step the code as opposed to running it it sometimes gets past that line.
To add more confusion, if I make the call to my underlying C++ DLL without putting it on it's on thread it runs fine, i.e.
MethodToRunOnThread(MyParameter);
I hope I've provided enough info to get you peeps thinking!
Regards,
Chris