Link to home
Start Free TrialLog in
Avatar of trovatore
trovatore

asked on

Can't register OCX; error 0x1f

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?

 
Avatar of snoegler
snoegler

I think that this indicates probably that a VXD is missing.
I am just guessing, though :)
Avatar of trovatore

ASKER

Hmm.  I know next to nothing about VXDs.  Why would I need VXDs to register
an OCX file?  Supposing this is true, how would I go about finding out
which one is responsible?

ASKER CERTIFIED SOLUTION
Avatar of Mirkwood
Mirkwood

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
When the OCX/DLL tries to open a VXD while initializing (DllRegisterServer), maybe this can
lead to the error. What OCX/DLL are we speaking of, BTW?
Avatar of jkr
Mirkwood - pointers to sysinternals.com are always good, but of no use in this case... i bet there's no DLL missing!
This _really_ $&#&$%&! error code is used by Windows to indicate that a required export in a DLL can't be found, e.g. 'GetFileAttributesEx()' (kernel32.dll), which is only available in Win95 OSR2 and NT 4.0, but not in earlier versions of Win95...
(Believe me, this error alredy drove me crazy a lot of times...)
Mirkwood - pointers to sysinternals.com are always good, but of no use in this case... i bet there's no DLL missing!
This _really_ $&#&$%&! error code is used by Windows to indicate that a required export in a DLL can't be found, e.g. 'GetFileAttributesEx()' (kernel32.dll), which is only available in Win95 OSR2 and NT 4.0, but not in earlier versions of Win95...
(Believe me, this error alredy drove me crazy a lot of times...)
mirkwood -- thanks, I got Filemon and I like it; but I have to get my hands on one
of the balky machines before I can figure out if it's of use in this case.

snoegler -- when it happens, it happens for both OCXs, which are
richtx32.ocx (Microsoft Rich Text 5.0) and ss32x25.ocx (FarPoint Spread 2.5).

jkr -- we've successfully installed the app on machines with even the very
first (i.e. non-OEM)  release of Win95, so it doesn't need OSR2.  However there's
one thing -- the only thing we could figure out different about one of the machines
that balked was that it *didn't* have MS Word installed.  Could that matter?

Well, it could - i spent 1h debugging just to find out that the machine on which a certain error occured used a older version of comctl32.dll (no MS Office installed).
But, i din't mean that the problem is due to OSR2, it just was intended to be an example. My tip would be to check the version stamps of all DLLs/OCXs that are involved...
OK, just got the answer.  Turns out OLE automation wasn't up to snuff on this
machine.  I needed to get oadist.exe from
http://support.microsoft.com/download/support/mslfiles/OADIST.EXE .

I'm going to give Mirkwood the points anyway, because I appreciate the
tip about www.sysinternals.com .