G
Guest
Hi,
I just tried to compile an 'old' .net framework 1.1 application with vs2005
- and suddenly the code throws some error in runtime:
ThreadStateException:
Current thread must set to single thread apartment (STA) mode before OLE
calls can be made. Ensure that your Main function has STAThreadAttribute
marked on it.
I tried to set the apartment state with SetApartmentState() but this failed
also ('couldn't set apartment state').
Can anyone help me out of this?
Thanks
Peter
I just tried to compile an 'old' .net framework 1.1 application with vs2005
- and suddenly the code throws some error in runtime:
ThreadStateException:
Current thread must set to single thread apartment (STA) mode before OLE
calls can be made. Ensure that your Main function has STAThreadAttribute
marked on it.
I tried to set the apartment state with SetApartmentState() but this failed
also ('couldn't set apartment state').
Can anyone help me out of this?
Thanks
Peter