Solved

Registering a COM...

Posted on 1999-01-24
11
244 Views
Last Modified: 2013-12-14
Using Visual C++ 6.0 I built an ATL COM with a couple of methods... it compiles fine, registers on the machine I developed it on fine using regsvr32.exe, and runs like a charm through a Web page...

However, I cannot register the DLL on the production machine (another machine) using regsvr32.exe.... I get this error:

LoadLibrary("hrs.dll") failed. GetLastError returns 0x0000007e.

Any ideas?

When I built the ATL using the V.C++ project wizard, I specified for it to allow MTS and proxy/stub... then I just added an ATL ActiveX COM, then added my methods... weird?

Thanks...
0
Comment
Question by:loyaliser
  • 6
  • 5
11 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 20 total points
ID: 1185004
Hi,
Make sure all the dll's you use are in the correct directorys.
0x0000007e means "A module could not be found" which usually means a DLL (probably hrs.dll in your case) that your component needs can not be found.
There is a tool called RegDrop that will display the error messages in text form and numerically.
Regards Barry
 You can download it at http://www.addisonsw.com


0
 
LVL 1

Author Comment

by:loyaliser
ID: 1185005
So, if I compile the project in a folder on the first machine, say d:\hrs\, I should copy the DLL into the same folder on the second machine where it will be registered? In other words... not matter which machine the DLL is on, it should reside in a unique folder... right?
0
 
LVL 17

Expert Comment

by:inthe
ID: 1185006
Hi loyaliser
as long as you can guarantee an absolute path to the dll it wont matter were it is but for easiness i put files like this in there own folder.
is it working ok now?
Regards Barry
0
 
LVL 1

Author Comment

by:loyaliser
ID: 1185007
Well... I will try it on Monday when I get to work... don't have it here at home... sorry.

I will try to register it on the new machine after placing in the same path structure as it exists on the initial machine I compiled it on.

Thanks...
0
 
LVL 1

Author Comment

by:loyaliser
ID: 1185008
Well... nothing has worked so far. If a library is missing, then perhaps I need to instal VC++ 6.0 on the machine I am trying to register hrs.dll. Since hrs.dll was built using the ATL in VC++ 6.0, perhaps the new machine does not have the ATL library... or something... i don't know. what do u think?

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 17

Expert Comment

by:inthe
ID: 1185009
ok just back from work ,
i have 3 ideas :
did you make and build atl.dll ?  (theres a project folder for it),apparently in vc6 it's not preinstalled as it was in vc5 >>weird huh
then  put atl.dll in the system32 directory.
also make sure you give regserv complete and correct path to your dll when you register it, and finally you can do a right click on your dll and select quickview in explorer  and see what other dll's it imports functions from and make sure they are on target machine.
Regards Barry
ps im outa ideas after that :-(

0
 
LVL 1

Author Comment

by:loyaliser
ID: 1185010
Did not make and build the atl.dll... will try to see if it is on the server in the right folder, if not, will copy and try re-registering.

The path to the DLL is correct when I run regsrv32...

QuickView says that it imports only one DLL, which is on the other computer in the right folder??!?!?!

Any way... thanks for your help...
0
 
LVL 17

Expert Comment

by:inthe
ID: 1185011
another tip i found :
If you built your dll MinSize you
should also copy and register atl.dll on
another machine.  Make sure you
copy right version of it (Win95/WinNT).

i found loads of people asking about this on dejanews seems you are not alone on this one
0
 
LVL 1

Author Comment

by:loyaliser
ID: 1185012
What is MinSize?
0
 
LVL 17

Expert Comment

by:inthe
ID: 1185013
never heard of it before i presumed it was a way of building a dll .i just found it in response to another user who was having the same problem.

0
 
LVL 1

Author Comment

by:loyaliser
ID: 1185014
Gotcha... thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

911 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now