CoCreateInstanceEX失败,错误0x80040111 [classfactory-can not-supply-requested-class] [英] CoCreateInstanceEX is failed with Error 0x80040111 [classfactory-cannot-supply-requested-class]

查看:286
本文介绍了CoCreateInstanceEX失败,错误0x80040111 [classfactory-can not-supply-requested-class]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在Visual Studio中构建了我的C ++可执行文件,它作为服务运行。它有依赖DLL。我 n my code
我用我的DLL的CLSID和CLSCTX_ALL选项调用CoCreateInstanceEx。 


CoCreateInsatnceEx()函数在使用时工作正常Windows 7 64位英语操作系统,但在Windows 2012 64位英语和葡萄牙语操作系统上失败,错误  0x80040111 [classfactory-can-supply-requested-class]。

CoCreateInsatnceEx() functions works fine when used on Windows 7 64 bit English OS but failed on Windows 2012 64bit English and Portuguese OS with error 0x80040111 [classfactory-cannot-supply-requested-class].


I已经尝试过以后解决问题,但没有任何帮助:

I have tried following to resolve the problem but nothing helped :


1)将我的exe注册为服务的注册表项是正确的,并且与Windows 7操作系统上的注册表项匹配。

1) Registry entries to register my exe as service are correct and match to one on Windows 7 OS.


2)已经设置了我的主exe的DCOM。

2) DCOM for my main exe. has been set up.


3)可执行文件夹具有完全访问权限并以管理员身份运行。

3) Executable folder has full access permission and running as Administrator.


4)尝试在本地系统帐户下运行服务,选中并取消选中"允许服务与桌面交互"选项,在"登录"选项卡下选项。

4) Tried running Service under Local System Account with check and unchecked "Allow service to interact with Desktop" option under Log On tab.


5)尝试取消注册注册exe和依赖组件。

5) Tried unregistering regsitering exe and dependency components.


6)使用了Dependency Walker,但没有丢失DLL。

6) Dependency Walker used but no missing DLL.


7)尝试使用Process Monitor但找不到任何有用的东西。有很多SUCCESS和NAME NOT FOUND我认为没问题,也不会造成问题。

7) Tried to use Process Monitor but couldn't find anything useful. there were many SUCCESS and NAME NOT FOUND which I think are ok and will not cause problems.


我将非常感谢您的回复和建议。

I will really appreciate your response and suggestions.



问候,


Shubhi

Shubhi

推荐答案

检查出来并同时你能在这里展示你有问题的代码。

Check this out and same time can you show your problematic code here.

Signtool问题

谢谢


这篇关于CoCreateInstanceEX失败,错误0x80040111 [classfactory-can not-supply-requested-class]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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