无法创建COM对象'X':在另一个WAMP未注册类 [英] Failed to create COM object 'X': Class not registered in another WAMP

查看:129
本文介绍了无法创建COM对象'X':在另一个WAMP未注册类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有已经是在Windows 7工作的WAMP实例,其中线路

There already is a working WAMP instance in a Windows 7 in which the line

$x = new COM("X");

确实实例化一个COM对象。

does instantiate a COM object.

我试图找到一个bug,并决定使用一个全新的WAMP安装在同一个Windows 7系统为previous一个在

I was trying to locate a bug, and decided to use a fresh new WAMP installation on the same Windows 7 system as the previous one.

在新的,在同一行生产:

In the new one, the same line produces:

Failed to create COM object 'X': Class not registered ( Error code: 0x80040154 )

现在,因为第一个WAMP带有它自己安装的应用程序(与DLL持有COM类一起)我不能确切地找出我需要在新的WAMP改变太行以上将实例化对象

Now, since the first WAMP comes with it's own installation application (along with its DLL which holds the COM class) I can't exactly figure out what I need to change in the new WAMP so the line above will instantiate the object.


  • 我的WAMP的版本是:2.2和

  • Apache的版本:2.2.21

  • PHP版本:5.3.10

任何想法,我需要设置正确?

Any idea what I need to set up properly?

推荐答案

管理通过改变工作目录来解决这个问题(使用 CHDIR )是一样的的php.exe 之前 $ X =新的COM(X);

Managed to solve the problem by changing the working directory (using chdir) to be the same as the php.exe just before $x = new COM("X");.

我觉得DLL没有属性格式注册,或者缺乏本身的东西。

I think the DLL wasn't propery registered, or lacked something in itself.

这篇关于无法创建COM对象'X':在另一个WAMP未注册类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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