, , , , , , .
, COM- STA, , , STA ( ) COM . , Application.DoEvents() Application.Run().
, ( , Windows Vista +, Windows 8.1)
Thread createComAndMessagePumpThread = new Thread(() =>
{
this.Device = new CZKEMClass(); //Here create COM object
Application.Run();
});
createComAndMessagePumpThread.SetApartmentState(ApartmentState.STA);
createComAndMessagePumpThread.Start();
, STA, COM-.
Windows Forms , STA , Application.Run(Form). Application.Run() , COM- Windows GUI, .