Questions tagged [dll]

A dynamic-link library (DLL) is a module that contains functions and data that can be used by another module (application or DLL). It is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems.

A dynamic-link library (also written without the hyphen), or DLL, is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems. This type of library usually has the file extension DLL, OCX (for a library containing ActiveX controls), or DRV (for a legacy system driver). The file formats for DLLs are the same as for Windows EXE files — that is, Portable Executable (PE) for 32-bit and 64-bit Windows, and New Executable (NE) for 16-bit Windows. As with EXEs, DLLs can contain code, data, and resources, in any combination. In the broader sense of the term, any data file with the same file format can be called a resource DLL. Examples of such DLLs include icon libraries

A DLL is a library that contains code and data that can be used by more than one program at the same time. For example, in Windows operating systems, the Comdlg32 DLL performs common dialog box-related functions. Therefore each program can use the functionality that is contained in this DLL to implement an Open dialog box. This helps promote code reuse and efficient memory usage.

By using a DLL, a program can be modularized into separate components. For example, an accounting program may be sold by module. Each module can be loaded into the main program at run time if that module is installed. Because the modules are separate, the load time of the program is faster, and a module is only loaded when its functionality is requested.

25858 questions
125
votes
4 answers

How do I safely pass objects, especially STL objects, to and from a DLL?

How do I pass class objects, especially STL objects, to and from a C++ DLL? My application has to interact with third-party plugins in the form of DLL files, and I can't control what compiler these plugins are built with. I'm aware that there's no…
cf-
  • 8,598
  • 9
  • 36
  • 58
118
votes
2 answers

How to identify if the DLL is Debug or Release build (in .NET)

Possible Duplicate: How to tell if a .NET application was compiled in DEBUG or RELEASE mode? I'm sure this has been asked before, but google and SO search failed me. How can I identify if a DLL is a release build or debug build?
dr. evil
  • 26,944
  • 33
  • 131
  • 201
113
votes
4 answers

Exporting functions from a DLL with dllexport

I'd like a simple example of exporting a function from a C++ Windows DLL. I'd like to see the header, the .cpp file, and the .def file (if absolutely required). I'd like the exported name to be undecorated. I'd like to use the most standard calling…
Aardvark
  • 8,474
  • 7
  • 46
  • 64
112
votes
3 answers

Dynamically load a function from a DLL

I'm having a little look at .dll files, I understand their usage and I'm trying to understand how to use them. I have created a .dll file that contains a function that returns an integer named funci() using this code, I (think) I've imported the…
user969416
112
votes
6 answers

How to get the location of the DLL currently executing?

I have a config file that I need to load as part of the execution of a dll I am writing. The problem I am having is that the place I put the dll and config file is not the "current location" when the app is running. For example, I put the dll and…
Vaccano
  • 78,325
  • 149
  • 468
  • 850
109
votes
15 answers

Difference between .dll and .exe?

I want to know the exact difference between the dll and exe file.
Umesh Aawte
  • 4,590
  • 7
  • 41
  • 51
108
votes
4 answers

Dependency Walker: missing dlls

I have been trying to resolve .dll dependencies for the executable file with Dependency Walker. Currently, I am getting missing .dlls in the following form: API-MS-WIN-XXX EXT-MS-WIN-XXX For…
Ben N.
  • 1,217
  • 2
  • 9
  • 9
107
votes
4 answers

what does __declspec(dllimport) really mean?

I saw the Qt source code like this: class Q_CORE_EXPORT QBasicAtomicInt { public: ... }; Which Q_CORE_EXPORT macro defines like below: define Q_DECL_IMPORT __declspec(dllimport) So what does __declspec(dllimport) really mean?
gemfield
  • 3,228
  • 7
  • 27
  • 28
106
votes
15 answers

How do I register a DLL file on Windows 7 64-bit?

I have tried to use the following code: cd c:\windows\system32 regsvr32.exe dllname.ax But this is not working for me. How can I register a DLL file on Windows 7 with a 64-bit processor?
Rajkumar Reddy
  • 2,357
  • 6
  • 24
  • 29
106
votes
7 answers

Loading DLLs at runtime in C#

I am trying to figure out how you could go about importing and using a .dll at runtime inside a C# application. Using Assembly.LoadFile() I have managed to get my program to load the dll (this part is definitely working as I am able to get the name…
danbroooks
  • 2,712
  • 5
  • 21
  • 43
103
votes
22 answers

Could not load file or assembly 'System.ValueTuple'

I've got a VS2017 project that compiles to a DLL which is then called by an EXE written by someone else. Both projects target .Net Framework 4.6.2. I rewrote one of my DLL methods to return a tuple and also imported the associated NuGet package.…
Mike Lowery
  • 2,630
  • 4
  • 34
  • 44
102
votes
6 answers

how do I work around log4net keeping changing publickeytoken

We have an asp.net 4.0 project which uses a couple of frameworks which is dependent on log4net version 1.2.10.0. Today I tried to include a new framework which is dependent on log4net version 1.2.11.0, I've been stuck ever since: log4net 1.2.10.0…
AndreasKnudsen
  • 3,453
  • 5
  • 28
  • 33
100
votes
14 answers

java.lang.UnsatisfiedLinkError no *****.dll in java.library.path

How can I load a custom dll file in my web application? I've tried the following: Copied all required dlls in system32 folder and tried to load one of them in Servlet constructor System.loadLibrary Copied required dlls into tomcat_home/shared/lib…
Ketan Khairnar
  • 1,620
  • 3
  • 12
  • 21
99
votes
4 answers

Dependency Walker reports IESHIMS.DLL and WER.DLL missing?

On a Windows XP Professional SP3 with Internet Explorer 8 box, when I run Dependency Walker on an executable of mine it reports that: IESHIMS.DLL and WER.DLL can't be found. Do I need these DLL's? Where can I get them? I believe they are supposed…
User
  • 62,498
  • 72
  • 186
  • 247
98
votes
4 answers

Is there any native DLL export functions viewer?

Is there any free native Windows DLL export functions viewer, which shows the function name, and a list of their parameters?
Alon Gubkin
  • 56,458
  • 54
  • 195
  • 288