With Delphi, how can I create a (Windows) console application that has a main thread that is initialized as COINIT_MULTITHREADED? If I call CoInitial ...
With Delphi, how can I create a (Windows) console application that has a main thread that is initialized as COINIT_MULTITHREADED? If I call CoInitial ...
I have project A and project B. Project B has a thread that does some work with Microsoft Outlook Interop. Project A is a GUI and is marked as STAThre ...
I have an app which runs several Powershell scripts. (It is basically a wrapper application that pulls some PS scripts stored in a SQL database and th ...
I have the following code for creating tabpages to a predefined list: I am getting the following exception: cannot be instantiated because the ...
This post scratches off WebApi from being able to run in STA mode. But this post is also 2 years old. I've been digging into the newer WebApi2 but ca ...
I have such piece of code: And once I've got exception ArgumentOutOfRangeException on second line. How is it possible? And what can I do to prevent ...
I'm trying to use a C# DLL that I have access to the code of, but I can't actually change the code and build a custom version of it. The calling code ...
The .NET Thread class has a handy function GetApartmentState() that returns the apartment of context of the thread. Is there a similar function for n ...
I need to have SpecFlow generate NUnit Tests with the RequiresSTA attribute. How can I do that? ...
Im trying to get our specflow watin tests to run on our new teamcity server. The problem is that I cant get the built in nunit runner to run tests in ...
I need to create multiple AppDomains in my .NET in-process COM server (it's a Windows Explorer namespace extension). In my test Console Application, ...
I am implementing an interface that has a BeginSomething() and EndSomething() pair, and my implementation is in a method Execute() So I create an Act ...
I need multiple STA threads inside my ASP.NET application to use some COM components. I read somewhere inside each process, only one STA thread can e ...
How do you set the apartment state in the NUnit GUI runner? I'm trying to run a single NUnit test with WatiN and I'm getting the message: MyNamesp ...
I have a function which requires to be run in STA apartment state. I wan't to check if it is being run as STA, and if not spawn a new thread which run ...
I'm trying to build a Winforms application with two COM components. However, one of the components only works when using [MTAThread] and the other onl ...