Microsoft KB Archive/183748

= PRB: Error Message "DllRegisterServer in .dll Failed" =

Article ID: 183748

Article Last Modified on 11/18/2003

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Learning Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition

-



This article was previously published under Q183748



SYMPTOMS
The following error message displays when you attempt to register an ActiveX .dll file with RegSvr32.exe on another computer:

DllRegisterServer in .dll failed.

The ActiveX .dll file was created with Visual Basic 5.0 and Visual Studio 97 Service Pack 2 or 3.



CAUSE
The computer receiving the ActiveX DLL contains a version of the file MSVBVM50.DLL that is different from the computer that was used to create the ActiveX .dll file.



RESOLUTION
Install MSVBVM50.DLL version 5.00.4319(sp2) on all computers that use your ActiveX .dll file. Version 5.00.4319 of MSVBVM50.DLL is shipped with Visual Studio 97 Service Pack 2 and 3. With this version of MSVBVM50.DLL installed, you should be able to successfully register your ActiveX .dll using RegSvr32.exe.



MORE INFORMATION
To reproduce this problem using the steps below, you will need two computers. The first computer has Visual Basic 5.0 and Visual Studio 97 Service Pack 2 or 3. Verify that the file MSVBVM50.DLL has the following properties:

Filename: MSVBVM50.DLL Size   : 1.28Mb (1,347,344 bytes) Created : July 19, 1997 Version : 5.00.4319(sp2)

The second computer has Visual Basic 5.0 without Service Packs installed. Verify that the file MSVBVM50.DLL has the following properties:

Filename: MSVBVM50.DLL Size   : 1.27Mb (1,334,032 bytes) Created : January 24, 1997 Version : 5.00.3724

Steps to Reproduce Problem
 Using the first computer, start a new ActiveX .dll project in Visual Basic.  Copy the following code to the Code window of the Class1 Module: Option Explicit

Public Sub Method1 MsgBox "From the ActiveX dll." End Sub

 From the File menu, click Make Project1.dll. The Make Project dialog box appears. Type Project1.dll in the File name text box and click OK. Copy the newly-created Project1.dll file to the System folder of the second computer. If the second computer is running Windows NT, copy the .dll to the System32 folder.</li> From the Start menu of the second computer, click Run. The Run dialog box appears. Type the following command line and click OK:

Regsvr32 C:\Windows\System\Project1.dll

Result: The error message appears. To work around this problem, copy MSVBVM50.DLL version 5.00.4319 to the second computer. Repeat step 5. The .dll file is successfully registered.</li></ol>

Keywords: kberrmsg kbprb KB183748

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.