Windows 7上的DCOM 80070005错误 [英] DCOM 80070005 Error On Windows 7

查看:675
本文介绍了Windows 7上的DCOM 80070005错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经建立并注册了一个DCOM应用,然后可以在"DCOMCNFG.exe"的"DCOM Config"中找到我的DCOM应用.
这是问题所在:
我在WindowsXP上部署了DCOMApp(不进行任何配置,只需注册DCOM),然后在另一台计算机上测试从Windows7进行的客户端访问.
但是我在Windows7(Ultimate 7600)上部署了DCOMApp,并测试了从WindowsXP进行的客户端访问,在调用CoCreateInstanceEx后,总是出现HRESULT=0x80070005错误.

我完全使用相同的Test Client和DCOM Server Exe,只是将部署位置切换到该位置.

我尝试了Google的一些技巧,例如:
http://www.computerperformance.co.uk/Logon/code/code_80070005.htm
http://www.opcactivex.com/Support/Tutorials/DCOM_Tutorial_-_Configuring_th/dcom_tutorial_- _configuring_th.html

但是问题仍然存在.

我该怎么做才能解决此问题?

PS:我的测试客户端CoCreateInstanceEx 电话:

I have built and registered a DCOM App,then I could find my DCOMApp in "DCOM Config" of "DCOMCNFG.exe".

Here is the problem:
I deploy my DCOMApp on WindowsXP(with out config anything just register DCOM),and test client visit from Windows7 on another computer.In this situation, my DCOMApp works fine on WindowsXP.

But I deploy my DCOMApp on Windows7(Ultimate 7600), and test client visit from WindowsXP, I always get a HRESULT=0x80070005 error after calling CoCreateInstanceEx.

I use excactly the same Test Client and DCOM Server Exe, just switch there deploying position.

I have tried some tips from google, such as:
http://www.computerperformance.co.uk/Logon/code/code_80070005.htm
http://www.opcactivex.com/Support/Tutorials/DCOM_Tutorial_-_Configuring_th/dcom_tutorial_-_configuring_th.html

But the problem is still there.

What shuold I do to fix this ?

PS: My Test Client CoCreateInstanceEx call:

CoInitialize(NULL);
	HRESULT hr=S_OK;
	MULTI_QI mqi[]={{&IID_ITestGetOsVersionV2,NULL,0}};//Only One Interface
	COSERVERINFO SrvInfo={0};//other member can be NULL/Zero
	SrvInfo.pwszName=L"192.168.0.1";	
	hr=CoCreateInstanceEx(CLSID_TestGetOsVersionV2,NULL,CLSCTX_ALL,&SrvInfo,
		sizeof(mqi)/sizeof(mqi[0]),mqi);//here,always 0x80070005.......
	if (SUCCEEDED(hr)){.....................}

推荐答案

在win7机器上安装DCOM服务器时,我唯一需要采取的额外步骤就是告诉防火墙让exe退出,但话说回来,我们的DCOM服务器也成为了原始调用方的回调客户端

0x80070005总是与您的APPID的配置有关的问题

确保您的clsid引用了您的appid,并在dcomcnfg中确保您的应用程序中引用的GUID是您的appid(dcomcnfg具有出色的功能"?如果不是,它会为您的对象发明一个appid.未指定-非常令人困惑)

然后就是为您的应用设置安全选项的情况;您还必须确保默认计算机限制允许这些选项

即,如果您添加StanSmith来远程激活您的应用,则该帐户还必须存在于远程激活的限制中.
The only extra step I''ve had to employ when installing our DCOM server on a win7 machine is to tell the firewall to let the exe out, but that said, our DCOM server also becomes a callback client to the originating caller

0x80070005is invariably a problem with the configuration of your APPID

Make sure that your clsid references your appid, and in dcomcnfg make sure the GUID quoted in your app is your appid (dcomcnfg has a wonderful ?feature? where it invents an appid for your object if one wasn''t specified - very confusing)

Then it''s a case of setting security options for your app; you must also make sure the default machine limit allows those options

i.e. if you add StanSmith to remotely activate your app, that account must also exist in the Limit''s for remote Activation


尊敬的barneyman,感谢您的答复.

您的clsid引用您的appid"是这样的意思吗?
MYDOMAPP.rgs文件:
HKCR
{
否删除AppID
{
{7AA28EDE-49D0-4DC1-95AD-3E697CBBED90} = s``TestGetOSVerV2''
''TestGetOSVerV2.EXE''
{
val AppID = s {7AA28EDE-49D0-4DC1-95AD-3E697CBBED90}
}
}
}
CLSID rgs文件:
HKCR
{
TestGetOSVerV2.TestGetOsVersionV2.1 = s``TestGetOsVersionV2类''
{
CLSID = s''{A4823774-CDC7-4161-8C76-BA93344402E5}''
}
TestGetOSVerV2.TestGetOsVersionV2 = s''TestGetOsVersionV2类''
{
CLSID = s''{A4823774-CDC7-4161-8C76-BA93344402E5}''
CurVer = s''TestGetOSVerV2.TestGetOsVersionV2.1''
}
否删除CLSID
{
ForceRemove {A4823774-CDC7-4161-8C76-BA93344402E5} = s``TestGetOsVersionV2类''
{
ProgID = s''TestGetOSVerV2.TestGetOsVersionV2.1''
VersionIndependentProgID = s''TestGetOSVerV2.TestGetOsVersionV2''
ForceRemove``可编程''
LocalServer32 = s''%MODULE%''
val AppID = s``{7AA28EDE-49D0-4DC1-95AD-3E697CBBED90}''//应在此处引用appid ???
''TypeLib''= s''{F7B530C2-403A-4072-9835-B18803D3B165}''
}
}
}
Dear barneyman, thanks for your reply.

Does "your clsid references your appid" mean like this?
MYDOMAPP.rgs file:
HKCR
{
NoRemove AppID
{
{7AA28EDE-49D0-4DC1-95AD-3E697CBBED90} = s ''TestGetOSVerV2''
''TestGetOSVerV2.EXE''
{
val AppID = s {7AA28EDE-49D0-4DC1-95AD-3E697CBBED90}
}
}
}
CLSID rgs file:
HKCR
{
TestGetOSVerV2.TestGetOsVersionV2.1 = s ''TestGetOsVersionV2 Class''
{
CLSID = s ''{A4823774-CDC7-4161-8C76-BA93344402E5}''
}
TestGetOSVerV2.TestGetOsVersionV2 = s ''TestGetOsVersionV2 Class''
{
CLSID = s ''{A4823774-CDC7-4161-8C76-BA93344402E5}''
CurVer = s ''TestGetOSVerV2.TestGetOsVersionV2.1''
}
NoRemove CLSID
{
ForceRemove {A4823774-CDC7-4161-8C76-BA93344402E5} = s ''TestGetOsVersionV2 Class''
{
ProgID = s ''TestGetOSVerV2.TestGetOsVersionV2.1''
VersionIndependentProgID = s ''TestGetOSVerV2.TestGetOsVersionV2''
ForceRemove ''Programmable''
LocalServer32 = s ''%MODULE%''
val AppID = s ''{7AA28EDE-49D0-4DC1-95AD-3E697CBBED90}'' //appid should be refered here ???
''TypeLib'' = s ''{F7B530C2-403A-4072-9835-B18803D3B165}''
}
}
}


这篇关于Windows 7上的DCOM 80070005错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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