简体   繁体   English

即使在运行Regsvr32之后,我也遇到了aximp错误

[英]Even after running Regsvr32, I get aximp error

I have a 32-bit ActiveX control written in C++. 我有一个用C ++编写的32位ActiveX控件。 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'. 当尝试使用64位机器上的aximp将其导入.Net应用程序时,它会给出AxImp错误:未在'xxx.dll'中找到已注册的ActiveX控件。 I get the same error even after running regsvr32 on that control. 即使在该控件上运行regsvr32后,我也会遇到相同的错误。

There is another 32-bit ActiveX control written in C++ on which AxImp runs without a problem. 还有另一个用C ++编写的32位ActiveX控件,AxImp运行时没有问题。

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. 还有一个测试 - 尝试将它的引用添加到示例.Net应用程序和VS 2k5引发此错误 - 无法添加对“xxx.dll”的引用。 Please make sure that the file is accessible, and that it is a valid assembly or COM component. 请确保该文件是可访问的,并且它是有效的程序集或COM组件。

But the other control was added without a problem. 但是添加了另一个控件没有问题。 And a AxXXXLib.dll was created in references. 并且在引用中创建了AxXXXLib.dll。

What could the problem be guys? 怎么会有问题呢?

Thanks Sid 谢谢Sid

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. 这里的另一个问题可能是您的32位OCX已在32位regsvr32中注册,但您使用的是64位构建工具。 Make sure your MSBuild toolset matches the bitness of the OCX registration. 确保您的MSBuild工具集与OCX注册的位数相匹配。

For a Team Build setup on Team Foundation Server, edit the build definition and select the correct platform under Process > Advanced. 对于Team Foundation Server上的Team Build设置,编辑构建定义并在Process> Advanced下选择正确的平台。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM