"Yuri Khan" yurivkhan@gmail.com wrote:
+void selection_acquire(void)
Should be 'static'.
+DWORD WINAPI selection_thread_proc(LPVOID lphwnd)
Should be 'static'. What's the purpose of such a parameter name? 'dummy', 'unused' or just 'param' would be better IMO.
+{
- HANDLE handles[1];
- selection_acquire();
- while (selectionAcquired)
- {
MsgWaitForMultipleObjectsEx(0, handles, INFINITE, QS_SENDMESSAGE, 0);
- }
What's the purpose of 'handles'? 'handles' is not initialized, moreover the number of passed handles is 0. MsgWaitForMultipleObjectsEx() works just fine with '0, NULL' combination.