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
6
votes
2 answers

Can Delphi only use a .dll if required?

I have added these two methods to the 1st unit of my Delphi 5 application. function Inp(PortAddress: Integer): Integer; stdcall; external 'inpout32.dll' name 'Inp32'; procedure Output(PortAddress, Value: Integer); stdcall; external 'inpout32.dll'…
notidaho
  • 588
  • 8
  • 28
6
votes
4 answers

share same dll through different web applications without copying

I have two different asp.net web applications both referencing the same dll e.g. SharedLibrary.dll. I want to know if there is a way of adding some web.config setting to one of the application's config files to avoid the need to have two copies of…
Matthew Dresser
  • 11,273
  • 11
  • 76
  • 120
6
votes
1 answer

How does 32bit and 64bit DLLs link to the same C:\system32\kernel32.DLL?

I was sure 64bit DLL cannot link to 32bit DLL.
pavelkolodin
  • 2,859
  • 3
  • 31
  • 74
6
votes
2 answers

API Hooking without Detours

Intro Info: Windows 7 64-bit. C++. 64-bit Apps and DLL's. Hooking without MS Detours. Question: I've struggled on the issue of getting a working example that demonstrates hooking in Windows. Most of the tuts out there seem to have been written…
user850275
  • 311
  • 3
  • 7
  • 17
6
votes
1 answer

Convert lib + header file to DLL

I have a library (lib file + .h header file). I like to turn it into a DLL so I can easiliy use it in VB6. Is there a convenient way to do this?
Robbert Dam
  • 4,027
  • 10
  • 39
  • 58
6
votes
4 answers

Java Exception : java.lang.UnsatisfiedLinkError: ocijdbc11.dll: %1 is not a valid Win32 application

I am trying to make a connection to oracle through java program. Following is the configuration. Windows 7, 64 bit. JDK 1.6 Oracle client 11g R2, 64 bit. ojdbc6.jar in the class path of my standalone application. But I am getting following…
pun sri
  • 71
  • 1
  • 1
  • 4
6
votes
3 answers

Pass string from C# to C DLL

I am trying to pass a string from C# to a C DLL. From what I have read .NET should do the conversion from string to char* for me, however I get "error CS1503: Argument '1': cannot convert from 'string' to 'char*'" Can someone advise me of where I…
integra753
  • 271
  • 1
  • 5
  • 19
6
votes
4 answers

Can I unload a DLL from another process? (Win32)

I want to unload a DLL from another process. Is it possible? If yes, how to do that? (I'm using Win32 API) Thank you very much.
Jack Bui
  • 160
  • 1
  • 2
  • 9
6
votes
3 answers

C++: Injecting 32 bit targets from 64 bit process

I have written a DLL-Injector in C++ recently, for which the requirements were the following The INJECTING PROCESS (let's call it the 'Injector') as well as the DLL TO BE INJECTED (Injection) exist in 64 and 32 bit variants. Depending on the…
PuerNoctis
  • 1,364
  • 1
  • 15
  • 34
6
votes
1 answer

What is the behavoir of atexit() in a dll/so loaded at runtime?

If I load a dll/so file at runtime (i.e. using LoadLibrary() or dlopen()), what is the behavior of the C++ atexit() function? Does it get called if I unload the library before the application exits? And can I expect the same behavior on all…
Mark
  • 2,082
  • 3
  • 17
  • 30
6
votes
4 answers

Accessing dll methods in java

I am trying to accessing dll methods in java which has been written in c#. From the following code i am trying to build dll which is generated successfully. using System; using Microsoft.Win32; namespace CyberoamWinHelper { public class…
ATR
  • 2,160
  • 4
  • 22
  • 43
6
votes
3 answers

C# DLL run-time error - builds, runs, but throws unhandled exception upon trying to use DLL functions

I am trying to compile the example project shown here for C#. It had to be converted to VS2010, but that worked fine. It builds, runs, but then dies when it tries to access a DLL function. I made a series of images to show my steps. As you can see,…
Anthony
  • 1,760
  • 1
  • 23
  • 43
6
votes
2 answers

can Dllmain use FreeLibrary?

I want to create a dll that unload it self in case of some condifiton, meaning BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { if (ul_reason_for_call==DLL_PROCESS_ATTACH) if (!CheckSomething()) //check if a…
CnativeFreak
  • 712
  • 12
  • 27
6
votes
3 answers

Determining if a dll is a .valid CLR dll by reading the PE directly (64bit issue)

I am working on migrating a 32bit web application into 64bit and am having some problems with our plugin loader code. In the 32bit version, we scan the webapps bin directory for all .net dlls, then load them with Assembly.Load to check for the…
Vaevictus
  • 73
  • 4
6
votes
3 answers

Hooking into an "OnLoad" for class library

Does anyone know if there's a way to hook into an "OnLoad" event to run some operations when an assembly loads? Specifically, I am creating a plug-in for an application. The plug-in's DLL gets loaded and objects start being used, but the problem is…
Jeremy Tang
  • 153
  • 1
  • 5
1 2 3
99
100