If you are accessing COM server from UT in Visual Studio 2008 and get InvalidComObjectException exception.
Then try changing your TestRunConfig.testrunconfig:
add this line: <ExecutionThread apartmentState="MTA" />

If you are accessing COM server from UT in Visual Studio 2008 and get InvalidComObjectException exception.
Then try changing your TestRunConfig.testrunconfig:
add this line: <ExecutionThread apartmentState="MTA" />
C#, WPF, .Net: see it with Sergey Malyan.