Solved

Can't register dll

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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 how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

762 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

20 Experts available now in Live!

Get 1:1 Help Now