Microsoft KB Archive/249873

= Explanation of Regsvr32 usage and error messages =

Article ID: 249873

Article Last Modified on 10/18/2007

-

APPLIES TO


 * Windows Vista Enterprise
 * Windows Vista Business
 * Windows Vista Business N 64-bit Edition
 * Windows Vista Home Basic
 * Windows Vista Home Basic N
 * Windows Vista Home Basic N 64-bit Edition
 * Windows Vista Home Premium
 * Windows Vista Starter
 * Windows Vista Ultimate
 * Windows Vista Business N
 * Windows Vista Business 64-bit Edition
 * Microsoft Windows XP Home Edition
 * Microsoft Windows XP Media Center Edition 2002
 * Microsoft Windows XP Professional
 * Microsoft Windows XP Professional 64-Bit Edition (Itanium)
 * Microsoft Windows XP Professional N
 * Microsoft Windows XP Home Edition N
 * Microsoft Windows XP Starter Edition
 * Microsoft Windows XP Tablet PC Edition
 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows 2000 Datacenter Server
 * Microsoft Windows Millennium Edition
 * Microsoft Windows 98 Standard Edition
 * Microsoft Windows 98 Second Edition
 * Microsoft Windows 95
 * Microsoft Windows 95
 * Microsoft Windows 95
 * Microsoft Windows 95
 * Microsoft Windows 95
 * Microsoft Windows NT Workstation 4.0 Developer Edition
 * Microsoft Windows NT Workstation 4.0 Developer Edition
 * Microsoft Windows NT Workstation 4.0 Developer Edition
 * Microsoft Windows NT Workstation 4.0 Developer Edition
 * Microsoft Windows NT Workstation 4.0 Developer Edition
 * Microsoft Windows NT Workstation 4.0
 * Microsoft Windows NT Workstation 4.0 Developer Edition
 * Microsoft Windows NT Workstation 4.0 Developer Edition
 * Microsoft Windows NT Server 4.0 Standard Edition
 * Microsoft Windows NT 4.0 Service Pack 1
 * Microsoft Windows NT 4.0 Service Pack 2
 * Microsoft Windows NT 4.0 Service Pack 3
 * Microsoft Windows NT 4.0 Service Pack 4
 * Microsoft Windows NT 4.0 Service Pack 5
 * Microsoft Windows NT 4.0 Service Pack 6
 * Microsoft Windows NT 4.0 Service Pack 6a

-



This article was previously published under Q249873



If this article does not describe the error message that you are receiving, view the following Microsoft Knowledge Base article to view more articles that describe error messages:.

315854 Windows 98 and Windows Me error message resource center

For more information about detailed error message explanations, recommended actions, and additional support resources, visit the following Microsoft Web site:

http://www.microsoft.com/technet/support/ee/ee_advanced.aspx



SUMMARY
You can use the Regsvr32 tool (Regsvr32.exe) to register and unregister OLE controls such as DLL or ActiveX Controls (OCX) files that are self-registerable. This may be necessary to troubleshoot some issues with Windows, Microsoft Internet Explorer, or other programs. For example, the following article in the Microsoft Knowledge Base requires that you use Regsvr32.exe to unregister the Wuv3is.dll control before you reinstall it from the Windows Update site:

241122 Application error when you click Product Updates

If the registration of a control is unsuccessful or you have to have developer information about how to troubleshoot unsuccessful OLE control registration attempts, please see the following article in the Microsoft Knowledge Base:

140346 Possible reasons for OLE control registration failure



MORE INFORMATION
Regsvr32.exe is included with Microsoft Internet Explorer 3.0 or later versions, Windows 95 OEM Service Release 2 (OSR2) or later versions, and Windows NT 4.0 Service Pack 5 (SP5) or later versions. Regsvr32.exe is installed in the System (Windows Me/Windows 98/Windows 95) or System32 (Windows NT/Windows XP/Windows Vista) folder.

Regsvr32.exe usage
RegSvr32.exe has the following command-line options:

Regsvr32 [/u] [/n] [/i[:cmdline]]

/u - Unregister server

/i - Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall

/n - do not call DllRegisterServer; this option must be used with /i

/s – Silent; display no message boxes (added with Windows XP and Windows Vista)

When you use Regsvr32.exe, it attempts to load the component and call its DLLSelfRegister function. If this attempt is successful, Regsvr32.exe displays a dialog box that indicates success. If the attempt is unsuccessful, Regsvr32.exe returns an error message. This may include a Win32 error code. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

193625 WinInet error codes (12001 through 12156)

For example, to manually register a Sample.ocx ActiveX control, type the following command at command prompt:

c:\regsvr32.exe sample.ocx

Regsvr32.exe error messages in Windows Vista
The following list contains RegSvr32 error messages and possible causes.

