How to resolve DAO350.dll registration issue - R&D Solutions

How to resolve DAO350.dll registration issue

My case

I was in a situation that is probably not very common nowadays because I was on Windows XP machine and was trying to run Microsoft Visual Basic 6.0 Studio. Unfortunately I was constantly getting “Could not register DAO350.dll”. It was very critical for my case because I had to debug 20 year old source code and this was the only machine where I was able to do so. And suddenly it was not possible to even run the studio.

 

Searching for resolution

I started searching for that error and one of the first articles suggested to get the DAO350.dll from the Visual Studio Disk (.iso), place it in the “C:\Program Files\Common Files\Microsoft Shared\DAO\DAO350.DLL” and then call the following command:

Regsvr32 “C:\Program Files\Common Files\Microsoft Shared\DAO\DAO350.DLL”

This is exactly what I did and then I received error message from “regsvr32” – “Unable to register using regsvr32, error: “DllRegisterServer failed with error code 0x8002801c””.
I started to search now for that 0x8002801c error code returned by “regsvr32” hoping that it will help me resolve the initial issue.
Most of the articles said I need to run my command prompt with elevated privileges. I tried that multiple times but without success. Then I came across some topics that were suggesting to check the registry permissions. I did that but on root level and by that I mean – HKEY_CLASSES_ROOT. I made sure that my user has enough permissions on root level and mark the “inherit” option. I even changed the owner of the HKEY_CLASSES_ROOT to my user. Then tried again but still no effect.

 

The resolution

Thanks to a colleague of mine we searched for the exact registry entry of DAO350.dll. It was HKEY_CLASSES_ROOT\TypeLib\{00025E01-0000-0000-C000-000000000046}\4.0.
When I tried to search the sub keys I received permission error. It turned out that the “inherit” option did not applied the root level settings and my user(despite the fact was administrator) didn’t have permissions to access the sub keys. So I had to change the owner and apply the correct permissions of each sub node. Once I verified that I am able to access and manipulate all the registry sub keys (using my administrator account), then I decided to use again the following command:

Regsvr32 “C:\Program Files\Common Files\Microsoft Shared\DAO\DAO350.DLL”

This time the command worked like a charm. I tried then powering on the Visual Basic 6.0 Studio and it started without problems.
From there on I was able to get into the troubles the 20 year old code base was causing.

 

Recap

In my case it turned out that the registry keys for DAO350.dll were corrupted and had to be fixed. Do not trust on the “inherit” option. If you face such issue, find out the proper registry key and make sure the proper permissions (and owner) are in place and then try to register the .dll using regsvr32.

Talk to us now

Contact us