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

x
?
Solved

regsvr32 needs any dlls?

Posted on 1998-07-28
15
Medium Priority
?
424 Views
Last Modified: 2010-05-18
I tried to do
regsvr32 xxxxx.ocx
and got error message: LoadLibary("xxxxx.ocx") failed.
However, I did the same thing with the same file in another PC with success.
Do you think to do that we need some dll files or what in a PC? what are the files?
0
Comment
Question by:username1
[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
  • 8
  • 6
15 Comments
 
LVL 39

Expert Comment

by:abel
ID: 1466982
You probably need "xxxxx.ocx" on your machine, or you need to supply the correct path. Search "xxxxx.ocx" on your computer and if it's not in C:\Windows, C:\Windows\System (for NT: C:\WinNT or C:\WinNT\System32) you'll have to supply the full path.

Regards, Abel
0
 
LVL 39

Expert Comment

by:abel
ID: 1466983
BTW
RegSvr32.exe needs the libraries KERNEL32.DLL, USER32.DLL and OLE32.DLL. All of them should reside on your system. Without KERNEL32.DLL and USER32.DLL, your system won't even work.
0
 

Author Comment

by:username1
ID: 1466984
Hi  abel

thank you for your comments.
I did that from a floppy: both regsvr32.exe and xxxxx.ocx are in the floppy.
That worked in one PC but not in another.
I have just checked all the 3 dlls you mentioned are in Windoew\System of the PC that failed to register ocx.

Cheers.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 39

Expert Comment

by:abel
ID: 1466985
Hi
I didn't know that it was possible to register an ocx/dll that's on a floppy...
I think you have two different situations here on the two machines:

M1   xxxxx.ocx is on the floppy AND in the system-dir
M2   xxxxx.ocx is ONLY on the floppy

Try it by copying xxxxx.ocx to the system-dir and call regsvr32.exe again. Even if your program needs to be run from the floppy, it will work.

Regards, Abel
0
 

Author Comment

by:username1
ID: 1466986
Hi Abel

i have just tried to copy xxxxx.ocx to Windows\System and run regesvr32.exe frome dos. This time I got
LoadLibary("xxxxx.ocx") failed
GetLastError return 0x00000485.

???????????
0
 
LVL 39

Expert Comment

by:abel
ID: 1466987
Hi,
Ok, sorry, I directed you in the wrong way (I thought it was the most obvious). Below I have a more possible explanation and solution for you. I hope it works out.

That is this error:
"One of the library files needed to run this application cannot be found.", or code: ERROR_DLL_NOT_FOUND (decimal: 1157, hex: 485).

This error doesn't mean that regsvr32 fails, but that your ocx needs additional libraries (it also says that the error is the error from LoadLibrary("xxxxx.ocx"), meaning that that's where it fails and where the error comes from). To know what libraries your ocx needs (and probably it needs them registered first) you'll have to use some tool like QuickView (a PowerToy utility from Microsoft, if you use NT it's built-in) to view the import table. Using QV it'll say that it hasn't got a viewer installed for OCX's, but if you let it view your file with one of the standard/default viewers, it's ok. You'll see lot's of boring technical stuff, but little downward you'll find the Import Table. That's where you should look for any dll's (it should AT LEAST list KERNEL32.DLL in the import table).
You can, of course, also use some other viewer which shows the import table for you.

Look up on your system every dll you find in the import table. If it's not there, you know where the error gets from. Find the dll, copy it to your HD, register it and run REGSVR32 again on the ocx.

Regards, Abel
0
 

Expert Comment

by:Ajoy
ID: 1466988
username1,
As an alternative try using Regocx32

0
 

Author Comment

by:username1
ID: 1466989
Hi Abel,

After reading your comments (difficult for me to understand :-)), I remember that when wrote the xxxxx.ocx I added a custom control which needs a dll file! And, it needs some dll files come whith VB..... Perhaps, regsvr32.exe can detect if the dll files (the ocx needed) existed or not in Windows\System?

I will copy the dll files to the PC and see what happens.

Cheers.
0
 
LVL 39

Expert Comment

by:abel
ID: 1466990
Username1,
If you've built your ocx with VB, why don't you make an install program with the VB Setup Wizard? That makes life a lot easier for these cases, because every program built with VB always needs some extra dll's (at least MSVBVM50.DLL for VB5). The wizard helps you with selecting the files needed and creates a setup application for you that you can easily distribute. It also registers the dll's or ocx's for you.

Regards, Abel
0
 
LVL 39

Expert Comment

by:abel
ID: 1466991
PS If you only have VB CCE (Control Creation Edition) you won't have the Setup Wizard. In that case you have to do it by hand.
0
 

Author Comment

by:username1
ID: 1466992
Hi Abel,

Yes, after copy MSVBVM50.DLL to the PC, xxxxx.ocx has been registed!!!!!!!!!!!!!!!!!

Is MSVBVM50.DLL = vb40032.dll in VB4 = vbrun300.dll in VB4?

Please put you answer here so that I can pass the points to you.
0
 
LVL 39

Accepted Solution

by:
abel earned 280 total points
ID: 1466993
Thanks for letting me answer this, and good that it works now.

Here's the answer, but for visitors, see the thread below as well.

Make sure you have all the needed dlls that are being used by the ocx on the target machine. Most VB-apps need MSVBVM50.DLL (VB5), VB40032 or VB40016 (VB4), VBRUN300 (VB3), VBRUN200 (VB2 or VBRUN100 (VB1) to run properly (most? no all!). Even when you build an ocx in VB you need it.
You can also use the App Wizard to do all the dirty work for you.

That's it by now,

Regards, Abel
0
 

Author Comment

by:username1
ID: 1466994
Adjusted points to 70
0
 

Author Comment

by:username1
ID: 1466995
See you next time Abel :-)
0
 
LVL 39

Expert Comment

by:abel
ID: 1466996
Thanks for the extra points :)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

705 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