Solved

Can't register dll

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

932 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

14 Experts available now in Live!

Get 1:1 Help Now