?
Solved

Registering a COM...

Posted on 1999-01-24
11
Medium Priority
?
250 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 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
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.

765 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