Delphi – regsvr32 fails with GetLastError returns 0x0000007e

delphiregsvr32

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:

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.

Best Answer

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?

Related Topic