Solved

Trouble registering some DLLs we created

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

777 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