Solved

Can't register dll

Posted on 2003-10-24
6
1,693 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
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
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 clear a vector as well as how to detect empty vectors in C++.

821 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