?
Solved

The filename of the DLL.

Posted on 2003-03-26
2
Medium Priority
?
202 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
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 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.
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.

770 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