If I understand you correctly, your situation is like this (using pseudocode for brevity)
C#
==
Main()
{
StartNewThread(MyThread);
DoStuff();
}
MyThread()
{
UnmanagedDll.DoSomething();
}
Unmanaged DLL
=============
DoSomething()
{
}
Is it correct?
If so, then returning from UnmanagedDll.DoSomething () will end the call to the calling thread if there are no statements after calling UnmanagedDll.DoSomething (). So, just return control back to the C # program.
If this is not your situation, please provide more information.
source
share