Behaviour of CoRegisterClassObject and PackagedCOM

Nyuan Zhang 0 Reputation points
2025-04-10T16:41:04.3666667+00:00

I'm trying to build my CommandPalette extension, which is a out-of-process COM server. However, my native extension fails getting picked up by CoCreateInstance in CmdPal, causing a null pointer on the CmdPal side, while C#-based alternative implementation did the job. I used Process Monitor and saw that CoRegisterClassObject failed to read HKCR/PackagedCom/ClassIndex/{CLSID}, yet it showed up in regedit and the permissions set correctly. I believe this error caused subsequent internal registration to fail. How can I correctly register my class factory in the native land?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,753 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.