Hi Dan,

> +/* Dummy thread just to initialize an MTA for the benefit of custom action 
> DLLs */
> +static HANDLE dummy_thread_event = NULL;
> +static HANDLE dummy_thread_handle = NULL;
> +
> +DWORD WINAPI dummy_thread_proc(void *arg)

It appears that calling CreateThread in DLL_PROCESS_ATTACH can cause
deadlocks:

 http://blogs.msdn.com/mgrier/archive/2005/06/21/431378.aspx

It might work if you move it to somewhere near ACTION_CallDllFunction,
and wait for the thread to start up, but this remains a hack of course.

Another blog explains that inheritance of an existing MTA is just a
side effect of starting the custom action in a different process, one
that happens to have initialized an MTA already.

 -Hans


Reply via email to