Solved

Can't register OCX; error 0x1f

Posted on 1998-12-09
9
2,310 Views
Last Modified: 2013-12-03
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?

 
0
Comment
Question by:trovatore
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 6

Expert Comment

by:snoegler
ID: 1417008
I think that this indicates probably that a VXD is missing.
I am just guessing, though :)
0
 

Author Comment

by:trovatore
ID: 1417009
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?

0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 150 total points
ID: 1417010
Download Filemon or NTFilemon from www.sysinternals.com
Start Filemon and now run the application that gives the error.
Filemon will show a trace. In this trace it will also show you which
file failed to open. That's the one you are missing.

Filemon can be redirected in a dos box using filemon > output.txt

Copy the missing files and register them if needed with regsvr32.exe in case of DLL/OCX files
0
 
LVL 6

Expert Comment

by:snoegler
ID: 1417011
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?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 86

Expert Comment

by:jkr
ID: 1417012
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...)
0
 
LVL 86

Expert Comment

by:jkr
ID: 1417013
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...)
0
 

Author Comment

by:trovatore
ID: 1417014
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?

0
 
LVL 86

Expert Comment

by:jkr
ID: 1417015
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...
0
 

Author Comment

by:trovatore
ID: 1417016
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 .

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now