woensdag 17 februari 2010

Troubles (Solved!)

As I feared, the GnucCOM object is dying within the service :/

Looking for a solution for this!

Found my solution @ http://www.albahari.com/threading/part3.aspx

Thread t = new Thread (...);
t.SetApartmentState (ApartmentState.STA);

Also, I’m using Application.DoEvents() know but I admit that I’m not sure if this even helps in any way since this is a service and not a Windows Forms application.

Reason why I think I need this was because I use GnucCOM, and COM is not compatible with the default .NET threading apartment state.

Anyhow, let the coding proceed!

Geen opmerkingen:

Een reactie posten