Solved

Registering a COM...

Posted on 1999-01-24
11
248 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
[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
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Industry Leaders: 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!

Question has a verified solution.

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

Suggested Solutions

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.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

696 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