Solved

regsvr32 needs any dlls?

Posted on 1998-07-28
15
421 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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

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

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month4 days, 13 hours left to enroll

635 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