What do the various
regsvr32 exit codes mean?
The exit codes for the
regsvr32 program are currently as follows:
|Error parsing command line
|Registration function failed
This information is included for diagnostic and troubleshooting purposes. I don’t think the values are contractual.
regsvr32 program basically does five things, and the exit codes correspond to each of those steps.
- Parse the command line to see what it’s being asked to do.
- Initialize OLE.
- Load the library.
- Find the function to be called. The command line options specify which function to look for. Could be
DllUnregisterServer, or even
- Call it.
Steps 4 and 5 may be repeated if the command line options indicate that multiple functions should be called.
If something goes wrong, the
regsvr32 program reports the error details to the user, and the exit code summarizes which step it got stuck at. Future versions of
regsvr32 may add additional steps, or change the order of the steps, which would trigger renumbering. The exit code is for diagnostic and troubleshooting purposes, so you can try to figure out why something went wrong.
We’ll put this information to use next time.