DllRegister server failed with error code 0x80020005 when trying to register dll using regsvr32 on Windows 7

974 views
Skip to first unread message

sai ph

unread,
Jan 3, 2014, 8:18:19 PM1/3/14
to firebre...@googlegroups.com
Hi,

I was trying to get the TutorialTestPlugin to work just as mentioned in the firebreath video tutorial.. Once I build it and try to register the dll using regsvr32, it throws the "DllRegister server failed with error code 0x80020005".

I elevated command prompt to admin and still it gives me the same error..I am using Visual Studio 2013 express. Is it a problem because I am using VisualStudio 2013 express..?

Richard Bateman

unread,
Jan 3, 2014, 9:17:02 PM1/3/14
to FireBreath Dev Group
It is possible. Most likely if you are getting that error you are missing a DLL dependency; you could use dependency walker to try to see what that is.  Usually you’ll see a missing “ieshims.dll” but other items listed are worth asking about.

Richard


--
 
---
You received this message because you are subscribed to the Google Groups "firebreath-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebreath-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Guillaume Smaha

unread,
Jan 22, 2014, 3:56:34 AM1/22/14
to firebre...@googlegroups.com
Hi,

I think the problem is due to Visual Studio 2013 because before to upgrade from Visual Studio 2010 to Visual Studio 2013 my projects worked perfectly and now I can't register DLLs.

Currently, I don't find any solution.

John Tan

unread,
Jan 22, 2014, 11:13:20 AM1/22/14
to firebre...@googlegroups.com
Like Richard has mentioned, have you tried using the dependency walker? Check what depending dll is missing. Personally, I always prefer static link (Multi-threaded, instead of Multi-threaded DLL) so that dependency is kept to a minimum. Sure, the binary file size will bloat but a small price to pay compared to managing dependent dlls. Toughest to solve are those side-by-side errors...

Guillaume Smaha

unread,
Jan 22, 2014, 12:07:19 PM1/22/14
to firebre...@googlegroups.com
Hi ! 

With dependency walker, it miss few DLLs :

API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL
DCOMP.DLL
GPSVC.DLL (Found in C:\Windows\System32 and C:\Windows\winsxs\amd64_microsoft-windows-grouppolicy-base_31bf3856ad364e35_6.1.7601.17514_none_8649674dfda23046)
IESHIMS.DLL

I can find several time the DLL IESHIMS.DLL in :
C:\Windows\winsxs\x86_microsoft-windows-ie-ieshims_31bf3856ad364e35_8.0.7601.17514_none_644ee1186f7d145b
C:\Windows\winsxs\amd64_microsoft-windows-ie-ieshims_31bf3856ad364e35_8.0.7601.17514_none_c06d7c9c27da8591
.... (94 times in C:\Windows\winsxs\...)


