Solved

Can't register OCX; error 0x1f

Posted on 1998-12-09
9
2,315 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 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
dialer.exe 4 75
Where to obtain Oracle Data Provider for .NET 3.5 7 62
What .NET website keeps me current? 9 81
Input parameteres to DragOver 2 58
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

710 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