开发者

regsvr32 doesn't create any entries in registry

I have a problem trying to register DLL. My OS is Windows 7 (x64).

I do it in two different ways:

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

2) Ex开发者_如何转开发plicitly load my DLL and call DllRegisterServer. In this case, DllRegisterServer returns S_OK, but still I can't find my CLSID in registry and get "Class not registered" error.

I'm sure the code is correct (for it doesn't work only on my OS), so it seems that the problem is in OS. Did anyone face such a problem?


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

Depending on whether your dll is 32bit or 64bit the registry keys are created at separate locations


Just solved an identical problem. I've manually added to the existing 32-bit COM new interface, implementation (MyNewClass) and rgs file. But when I've successfully registered my COM using SysWow64\regsvr32.exe I've noticed that my ProgId/CLSID didn't appear under HKCR\CLSID or HKCR\Wow6432Node\CLSID

So, actually I missed few thing:

  1. I had to add OBJECT_ENTRY under BEGIN_OBJECT_MAP in MyApp.cpp file
  2. and add DECLARE_REGISTRY_RESOURCEID(IDR_xxx) to MyNewClass.h file

resource.h

define IDR_xxx 105

ExistingCom.rc

IDR_xxx REGISTRY DISCARDABLE "MyNewClass.rgs"


Run command line tool as administrator and then run the register command regsvr32

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