Maarten Lankhorst m.b.lankhorst@gmail.com writes:
+/* Note: this thread can be TerminateThread'd, when not in critical section
- Hence I use alloca here, and a critical section to protect when it is not
- desired to be TerminateThread'd, assume when the critical section is taken
- we won't ever get it back and we're signalled to terminate
- */
+static DWORD WINAPI callback_thread(LPVOID lParam)
You can't use TerminateThread for normal termination, it should only be used for fatal erros when cleaning up properly is not possible. Also please don't use alloca.