I run:
regsvr32 somefile.dll
There is a long delay (approx. 1 minute) and then a warning dialog pops up that says:
LoadLibrary("somefile.dll") failed.
GetLastError returns 0x0000007e.
The DLL is in my current directory. I have tried multiple DLLs and they all give me the same error.
The problem ended up being that I had an old version of C:\windows\system32\regsvr32.exe. I got a new version of the executable from one of the network admins and that solved my problem.
From Microsoft http://support.microsoft.com/kb/238265 , about the 0x0000007e error code when registering a specific DLL
This behavior occurs because the Olemsg32.dll and Cdo.dll files are being called from the wrong installation point.
see if you can apply the fixes they suggest to your file, and you have to get administrative rights.
I discovered that the DLL that I was trying to register required that an additional DLL (mvscrtd.dll) had to be present in the system32 directory. I used the "Process Monitor" utility from Sysinternals to capture regsvr32 activity, and discovered a reference to the missing file.
User contributions licensed under CC BY-SA 3.0