Regsvr32 does not create registry entries

I have a problem registering a DLL. My OS is Windows 7 (x64).

I do this in two different ways:

1) Using regsvr32. I get the message "DllRegisterServer ... successeed", however I can not find my CLSID in the registry. (And I get a "Class not registered" error trying to create an instace component with this CLSID). In this case, I know that the DllRegisterServer is never called (because I create a text file at the beginning of this function, and it is not created).

2) Explicitly load your DLL and call DllRegisterServer. In this case, the DllRegisterServer returns S_OK, but still I can not find my CLSID in the registry and get the error "Class not registered".

I am sure that the code is correct (since it works not only on my OS), it seems that the problem is in the OS. Has anyone encountered such a problem?

+5
source share
3 answers

http://msdn.microsoft.com/en-us/library/aa384232(v=vs.85).aspx should explain this

Depending on whether your dll is 32-bit or 64-bit, registry keys will be created in different places

+1
source

. 32- COM-, (MyNewClass) rgs . COM SysWow64\regsvr32.exe, , ProgId/CLSID HKCR\CLSID HKCR\Wow6432Node\CLSID

, :

  • OBJECT_ENTRY BEGIN_OBJECT_MAP MyApp.cpp
  • DECLARE_REGISTRY_RESOURCEID (IDR_xxx) MyNewClass.h

resource.h

IDR_xxx 105

ExistingCom.rc

IDR_xxx DISCARDABLE "MyNewClass.rgs"

0

, register regsvr32

0

All Articles