Solved

Error Registering ActiveX Control

Posted on 1998-07-23
11
361 Views
Last Modified: 2013-11-20
Getting the following error when I try to register my TestX.ocx ActiveX control with regsvr32.exe or with the Tools/"Register Control" macro in Visual Studio.  

 LoadLibrary("D:\TestX\Debug\TestX.ocx")
 GetLastError returns 0x00000485

It's been a while since I have done this and can't remember how to look up this hex error code.
TestX is an ActiveX control that was created from AppWizard in DevStudio.
Any ideas on how I can get this ActiveX control registered properly so that I can insert it into other container applications?
0
Comment
Question by:jonjon
  • 5
  • 4
  • 2
11 Comments
 

Author Comment

by:jonjon
ID: 1319665
Edited text of question
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1319666
Ahh.. My favorite.

You're missing a DLL file!  Probably one that ActiveX MFC Requires.  I'll respond right back and give you the probable names!

Phillip

0
 
LVL 7

Expert Comment

by:psdavis
ID: 1319667
OK, how about oleaut32.dll and olepro32.dll!

Good luck
Phillip



0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

Author Comment

by:jonjon
ID: 1319668
Sorry Phillip, that did not fix the problem. I already had those two dll's in my /windows/system directory, which is in my PATH. Any other ideas?
0
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1319669
Error 0x00000485 means "One of the library files needed to run this application cannot be found.".

You need mfc42.dll and msvcrt.dll.
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1319670
I'm going to assume msc42.dll and msvcrt.dll was already on your system.  

Are you trying to compile the ActiveX on your machine with the Developer's studio or on another machine without Developer's studio.

If it is with the developer's studio, then the question is "do you get this message when it registers during compilation or only later".  If it is without developer's studio, then look at your "link" options to see if you include any libraries.  Then the DLL libraries that it links to are missing.

Phillip
0
 

Author Comment

by:jonjon
ID: 1319671
Chensu,  How do you look up the error messages? Don't you have to convert the hex number and look it up in some *.err file?
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1319672
I'm not chensu, but...

Convert the 485 to decimal 1157.

Look up Online documentation
"System Errors - Numerical Order"

1157 One of the library files needed to run this application cannot be found.  ERROR_DLL_NOT_FOUND
 
So, you're "Missing a DLL file"!

Phillip

0
 

Author Comment

by:jonjon
ID: 1319673
Got it!  It was missing a proprietary DLL that I created previously.  Thanks to Phillip(psdavis) and chensu.  I would like to split the points 50:50 but I don't know how.  psdavis gave me more helpful information on solving the problem, but chensu had the question locked with his answer.  I appreciate both responses.
jonjon
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1319674
I'm not bitter, but there are ways to do that next time.

1) If you want to split the points, you can get a hold of Support and tell them that you want to split them and then add another question like "Answer for %Name%" and then that person can respond and receive the answer.

2) Reject the answer and let the other person receive the due credit.

Phillip

0
 
LVL 23

Expert Comment

by:chensu
ID: 1319675
>How do you look up the error messages?

Visual C++ comes with a useful utility "Erro Lookup". Select it from the menu Tools. Type 0x00000485 in the edit box. That's it.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Login Script to Copy Folders 12 35
unable to delete all specified values regedit 38 395
NotAlone Challenge 20 83
firstChar challenge 13 115
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 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