Solved

Trouble registering some DLLs we created

Posted on 2004-10-08
5
335 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I wouldn't have - but I received their suggestion before yours.
0
 
LVL 9

Accepted Solution

by:
_ys_ earned 150 total points
Comment Utility
> 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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.

744 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

15 Experts available now in Live!

Get 1:1 Help Now