问题
I'm trying to register a delphi-made library (with dependencies). On first try, regsvr32 failed saying it could not find the specified module, for which I found answer and copied all dependencies into the same directory my dll resides.
But now, regsvr32 fails with the message GetLastError returned 0x0000007e.
, and I could not find anywhere what this specific error code means. All mentions I found relate to a specific program or library and how to solve it for that specific reason. Examples:
- 0x0000007e Error When Registering Olemsg32.dll or Cdo.dll Files (at support.microsoft.com)
- RegSvr32 Error: 'LoadLibrary ("safileup.dll") failed. GetLastError returns 0x0000007e (at support.softartisans.com)
The command I use to register is:
regsvr32 C:\path\to\library.dll
Any idea of what causes this error and how to solve it?
UPDATE: Seems that the error code corresponded to ERROR_MOD_NOT_FOUND, and it meant (in a really obscure way) "The specified module could not be found."... same error I had before.
I copied the entire folder of a running instalation into the test machine (instead of trying to make a new instalation) and I was able to register the library. I'll now have to identify which one was the file I was needing.
回答1:
I can only find three definitions for that error code:
# for hex 0x7e / decimal 126 :
SYSTEM_THREAD_EXCEPTION_NOT_HANDLED bugcodes.h
NMERR_REMOTE_NOT_A_SERVER netmon.h
SQL_126_severity_15 sql_err
# Invalid pseudocolumn '%.*ls'.
ERROR_MOD_NOT_FOUND winerror.h
Are you sure the DLL is an ActiveX/COM library that needs to be registered with RegSvr32?
来源:https://stackoverflow.com/questions/5490508/regsvr32-fails-with-getlasterror-returns-0x0000007e