I already use Multi-threaded (With Multi-threadedDLL, the compilation returns 187 errors LNK2005: already defined in xxxx.lib and LNK2038: mismatch detected for...)
I notice when I try to compile with the option LinkLibraryDependencies set TRUE, I obtain these errors :

    40>InitializeBuildStatus:
         Création de "AideRegie_Caisse.dir\Debug\AideRegie_Caisse.tlog\unsuccessfulbuild", car "AlwaysCreate" a été spécifié.
       CustomBuild:
         Toutes les sorties sont à jour.
       ClCompile:
         Toutes les sorties sont à jour.
       ResourceCompile:
         Toutes les sorties sont à jour.
       Link:
         Toutes les sorties sont à jour.
         AideRegie_Caisse.vcxproj -> C:\Users\user\Documents\codes\projects\build\bin\AideRegie_Caisse\Debug\npAideRegie_Caisse.dll
       FinalizeBuildStatus:
         Suppression du fichier "AideRegie_Caisse.dir\Debug\AideRegie_Caisse.tlog\unsuccessfulbuild".
         Mise à jour de l'horodatage "AideRegie_Caisse.dir\Debug\AideRegie_Caisse.tlog\AideRegie_Caisse.lastbuildstate".
    40>Génération du projet "C:\Users\user\Documents\codes\projects\build\projects\AideRegie_Caisse\AideRegie_Caisse.vcxproj" terminée (cibles par défaut).
    10>Génération du projet "C:\Users\user\Documents\codes\projects\build\projects\AideRegie_Caisse\AideRegie_Caisse.vcxproj.metaproj" terminée (cibles par défaut).
    41>FireBreathWin.def : warning LNK4022: cannot find unique match for symbol 'DllCanUnloadNow' [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4002: "public: long __thiscall ATL::CAtlDllModuleT<class CFireBreathWinModule>::DllCanUnloadNow(void)" (?DllCanUnloadNow@?$CAtlDllModuleT@VCFireBreathWinModule@@@ATL@@QAEJXZ) defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4002: _DllCanUnloadNow@0 defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4002: _DllCanUnloadNow@0 defined in C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4022: cannot find unique match for symbol 'DllGetClassObject' [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4002: "public: long __thiscall ATL::CAtlDllModuleT<class CFireBreathWinModule>::DllGetClassObject(struct _GUID const &,struct _GUID const &,void * *)" (?DllGetClassObject@?$CAtlDllModuleT@VCFireBreathWinModule@@@ATL@@QAEJABU_GUID@@0PAPAX@Z) defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4002: _DllGetClassObject@12 defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4002: _DllGetClassObject@12 defined in C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4022: cannot find unique match for symbol 'DllRegisterServer' [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4002: "public: long __thiscall ATL::CAtlDllModuleT<class CFireBreathWinModule>::DllRegisterServer(int)" (?DllRegisterServer@?$CAtlDllModuleT@VCFireBreathWinModule@@@ATL@@QAEJH@Z) defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4002: _DllRegisterServer@0 defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4002: _DllRegisterServer@0 defined in C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4022: cannot find unique match for symbol 'DllUnregisterServer' [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4002: "public: long __thiscall ATL::CAtlDllModuleT<class CFireBreathWinModule>::DllUnregisterServer(int)" (?DllUnregisterServer@?$CAtlDllModuleT@VCFireBreathWinModule@@@ATL@@QAEJH@Z) defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4002: _DllUnregisterServer@0 defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : warning LNK4002: _DllUnregisterServer@0 defined in C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : error LNK2001: unresolved external symbol DllCanUnloadNow [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : error LNK2001: unresolved external symbol DllGetClassObject [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : error LNK2001: unresolved external symbol DllRegisterServer [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>FireBreathWin.def : error LNK2001: unresolved external symbol DllUnregisterServer [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>C:/Users/user/Documents/codes/projects/build/projects/AR_VIPS/Debug/npAR_VIPS.lib : fatal error LNK1120: 4 unresolved externals [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    41>Génération du projet "C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj" terminée (cibles par défaut) -- ÉCHEC.
    13>Génération du projet "C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj.metaproj" terminée (cibles par défaut) -- ÉCHEC.
    39>FinalizeBuildStatus:
         Suppression du fichier "Passautocar.dir\Debug\Passautocar.tlog\unsuccessfulbuild".
         Mise à jour de l'horodatage "Passautocar.dir\Debug\Passautocar.tlog\Passautocar.lastbuildstate".
    39>Génération du projet "C:\Users\user\Documents\codes\projects\build\projects\Passautocar\Passautocar.vcxproj" terminée (cibles par défaut).
    16>Génération du projet "C:\Users\user\Documents\codes\projects\build\projects\Passautocar\Passautocar.vcxproj.metaproj" terminée (cibles par défaut).
     1>Génération du projet "C:\Users\user\Documents\codes\projects\build\FireBreath.sln" terminée (cibles par défaut) -- ÉCHEC.
ÉCHEC de la build.
       "C:\Users\user\Documents\codes\projects\build\FireBreath.sln" (cible par défaut) (1) ->
       "C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj.metaproj" (cible par défaut) (13) ->
       "C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj" (cible par défaut) (41) ->
       (Link cible) -> 
         FireBreathWin.def : warning LNK4022: cannot find unique match for symbol 'DllCanUnloadNow' [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4002: "public: long __thiscall ATL::CAtlDllModuleT<class CFireBreathWinModule>::DllCanUnloadNow(void)" (?DllCanUnloadNow@?$CAtlDllModuleT@VCFireBreathWinModule@@@ATL@@QAEJXZ) defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4002: _DllCanUnloadNow@0 defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4002: _DllCanUnloadNow@0 defined in C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4022: cannot find unique match for symbol 'DllGetClassObject' [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4002: "public: long __thiscall ATL::CAtlDllModuleT<class CFireBreathWinModule>::DllGetClassObject(struct _GUID const &,struct _GUID const &,void * *)" (?DllGetClassObject@?$CAtlDllModuleT@VCFireBreathWinModule@@@ATL@@QAEJABU_GUID@@0PAPAX@Z) defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4002: _DllGetClassObject@12 defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4002: _DllGetClassObject@12 defined in C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4022: cannot find unique match for symbol 'DllRegisterServer' [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4002: "public: long __thiscall ATL::CAtlDllModuleT<class CFireBreathWinModule>::DllRegisterServer(int)" (?DllRegisterServer@?$CAtlDllModuleT@VCFireBreathWinModule@@@ATL@@QAEJH@Z) defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4002: _DllRegisterServer@0 defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4002: _DllRegisterServer@0 defined in C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4022: cannot find unique match for symbol 'DllUnregisterServer' [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4002: "public: long __thiscall ATL::CAtlDllModuleT<class CFireBreathWinModule>::DllUnregisterServer(int)" (?DllUnregisterServer@?$CAtlDllModuleT@VCFireBreathWinModule@@@ATL@@QAEJH@Z) defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4002: _DllUnregisterServer@0 defined in PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : warning LNK4002: _DllUnregisterServer@0 defined in C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\PluginAuto\Debug\ARVS_PluginAuto.lib [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]

       "C:\Users\user\Documents\codes\projects\build\FireBreath.sln" (cible par défaut) (1) ->
       "C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj.metaproj" (cible par défaut) (13) ->
       "C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj" (cible par défaut) (41) ->
       (Link cible) -> 
         FireBreathWin.def : error LNK2001: unresolved external symbol DllCanUnloadNow [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : error LNK2001: unresolved external symbol DllGetClassObject [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : error LNK2001: unresolved external symbol DllRegisterServer [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         FireBreathWin.def : error LNK2001: unresolved external symbol DllUnregisterServer [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
         C:/Users/user/Documents/codes/projects/build/projects/AR_VIPS/Debug/npAR_VIPS.lib : fatal error LNK1120: 4 unresolved externals [C:\Users\user\Documents\codes\projects\build\projects\AR_VIPS\AR_VIPS.vcxproj]
    16 Avertissement(s)
    5 Erreur(s)

What do you think about this ?

Richard Bateman

unread,
Jan 22, 2014, 12:13:48 PM1/22/14
to FireBreath Dev Group
Sounds like vs2013 is linking to a bunch of DLLs that previous versions didn't link to.  This isn't really a firebreath question at this point, and I can't help you, but what you need to do is figure out why those dlls are being linked and figure out how to fix it so that they aren't linked anymore.  Once you figure out how to do it in visual studio let me know what you had to do and I'll see if I can help you make the changes in cmake so they stick.

Richard


--

John Tan

unread,
Jan 22, 2014, 8:11:06 PM1/22/14
to firebre...@googlegroups.com
Ah, the winsxs thingy is related to the side-by-side issue I mentioned....
 
Indeed, it's a challenge to do a static link. No hard and fast rule to solve it.

Guillaume Smaha

unread,
Jan 23, 2014, 8:23:08 AM1/23/14
to firebre...@googlegroups.com
OK, it is not a problem with a missing DLL because I can register my DLL generated with VS2010 and with dependency walker, there are the same DLsL in the list of missing DLLs

If I remove from the option AdditionalDependencies the file PluginAuto\Debug\ARVS_PluginAuto.lib, the compilation works ! But I can't register the DLL generated, I get the same error (0x80020005)
Or if I remove 
      <ModuleDefinitionFile>C:/Users/user/Documents/codes/projects/build/projects/AR_VIPS/gen/FireBreathWin.def</ModuleDefinitionFile>
the DLL is generate but I obtain this error "Module "AR_VIPS.dll" load but the enry key "DllRegistryServer" is not found.

Else I look for difference between my project for VS2013 and VS2010. I found an option added for VS2013 in PluginAuto project : <LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkObjects>


Finally, I will downgrade to VS2010.

Sergey Ksinishin

unread,
Jan 30, 2014, 11:02:05 AM1/30/14
to firebre...@googlegroups.com
This bug in generated rgs file of your ActiveX control. He contain:
val Count = d ''
ATL parser in VS 2013 fail translate '' to dword and return error by register. Try change this string to:
val Count = d '0'

For me this is work.

Hiroshi Nishida

unread,
Feb 28, 2014, 6:32:20 PM2/28/14
to firebre...@googlegroups.com
I had the same problem but could solve it.

Note that I am a UNIX guy and not familiar with Windows.
So the solution is really ambiguous.

First, I had the problem with Visual Studio 2013 Pro + WDK 8 (not 8.1) on Windows 8.1 Pro.
Since the link to WDK 8.1 was dead, I downloaded WDK 8 instead.
Then I got the same error 0x80020005.

After that, I found a link to WDK 8.1 and installed it.
At the same time, I did

val Count = d '' -> val Count = d '0'

in gen_templates/FBControl.rgs as Sergey said.

Then, I removed 'build' folder and did prep2013.cmd again.
As a result, regsrv32 worked well. I spent almost whole day.
I don't know which of the above was a solution, but anyway I can finally start my project.

Oak Panha

unread,
Apr 18, 2014, 10:17:55 AM4/18/14
to firebre...@googlegroups.com
Thanks to Sergey Ksinishin, Hiroshi Nishida. I had tried to find so far. It's work.
Thanks to sai ph & everyone here for this topic.
//val Count = d '' -> val Count = d '0' in rgs files.

Spike McLarty

unread,
May 20, 2014, 1:11:54 PM5/20/14
to firebre...@googlegroups.com
I also just spent a day or two puzzling over why my plugin worked fine in Firefox and Chrome, but would silently fail to install in IE, following an upgrade to VS 2013 and Firebreath 1.7.
The breakthrough for me came when I finally thought to run regsvr32 on my plugin's DLL (seems obvious in retrospect)
which not only showed me that registration was failing, but displayed an actual error code which could be googled...

The advice of Sergey and Hiroshi Nishida then solved the problem for me.
A big thank-you to both of you for sharing!


Peter Philips

unread,
May 25, 2014, 2:10:18 AM5/25/14
to firebre...@googlegroups.com
I hit this as well with VS2013 and the simple fix in FBControler.rgs did it for me!:

val Count = d '' -> val Count = d '0'

Kevin Sanders

unread,
Jun 20, 2014, 3:04:21 AM6/20/14
to firebre...@googlegroups.com
Same issue for me as well and the suggested fix mentioned here worked and allowed me to register the DLL.

(Using VS2013 & Windows 7)

Gopinath Sankar

unread,
Aug 21, 2015, 1:31:18 PM8/21/15
to firebreath-dev
This helped me for VS2015 & Windows 8. 
I got HEAT5150: Could not harvest data from a file that was expected to be a SelfReg DLL at first (manual regsvr32 complained with error code 0x80020005). 
But this helped me past these issues.
Reply all
Reply to author
Forward
0 new messages