Question

I am trying to Connect to Quality Center using a WPF application on Visual Studio Express 2012. My system configuration is Windows 7 64 bit.

I have added a reference to OTAClient.dll in the project. The Embedded Interop types property for this dll is set to true.

Searching for similar problems gave solutions like setting the project target platform to x86, but the solution didn't work for me.

I am getting the error

Retrieving the COM class factory for component with CLSID {C5CBD7B2-490C-45F5-8C40-B8C3D108E6D7} failed due to the following error: 800703e6 Invalid access to memory location. (Exception from HRESULT: 0x800703E6).

I also tried registering the dll using regsvr32.

Can someone help me with figuring out the problem.

Was it helpful?

Solution

I Managed to solve this problem. This error has to some with DEP compatibility. The program is generating DEP exceptions and to clear it we have to clear IMAGE_DLLCHARACTERISTICS_NX_COMPAT flag.

This can be done by adding post build event in Visual Studio

call $(DevEnvDir)..\tools\vsvars32.bat editbin.exe /NXCOMPAT:NO $(TargetPath)

Refer stack over flow question How to make my program DEP-compatible?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top