Windows 7-WSH 5.8发出“自动化服务器无法创建对象"在新的ActiveXObject上-WSH 5.7没有问题 [英] Windows 7 - WSH 5.8 issue "Automation server can't create object" on new ActiveXObject - not an issue with WSH 5.7

查看:82
本文介绍了Windows 7-WSH 5.8发出“自动化服务器无法创建对象"在新的ActiveXObject上-WSH 5.7没有问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我使用ATL项目向导创建了一个简单的DLL,并在MS Visual Studio 2008(C ++)下添加了一个简单类(具有简单ATL对象类型).

该解决方案构建良好,并且dll注册成功进行.

但是,当我尝试在JavaScript中创建新的ActiveXObject()时,WSH 5.8中止并显示以下消息:自动化服务器无法创建对象".该脚本未在任何浏览器中使用.

在其他带有WSH 5.7(!)脚本的Windows 7计算机上尝试相同的脚本后,成功进行了操作.

由于我的项目要求坚持使用Windows 7和WSH 5.8 WSH,因此任何人都可以帮助我解决此问题.

谢谢
Brad

Hi,

I created a simple DLL using ATL Project Wizard with one simple class added (of Simple ATL Object type) under MS Visual Studio 2008 (C++).

The solution was built fine and dll registration went successfully.

However when I tried to create new ActiveXObject() in JavaScript the WSH 5.8 aborts with the following message: "Automation server can''t create object". The script is not used in under any browser.

After I tried the same script on other Windows 7 machine with WSH 5.7 (!) script went through successfully.

Can anyone please help me with this issue since my project demand to stick with Windows 7 and WSH 5.8 WSH.

Thank you,
Brad

推荐答案

问题已解决.问题是关于为x32平台构建的dll.在x64平台上运行脚本会导致在加载dll时出现问题. x64平台上的WSH 5.7仍以x32模式运行,这说明了脚本成功加载dll的原因.另一方面,WSH 5.8在x64模式下运行.在针对x64重建dll之后,脚本也在5.8版下成功通过.
Problem solved. The issue was about the dll built for x32 platform. Running the script on x64 platform resulted the problem while loading the dll. WSH 5.7 on x64 platform still runs in x32 mode which explains why the script was successfully loading the dll. On the other hand WSH 5.8 runs in x64 mode. Once the dll was rebuilt for x64 the script went through successfully under 5.8 as well.


这篇关于Windows 7-WSH 5.8发出“自动化服务器无法创建对象"在新的ActiveXObject上-WSH 5.7没有问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