Diogo,
What is the apartment of the COM object? More likely than not, it is an
STA threaded object, and you need to set the ApartmentState property of the
thread to ApartmentState.STA ^before^ you make any calls to COM objects.
--
- Nicholas Paldino [.NET/C# MVP]
-
(E-Mail Removed)
"Diogo Alves" <(E-Mail Removed)> wrote in message
news:F0CCB46C-BEE3-4CAC-AD3E-(E-Mail Removed)...
> Greetings,
>
> I have a COM reference that connects to a device to get some data... if I
> don't use threads to get data i can get the "ref int events" without any
> problems but if it's running inside a thread it doesn't touch on the
> variable value
>
> How can I workaround this?