plaodj 发表于 2019-5-3 21:38:09

What do the various regsvr32 exit codes mean?

The exit codes for the regsvr32 program are currently as follows:
Exit codeMeaning
0Success
1Error parsing command line
2OleInitialize failed
3LoadLibrary failed
4GetProcAddress failed
5Registration function failed
This information is included for diagnostic and troubleshooting purposes. I don’t think the values are contractual.The 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 Dll­Register­Server, Dll­Unregister­Server, or even Dll­Install.
[*]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.
页: [1]
查看完整版本: What do the various regsvr32 exit codes mean?