views:

312

answers:

1

Hi guys, I have a 32-bit ActiveX control written in C++. When trying to import it to .Net app using aximp on a 64 bit machine, it gives AxImp Error: Did not find a registered ActiveX control in 'xxx.dll'. I get the same error even after running regsvr32 on that control.

There is another 32-bit ActiveX control written in C++ on which AxImp runs without a problem.

Did one more test - Tried adding a reference of it to a sample .Net application and VS 2k5 threw this error - A reference to 'xxx.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.

But the other control was added without a problem. And a AxXXXLib.dll was created in references.

What could the problem be guys?

Thanks Sid

A: 

Another issue here can be that your 32-bit OCX is registered with the 32-bit regsvr32 but you are using the 64-bit build tools. Make sure your MSBuild toolset matches the bitness of the OCX registration.

For a Team Build setup on Team Foundation Server, edit the build definition and select the correct platform under Process > Advanced.

Aidan Ryan