错误0x80040154与cocreateinstance [英] Error 0x80040154 with cocreateinstance
本文介绍了错误0x80040154与cocreateinstance的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在创建IQueryCancelAutoPlay的实例。它一直都失败了。
I am creating the instance of IQueryCancelAutoPlay. It failed all the time.
IQueryCancelAutoPlay *cancelAP;
HRESULT hr = CoCreateInstance(__uuidOf(QueryCancelAutoPlay), NULL, CLSCTX_ALL, (void **) &cancelAP);
if (SUCCEEDED(hr)) {
printf("Success\n");
cancelAP->Release();
}
else { // it failed
printf("Failed: 0x%0x\n", hr);
}
What I have tried:
Just looking around on Google, many articles are stating that this happened because I am missing one important dll, specifically "ATL.dll or ATL70.dll";
ATL.dll is in my Windows\system32;
ATL70.dll is not where to be found.
I will appreciate help from anybody that had solved this problome.
推荐答案
根据本文 [ ^ ],ATL.dll不仅必须在system32目录中,而且应该使用regsvr32.exe实用程序注册:
According to this article[^], ATL.dll not only has to be in system32 directory, but it should be registered using regsvr32.exe utility:
regsvr32 ATL.dll
您是否已尝试过?
Did you try that already?
这篇关于错误0x80040154与cocreateinstance的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文