ATL COM class registration .rgs file defaults

主宰稳场 提交于 2019-12-05 05:29:11

That's the ProgID for the coclass. It is primarily used by scripting languages, the ones that use late binding. CreateObject() is the usual function name. That this has anything to do with a hang is unexplainable, you'd better debug it.

The .rgs entry is otherwise automatically generated by the ATL wizard. The ProgID edit box is the lower right one. It doesn't get filled in automatically like the rest of them, you probably missed it.

Carl

Sorry for coming five years later... I got a similar issue with ATL COM wizard using Visual Studio 2015 pro. (error 0x80080005 - Server execution failed) It looks like a bug on the ATL COM wizard (since some VS releases, and still not corrected on the latest VS2015).

I found an answer with a manual correction on this MS page: https://connect.microsoft.com/VisualStudio/feedback/details/782281/catlservicemodulet-not-registering-components

The above link is no longer available. However, the issue is explained in this blog: https://blogs.msdn.microsoft.com/jigarme/2008/05/07/cocreateinstance-returns-0x80080005-for-visual-studio-2008-based-atl-service/

Basically, the wizard fails to add the AppID registry entry in the associated rgs file:

NoRemove CLSID
{
    ForceRemove {...} = s '...'
    {
        ...
        val AppID = s '%APPID%'
    }
}

The .rgs files are not completely filled by the wizard. Hope this helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!