Solved

Trouble registering some DLLs we created

Posted on 2004-10-08
5
336 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

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
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 viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
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.

947 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