Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can't register OCX; error 0x1f

Posted on 1998-12-09
9
Medium Priority
?
2,319 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 450 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
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
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
 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

670 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