• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 28375
  • Last Modified:

DLLRegisterServer in <location of the DLL file> failed. Return code was 0x80004005. OS is WIN2K.

i created a simple DLL using VB6.  i was able to register the file in a windows 98 PC.  but when i tried to register it in a win2k, im getting the following error message:

DLLRegisterServer in <location of the DLL file> failed.  Return code was 0x80004005.

i tried to register the file in another PC with win2k and it worked.  i was just wondering why i was unable to register it in other PCs with win2k os.

would really appreciate your help on this matter.

thanks in advance.


3 Solutions
Do you have the VB runtimes on the affected PC?
Got this from Microsoft:  

If you use a Microsoft Internet Information Server (IIS) application (WebClass) to create a dynamic-link library (DLL) in Visual Basic 6.0, you receive the following error message when you try to register the DLL:

DLLRegisterServer in <path to DLL> failed.
Return Code was: 0x80004005
This error message occurs when you try to register the DLL on a computer other than the one on which it was created.
The WebClass run-time files must be installed to register a WebClass DLL. This error occurs if you try to register the DLL on a computer that does not have the WebClass run-time files installed and registered.
To resolve this problem, use one of the following methods:
The best way to deploy a WebClass is to use the Package and Deployment Wizard. The Package and Deployment Wizard packages the dependent WebClass run-time DLLs when your WebClass is deployed. For information on how to use this tool, see the following Microsoft Web site:

Copy and register the Mswcrun.dll file to the computer on which you are trying to register your WebClass DLL.
Steps to Reproduce Behavior
In Visual Basic 6.0, use the IIS Application Project option to create a WebClass.
Copy the DLL to a computer that does not have the Mswcrun.dll file.
At a command prompt, type regsvr32 WebClassDllName.dll to register the DLL.
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

wala_langAuthor Commented:
Hi everyone,

Sorry it took me this long to reply on your answers.  I tried installing the VB6 runtime files on the target win2k PCs but I was unable to proceed because I'm getting an error message.  Based on the message, it seems that the problem I'm encountering is due to the ID that I'm using, which doesn't have any administrator rights on the target PCs.

So, what I did was I logged inside as an administrator.  It worked!  I was able to register my DLL files without running the VB6 runtime files.  The cause of the problem was the ID that I'm using in registering the DLL files.

I still would like to thank everyone for taking their time out and giving me some ideas.  If not for your suggestions guys, I wouldnt have come up with the answers.  I gave the highest grade to izwiz for being the first one to respond =).  I Also awarded points to jvuz and MikeKane for their ideas and time.

Thanks again guys.


I was getting this error, even when logged on as Administrator. After reading this thread, I checked permissions on the DLLs I was trying to register, and found a complicated set of rules (probably applied by Microsoft's anti-intrusion patches to Win2K). I got the files to register (and work correctly) by changing their permissions en masse to Everyone, Full Control.

I had the same exact problem even though the DLL application I wrote didn't use Microsoft Internet Information Server (IIS) application (WebClass).  The fix was the same thing though.  Also, I am included in users under the "Administrators" group yet I actually had to log in as the default "main" Administrator to make things work.  I'm using WIndowsXP.  Thank you Mr. Gates!

Thanks wala for the fix.
The links given in this article are removed. Can give any other solution for this problem ?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now