Solved

Can't register OCX; error 0x1f

Posted on 1998-12-09
9
2,312 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

777 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