Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic Link Libraries
#1
[Image: TutheaderDLL.png]

What is a DLL?
  • A .DLL is an extension of a type of windows file. These files posses many abilities and are used in all modern windows Operating Systems, in fact thousands of them in most. They are used to ofter for a variety of reasons, see more below, but there is also disadvantages. So besides computers what else uses DLL(s) you may ask. Well most applications use Dlls now. Some of you may think your tiny ".net" app doesn't, but ever hear of something called a .net dependency; see below for more. Now on to the advantages of .DLL files.

Advantages
Well here is a list of advantages of the .DLL file.
  • Hidden Code
    • With DLLs you can sell your Dll. It stores all the source code in the file, so no people can see it. So next time you plan on selling your source code, just make it a DLL to prevent leaking of your source.
  • Modularized codes
    • DLLs are composed of many sub routines, each of these are within a Module most times. So This is very effective as to memory and resources. Since not all the code is loaded in the event, it is only called when needed. Also the fact that it is modularized means a vast variety of things can happen, such as languages support. Here is also a small excerpt which describes it a bit better them me in case you didn't understand.

    • Quote:A DLL helps promote developing modular programs. This helps you develop large programs that require multiple language versions or a program that requires modular architecture. An example of a modular program is an accounting program that has many modules that can be dynamically loaded at run time.

  • Fewer resources
    • DLL files are amazing as to the resource aspect of a computer. This is because multiple programs and processes can all use the same DLL, which means less memory is loaded into the disc and physical memory. Not only apps use the same DLLs but so do windows processes, so your app and multiple windows processes can be dependent on the same DLL.

  • Updating
    • Well as for updating it is super easy because the DLL does not need to be relinked to the programs, just simply updated and it will affect the app with the changes. Also this is even more beneficial as it effects all the programs & processes that use that DLL.

Problems & Dependencies
  • What is a dependency? A dependency is a bond created when a program requires a DLL to work. So there are some things that can break this, bond which will render the program useless or without features. It may also cause errors and an un-bootable machine if the DLLs are required for boot up or a important windows process. Here is a list of things that may cause problems with a dependency to a DLL.
    • A dependent DLL is upgraded to a new version.
    • A dependent DLL is fixed.
    • A dependent DLL is overwritten with an earlier version.
    • A dependent DLL is removed from the computer.
    • A dependent DLL becoming corrupt.
    I know some of you may be worried now, but there was certain things put into place to stop these problems.
    • Windows File Protection
      • Excerpt from page
        Quote:In Windows File Protection, the operating system prevents system DLLs from being updated or deleted by an unauthorized agent. Therefore, when a program installation tries to remove or update a DLL that is defined as a system DLL, Windows File Protection will look for a valid digital signature.
    • Private DLLs
      • Excerpt from page
        Quote:Private DLLs let you isolate a program from changes that are made to shared DLLs. Private DLLs use version-specific information or an empty .local file to enforce the version of the DLL that is used by the program. To use private DLLs, locate your DLLs in the program root folder. Then, for new programs, add version-specific information to the DLL. For old programs, use an empty .local file. Each method tells the operating system to use the private DLLs that are located in the program root folder.

Relation to Visual Studio
  • The infamous .net dependency
    • One of the most famous dependencies on this forum is the .net. The dependency in which is created by programs in Visual Studio. This dependency requires a Framework(A set of DLLs). The current .net framework is 4.0. Without this framework you cannot run any programs developed in visual studio 2010. If you have framework 3 then you can only run programs that require the programs that have been made for the framework 3 and below. So if a "rat" server is made in the latest framework then it cannot infect anyone without them having a .net framework of the current version. This is the reason programs made in native c++ and c are so wanted. As they usually do not have any dependencies.
  • Here is a short list of programs that have dependencies.
    • Java
    • Perl
    • .net [vb.net/c#/visual c++/f#/ect..]
    There are more but some that do not not have a dependency are c++/c/asm/delphi.

How to start a DLL in vb.net
  • Start your version of Visual Studio.
  • In the Start Page tab please choose the option New project.
  • In the newly opened window by default you should be in Visual Basic -> Windows -> Windows form application, if not please navigate there.
  • Now change Windows form application to Class Library. Change the name to anything you want, and press Ok.
  • Now to be able to start adding code, you can use the class as a class, but if you want sub routines, then right click on Your projects name in the solution explorer, hover over Add, then choose Module. Name it as you want.
  • In front of your modules name put Public. Like this.

    Code:
    Public Module Module1

    End Module
  • This makes it so other things can access it, now in the Module code add a sub like so.

    Code:
    Public Module Module1
    public sub RDCA()

    end sub
    End Module
  • Now you have what I call the DLL base, put any code in here and you can call it pretty easy by, adding the DLL as a reference, then in an even handler, like button1 Click, you just put.

    Code:
    library1.module1.RDCA()



Also side note to staff:
Some of you may feel like this doesn't belong in this section, but if you actually read it you can see it revolves around programming, but if you still think it should be moved, go ahead and so so.
Reply


Messages In This Thread
Dynamic Link Libraries - by RDCA - 10-12-2011, 05:41 PM
RE: Dynamic Link Libraries - by alabama - 10-13-2011, 06:21 PM
RE: Dynamic Link Libraries - by RDCA - 10-13-2011, 06:38 PM
RE: Dynamic Link Libraries - by alabama - 10-15-2011, 11:27 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] AllDebrid Link Unrestrainer / Link Generator euverve 3 2,675 10-08-2012, 12:56 AM
Last Post: palking

Forum Jump:


Users browsing this thread: 4 Guest(s)