Solved

Trouble registering some DLLs we created

Posted on 2004-10-08
5
339 Views
Last Modified: 2011-09-20
My company has produced a couple of DLLs written in Visual C++ - for use within some MS Access databases.

These DLLs are turning out to be quite temperamental when it comes to installing them on target PCs.

I am using Windows XP and one of our customers is using Windows Server 2000 - and we are both having the following trouble:

1.  Place the DLLs and installation batch file in the same directory.
2.  Navigate to this directory using the DOS prompt.
3.  Execute batch file.

The following error occurs:

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

A simple 'Dir *.dll' confirms that 'scinder.dll' is in the directory.

The content of the install.bat is as follows:

@echo off

REM Installation for the scinder.dll and scoutdy.dll files
REM Windows 98/ME/XP/2003 server

path=%path%;%windir%\system;%windir%\system32

echo About to install scinder.dll and scoutdy.dll. You will receive individual message confirmation of each install.
pause
regsvr32 scinder.dll
regsvr32 scoutdy.dll
echo Installation complete.


Have we missed something when compiling these DLLs?  I have heard also of 'self-registering' DLLs - is there a way that we can simply place the DLLs in a customer's System32 directory and have them working without having to execute regsvr32?
0
Comment
Question by:gawilson2000
  • 2
  • 2
5 Comments
 
LVL 86

Assisted Solution

by:jkr
jkr earned 100 total points
ID: 12266892
Try the dependency walker (www.dependencywalker.com) on the target machine to see whether any other DLL yours might rely on is missing. This is most likely to be the case.
0
 
LVL 5

Author Comment

by:gawilson2000
ID: 12272822
I have on my system an application called 'depends' - and after someone else's suggestion I ran it and found out that I was missing an important visual C DLL.

The strange thing was that I was able to place this DLL into System32 and it worked immediately.  So, getting back to the second part of me question, why is it that this one doesn't need regsvr32 - but the DLLs we created do?
0
 
LVL 86

Expert Comment

by:jkr
ID: 12273410
That was actually what I was referring to - a missing DLL on the target system. Why did you need nomeone else's suggestion? :o)
0
 
LVL 5

Author Comment

by:gawilson2000
ID: 12273787
I wouldn't have - but I received their suggestion before yours.
0
 
LVL 9

Accepted Solution

by:
_ys_ earned 150 total points
ID: 12295548
> I have heard also of 'self-registering' DLLs
Not only have you heard of them but you've likely created them as well. Self-registering DLLs simply refers to the notion that the DLLs contain their registration code in-situ. They know how to register themselves - you simply ask them to do so; and the easiest way to ask them is to use regsvr32.

> is there a way that we can simply place the DLLs in a customer's System32 directory and have them working without having to execute regsvr32?
It depends on how you use them. If from Access you use CreateObject to create your objects and invoke methods then you'll typically have to register the DLLs. On the other hand if you use DllImport to invoke method then no, you typically don't have to register your DLLs (dependent on how your DLLs are coded internally).

> why is it that this one doesn't need regsvr32 - but the DLLs we created do?
You're toying with two flavours of DLLs.
1) API and
2) COM/ActiveX

DLLs coded as APIs typically don't need registering.
DLLs coded as COM/ActiveX typically do need registering.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
c++ substatte a varabe for a string in a LPCTSTR statment 8 94
How to split this in C++ 4 117
Exception thrown at 0x00007FFD5BC81F28 7 53
Beginner to Unreal Engine 4 5 104
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

680 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