?
Solved

Registering a COM...

Posted on 1999-01-24
11
Medium Priority
?
254 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 80 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
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…

830 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