PHP COM对象DLL错误
我已使用C创建了一个ComVisible DLL文件。该DLL的代码为:PHP COM对象DLL错误,php,object,dll,com,Php,Object,Dll,Com,我已使用C创建了一个ComVisible DLL文件。该DLL的代码为: using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace deneme { [ComVisible(true)] public class Class1 { [ComVisible(true)]
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace deneme
{
[ComVisible(true)]
public class Class1
{
[ComVisible(true)]
public string HelloWorld()
{
return "HelloDLL";
}
[ComVisible(true)]
static string Hello()
{
return "dEnEmE";
}
}
}
我已经向RegAsm注册了DLL到注册表。
这是我的PHP代码
<?
try{
$com = new COM('deneme.Class1');
} catch(Exception $e){
echo 'error: ' . $e->getMessage(), "\n";
}
?>
当我试图在PHP上打开这个DLL的HelloWorld函数时,系统抛出了一个类似异常的错误:未能创建COM对象'deneme.Class1':Çok zarallıhata。乔克·扎拉尔·哈塔的翻译是:非常有害的错误:
你能帮我做那件事吗?
我使用的是Windows7IIS+PHP+MySQL
致以最诚挚的问候。恐怕我们需要更多信息。这真的意味着非常有害的错误或灾难性的失败!未正确创建您的C COM对象。