Hi -

I'm having a problem that I'm hoping folks here can help with. It involves
COM issues as well as .NET, so please let me know if there's a better list
to be posting this to....

I'm working on a console app (in C#) that is calling into a COM API
(Virtual Server 2005) that requires the COM security level
of 'Impersonate'. To accomplish that I'm calling CoInitializeSecurity()
and it works, but only if I put [STAThread] on the Main method of my
console app (gave an error about being unable to switch security contexts
after starting). Never quite understood why, but it was fine until I
started trying to use multiple threads in my app; I'm now getting an error
on my WaitAll() call, saying I can't do this in an [STAThread] application.

How do I solve this conflict? I have to have multiple threads to make
working with Virtual Server practical.

Thanks for any help you can provide.

Andy

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to