Solved

Registering a COM...

Posted on 1999-01-24
11
243 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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.

747 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

12 Experts available now in Live!

Get 1:1 Help Now