04-19-2012 02:25 AM
we are executing a method from a DLL in Test Stand 2010. During run time we get an exception
An error occurred while calling .NET member 'Main_SaveProjects':
The type initializer for 'TA_CCB_Helper.Main_SaveProjects' threw an exception.
Unable to cast COM object of type 'WindowAutoTestHelper2.TestWindowClass' to interface type 'WindowAutoTestHelper2._TestWindow'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{B0E13172-DE83-4BC6-80EA-0A8D484B7F89}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
This same Seq we were able to execute on windows 7 32 bit without any issues. but on 2008 R2 we are facing this issue. Attaching the screenshot and machine details. We already raised this issue with TS support team but they require the DLL and the source code. But for security reasons we can give them out.
If anybody faced a similar issue and could solve it, please reply
regards
04-19-2012 12:21 PM - edited 04-19-2012 12:22 PM
Most likely the problem is with the COM server you are trying to access and has nothing to do with TestStand. What can happen is there might be both a 64-bit and 32-bit version of the COM server you are using. If you have both versions installed or only the 64-bit version that could be leading to this problem. If you have both versions installed, make sure you are referencing the correct (i.e. 32-bit) version from your .NET code. You might try contacting the creator of the COM server (if it is from a 3rd party) for support.
Hope this helps,
-Doug
04-23-2012 01:31 AM
Thanks for the reply Doug. I do not think the problem is on the 32 or 64 bit versions of the COM server because, I could replicate this issue on 2008 32 bit server too. Only i did not mention this because TS 2010 does not support 2008 32bit server. Though I agree with you that the problem might be with the COM server itself.