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
715
votes
18 answers

Embedding DLLs in a compiled executable

Is it possible to embed a pre-existing DLL into a compiled C# executable (so that you only have one file to distribute)? If it is possible, how would one go about doing it? Normally, I'm cool with just leaving the DLLs outside and having the setup…
Merus
  • 8,796
  • 5
  • 28
  • 41
502
votes
19 answers

When to use dynamic vs. static libraries

When creating a class library in C++, you can choose between dynamic (.dll, .so) and static (.lib, .a) libraries. What is the difference between them and when is it appropriate to use which?
Morten Christiansen
  • 19,002
  • 22
  • 69
  • 94
367
votes
5 answers

Difference between shared objects (.so), static libraries (.a), and DLL's (.so)?

I have been involved in some debate with respect to libraries in Linux, and would like to confirm some things. It is to my understanding (please correct me if I am wrong and I will edit my post later), that there are two ways of using libraries when…
Cloud
  • 18,753
  • 15
  • 79
  • 153
320
votes
36 answers

System.MissingMethodException: Method not found?

Previous working asp.net webforms app now throws this error: System.MissingMethodException: Method not found The DoThis method is on the same class and it should work. I have a generic handler as such: public class MyHandler: IHttpHandler { …
user603007
  • 11,416
  • 39
  • 104
  • 168
309
votes
9 answers

What exactly are DLL files, and how do they work?

How exactly do DLL files work? There seems to be an awful lot of them, but I don't know what they are or how they work. So, what's the deal with them?
stalepretzel
  • 15,543
  • 22
  • 76
  • 91
293
votes
5 answers

DLL and LIB files - what and why?

I know very little about DLL's and LIB's other than that they contain vital code required for a program to run properly - libraries. But why do compilers generate them at all? Wouldn't it be easier to just include all the code in a single…
Xonara
  • 3,113
  • 5
  • 22
  • 12
287
votes
6 answers

Resolving LNK4098: defaultlib 'MSVCRT' conflicts with

This warning: LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library is a fairly common warning in Visual Studio. I'd like to understand the exact reason for it and the right way (if at all) to…
shoosh
  • 76,898
  • 55
  • 205
  • 325
283
votes
5 answers

How can I test a Windows DLL file to determine if it is 32 bit or 64 bit?

I'd like to write a test script or program that asserts that all DLL files in a given directory are of a particular build type. I would use this as a sanity check at the end of a build process on an SDK to make sure that the 64-bit version hasn't…
morechilli
  • 9,827
  • 7
  • 33
  • 54
280
votes
14 answers

Windows 7, 64 bit, DLL problems

I have a problem with our executable. I'm running this C++ 32-bit executable on my Windows 7 64-bit development box that also has all those Microsoft applications (Visual Studio 2008 + 2010, TFS, SDK, Microsoft Office)... And it's still running just…
tlvs
  • 2,835
  • 2
  • 13
  • 7
262
votes
31 answers

The requested operation cannot be performed on a file with a user-mapped section open

Whenever I tried to copy 4 files into my bin folder, after stopping the main service, I am getting an error with one file (TexteDll). The error is: Cannot copy TexteDll: The requested operation cannot be performed on a file with a user-mapped…
peter
  • 8,158
  • 21
  • 66
  • 119
261
votes
13 answers

How do I find the PublicKeyToken for a particular dll?

I need to recreate a provider in my web.config file that looks something like this:
Matthew Jones
  • 25,644
  • 17
  • 102
  • 155
259
votes
12 answers

How to check for DLL dependency?

Sometimes when I'm doing a little project I'm not careful enough and accidentally add a dependency for a DLL that I am not aware of. When I ship this program to a friend or other people, "it doesn't work" because "some DLL" is missing. This is of…
orlp
  • 112,504
  • 36
  • 218
  • 315
256
votes
6 answers

Can't find how to use HttpContent

I am trying to use HttpContent: HttpContent myContent = HttpContent.Create(SOME_JSON); ...but I am not having any luck finding the DLL where it is defined. First, I tried adding references to Microsoft.Http as well as System.Net, but neither is in…
user1416156
  • 2,973
  • 4
  • 18
  • 14
238
votes
20 answers

Dependent DLL is not getting copied to the build output folder in Visual Studio

I have a visual studio solution. I have many projects in the solution. There is one main project which acts as the start up and uses other projects. There is one project say "ProjectX". Its reference is added to main project. The ProjectX references…
Brij
  • 11,731
  • 22
  • 78
  • 116
223
votes
7 answers

How can I use a DLL file from Python?

What is the easiest way to use a DLL file from within Python? Specifically, how can this be done without writing any additional wrapper C++ code to expose the functionality to Python? Native Python functionality is strongly preferred over using a…
Tom Hennen
  • 4,746
  • 7
  • 34
  • 45
1
2 3
99 100