Solved

Can't register dll

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

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…
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 user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

770 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