Jump to content

What Exactly Does A .dll File Do?


 Share

Recommended Posts

What exactly does a .DLL file do? I really don't know...

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Link to comment
Share on other sites

DLL: Dynamic-Link Library.

  • A Shared library, usually have the file extention dll, sometimes ocx or drv.
  • Same format as EXEs. Can contain code, data, resources, etc.
  • Was created to save disk space and memory required for applications. Any code which many applications share could be separated into a DLL which only exists as a single disk file and a single instance in memory.
  • Permitted modularity. (Allows changes to code an data in a self-contained DLL without needing to change the applications using the DLL)
  • Usage as plug-ins. An interface can be created to allow new modules/plugins to be used at run-time. (Take AutoIt's plugin support and DLLCall as an example)
  • 1 Drawback: DLL hell (that's what I call it, anyway). Multipule applications arguing about the version of a DLL to use.
    • Solution 1: place the different DLLs into the individual application folders, rather than a system-wide folder.
    • Solution 2: .NET
  • An other usage of dlls are as resource DLLs, examples: icon libraries-extension ICL, and font files-extensions FON/FOT.
#)

EDIT: example of DLL code in C++:

#include <windows.h>

// DLL initialization
BOOL APIENTRY
DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved)
{
        return TRUE;
}

// Sample exported function
 __declspec(dllexport) int Add(int a, int b)
{
        return a + b;
}
Sample AutoIt calling code:
$answer = DllCall ( "sample.dll", "int", "Add", "int", 2 , "int", 8 )
MsgBox(0, "", $answer[0])

#)

Edited by nfwu
Link to comment
Share on other sites

  • Moderators

what happends if u distrubute a program and the person doesn't have that dll, does everyone have a psapi.dll or user32.dll? or does autoit swallow the dll when converting to exe? :think:

If your unsure whether the end users computer will have the desired files needed to run your program, then it's a simple case of using FileInstall().

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

No autoit does not do that. And oh the c++ example did not work. When i added 12 to 12 it came up with 0

:think::(:);):D

the msgbox should have $answer[0] as dllcall returns an array. Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...