?
Solved

The filename of the DLL.

Posted on 2003-03-26
2
Medium Priority
?
212 Views
Last Modified: 2010-04-01
Hi

When I compile and build a dll named name1.dll, then I
directly rename name1.dll to name2.dll. Putting it in the
system to call name2.dll.
Is there problem for me to do so ? The dll can still work?



Regards
Jabba
0
Comment
Question by:jabbaa
2 Comments
 
LVL 2

Accepted Solution

by:
bkrahmer earned 60 total points
ID: 8215887
AFAIK, there is no information in the dll that is relevant to its filename.  The important stuff are the sections which export the function definitions, etc.  This should work.

brian
0
 
LVL 8

Expert Comment

by:fl0yd
ID: 8217167
The .dll will still be functional, but the code using the .dll will fail to work, if the name 'name1.dll' is hardcoded into it.

Implicit linking will become impossible though. The entire .dll's information is stored in name1.lib, especially the name of the .dll file, thus making it unavailable, as the filename will be put into the executable.

If you dynamically locate the .dll in your code _and_ use LoadLibrary() in conjunction with GetProcAddress(), i.e. use explicit linking you will be all set. I doubt that this would be the most elegant way, but the .dll will remain functional if renamed.

.f
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

621 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