Can't register OCX; error 0x1f
Posted on 1998-12-09
We have a Win32 app that requires two .ocx files; when
installing, you have to run regsvr32 on these files.
On most machines it works fine, but on some it fails.
Using the more-detailed version of regsvr32.exe that
comes with MSVC++ 5.0, we get the message
LoadLibrary() failed. GetLastError returns 0x0000001f.
Now the MS Knowledge Base has articles about what to
do when you can't register an .ocx file, but they
all pertain to an error message of 0x485, which means
that some DLL in the tree of dependencies wasn't found.
I can force it to give this error message by deleting
one of the DLLs, so that isn't the problem. In
winerror.h I find that error 0x1f means
"A device attached to the system is not functioning"
which is not awfully informative.
What's wrong, and what do we do about it?