Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can't register dll

Posted on 2003-10-24
6
Medium Priority
?
1,705 Views
Last Modified: 2006-11-17
This isnt a C++ question, but I think this is the best place to get an answer to my problem.

I've written a BHO (browser helper object) dll file, and it works great on my computer.  I register the dll by typing in:
regsvr32 -c BHODll.dll
and it registers fine.  I am running Windows XP Pro.

I have a friend that tried to do the same thing on his computer, but he gets the following error when trying to run regsvr32 on the dll:

LoadLibrary("BHODll.dll") failed - The specified module could not be found

He is running windows 2000.  The dll is placed in the system32 directory (plus he tried running the command from the same dir as the dll).  How could it not find the module when it's in the same directory?

My only guess is my dll loads other dll files that his computer doesnt have.  I ran a program called depends on my dll to see what other dlls it depends on.  He has all those dlls on his computer, so that can't be the problem.

Ive tried this on numerous XP machines and it works fine.  He is the only person I know with a 2000 machine though, so I havnt been able to test to see if it works on other 2k machines.

So does anyone have any ideas?
0
Comment
Question by:lwinkenb
[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 Comments
 
LVL 9

Expert Comment

by:_ys_
ID: 9612906
It's proably not BHODll.dll that it's not finding, it's more likely a dependency.

Use Dependency Walker to view it's dependencies and determine what's missing from his PC.
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 9612919
1) I don't know -c flag of regsvr32. Writing
regsvr32 BHODll.dll
is enough to register dll.

2) I am not sure LoadLibrary tries to load library dependencies - at least there is nothing about this in MSDN. Possibly your friend makes some mistake.

Try to send him batch-file which registers Dll or small installation package.

In any case, to see library dependencies you may use Depends tool (comes with Visual Studio) or dumpbin utility (comes with Visual Studio and SDK).
0
 
LVL 5

Expert Comment

by:Daij-Djan
ID: 9615805
use FULL absolute paths in a batch file
0
 
LVL 5

Author Comment

by:lwinkenb
ID: 9615842
I already mentioned in my original question that I used Depends to see the library dependencies, and there were none that he didnt have.

I'm pretty sure that he didnt make a mistake from the command line either.  The dll was in his system 32 directory, so all he had to do was spell the name of the dll correctly.  We spent over an hour trying to get this to work, so I dont believe he spelled the dll wrong every time he tried to register it (probably over 50 times).

Is there some way I can manually register the dll without using regsvr32?
0
 
LVL 5

Accepted Solution

by:
lwinkenb earned 0 total points
ID: 9616387
Well problem solved finally.  He told me he copied the dll into all the system directories on his computer (he is running windows 2k server which apparently has more than one).  Then he ran regsvr32 again and it worked.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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.
Suggested Courses

722 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