'''The command-flag ""%1"" is not valid. Please review the command usage and try again.'''

An invalid combination of options was passed in the command line to regsvr32.exe.

This command is only valid if a Microsoft Visual Studio OLE Custom Control project is opened.

Regsvr32.exe was invoked by Visual Studio but no modules were specified in the command line.

To register a module, you must provide a binary name.

Regsvr32.exe was invoked without specifying any modules in the command line.

'''The command OleInitialize failed to run. Your computer might be low on memory. Close any open programs and then try again.'''

Regsvr32 must initialize the COM library before it can call needed COM library functions and uninitialize the library when it shuts down. These error messages occur if an attempt to initialize or uninitialize the COM library is unsuccessful.

The module ""%1"" failed to load.\n\n Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files.\n\n%2.

There was an error in loading a module that was specified in the command line. The error text appears as part of the message.

The module ""%1"" was loaded but the entry-point %2 was not found.\n\nMake sure that ""%1"" is a valid DLL or OCX file and then try again

Regsvr32.exe was unable to find the required entrypoint in the module specified in the command line. This can occur if the entrypoints are not properly exported from the module or if the module is not a .DLL or .OCX file.

The module ""%1"" was loaded but the call to %2 failed with error code %3.\n\nFor more information about this problem, search online using the error code as a search term.

There was an error when regsvr32.exe invoked the entrypoint in the module specified in the command line. The error code appears as part of the message

'''The module ""%1"" may not compatible with the version of Windows that you're running. Check if the module is compatible with an x86 (32-bit) or x64 (64-bit) version of regsvr32.exe.'''

This error can happen, for example, if regsvr32.exe is run on an x86 machine and the module specified in the command line is a 64-bit module.

Regsvr32.exe error messages prior to Windows Vista
The following list contains RegSvr32 error messages and possible causes.

Unrecognized flag: /invalid_flag

You typed an invalid combination of flags or switches (refer to the "Regsvr32.exe Usage" section in this article).

No DLL name specified.

You did not include a .dll file name (refer to the "Regsvr32.exe Usage" section in this article).

Dllname was loaded, but the DllRegisterServer or DllUnregisterServer entry point was not found.

Dllname is not a .dll or .ocx file. For example, typing regsvr32 wjview.exe generates this error message.

Dllname is not an executable file and no registration helper is registered for this file type.

Dllname is not an executable file (.exe, .dll, or .ocx). For example, typing regsvr32 autoexec.bat generates this error message.

Dllname was loaded, but the DllRegisterServer or DllUnregisterServer entry point was not found.

Dllname may not be exported, or a corrupted version of Dllname may be in memory. Consider using Pview to detect the file and remove it.

Dllname is not self-registerable or a corrupted version is in memory.

For example, typing regsvr32 icwdial.dll returns this error message because the Icwdial.dll file is not self-registerable. If you suspect a corrupted version of  is in memory, try restarting your computer or re-extract the original version of the file. If you are running Windows NT, you may need to use the Kill or Pview tool from the Microsoft Windows NT Server 4.0 Resource Kit. For additional information, click to view the following article in the Microsoft Knowledge Base:

197155 How to kill an orphaned process

OleInitialize failed (or OleUninitialize failed).

Regsvr32 must initialize the COM library before it can call needed COM library functions and uninitialize the library when it shuts down. These error messages occur if an attempt to initialize or uninitialize the COM library is unsuccessful. For example, the Ole32.dll file may be corrupted or may be the wrong version.

'''LoadLibrary(" ") failed. GetlastError returns 0x00000485'''

From Winerror.h, 0x00000485 = 1157 (ERROR_DLL_NOT_FOUND), which means "One of the library files needed to run this application cannot be found." For example, typing regsvr32 missing.dll returns this error message if the Missing.dll file is not found.

'''LoadLibrary(" ") failed. GetLastError returns 0x00000002'''

From Winerror.h, 0x00000002 = 2 (ERROR_FILE_NOT_FOUND), which means "The system cannot find the file specified." In other words, a dependent DLL was not found. For example, typing regsvr32 icwdial.dll with Tapi32.dll (a dependency) missing, returns this error message.

'''LoadLibrary("dskmaint.dll") failed. GetLastError returns 0x000001f'''

From Winerror.h, 0x000001f = 31 (ERROR_GEN_FAILURE), which means "A device attached to the system is not functioning." This behavior can occur if you try to register a Win16 .dll file. For example, typing regsvr32 dskmaint.dll returns this error message.

'''DllRegisterServer (or DllUnregisterServer)in  failed. Return code was: '''

Search Winerror.h for.

Additional query words: regsrv32 exe w98hem

Keywords: kberrmsg kbinfo kbkern32dll kbenv kbresolve KB249873

-

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

© Microsoft Corporation. All rights reserved.