Huw Davies (@huw) commented about dlls/uiautomationcore/uia_provider.c:
+}
+static BOOL uia_start_provider_thread(void) +{
- BOOL started = TRUE;
- EnterCriticalSection(&provider_thread_cs);
- if (++provider_thread.ref == 1)
- {
HANDLE ready_event;
HANDLE events[2];
HMODULE hmodule;
DWORD wait_obj;
GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
(const WCHAR *)uia_start_provider_thread, &hmodule);
Isn't this a complicated way of retrieving the current module? In any case, `hmodule` isn't used after this.
In general, there's any awful lot of code in each commit of this MR, which makes it very hard to review. Please try to split things up.