You are viewing our Forum Archives. To view or take place in current topics click here.
Dynamic Link Librairies
Posted:

Dynamic Link LibrairiesPosted:

RDCA
  • TTG Contender
Status: Offline
Joined: Jul 12, 201013Year Member
Posts: 3,612
Reputation Power: 173
Status: Offline
Joined: Jul 12, 201013Year Member
Posts: 3,612
Reputation Power: 173
[ Register or Signin to view external links. ]


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.

    • 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
        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
        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.


    Public Module Module1

    End Module

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


    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.

     library1.module1.RDCA()


Last edited by RDCA ; edited 1 time in total

The following 3 users thanked RDCA for this useful post:

Explosivez (07-09-2012), SARG3NT (07-27-2011), Kugryshev (07-20-2011)
#2. Posted:
CLK
  • Wise One
Status: Offline
Joined: Jun 12, 201013Year Member
Posts: 531
Reputation Power: 33
Status: Offline
Joined: Jun 12, 201013Year Member
Posts: 531
Reputation Power: 33
I remember coming across this thread and remembering it got no recognition. I think that more people should read this before asking questions about DLL's, so it's stickied.
#3. Posted:
Kugryshev
  • TTG Addict
Status: Offline
Joined: Apr 13, 200915Year Member
Posts: 2,830
Reputation Power: 136
Status: Offline
Joined: Apr 13, 200915Year Member
Posts: 2,830
Reputation Power: 136
Good post, I think it will be more effective then having -CLK- assist me.

/joke -CLK- is god at coding


Last edited by Kugryshev ; edited 1 time in total
#4. Posted:
heykidz
  • Prospect
Status: Offline
Joined: Mar 19, 201113Year Member
Posts: 670
Reputation Power: 28
Status: Offline
Joined: Mar 19, 201113Year Member
Posts: 670
Reputation Power: 28
good so many people ask about them im glad this got stickied good job
#5. Posted:
CLK
  • Wise One
Status: Offline
Joined: Jun 12, 201013Year Member
Posts: 531
Reputation Power: 33
Status: Offline
Joined: Jun 12, 201013Year Member
Posts: 531
Reputation Power: 33
Kugryshev wrote Good post, I think it will be more effective then having -CLK- assist me.

/joke -CLK- is god at coding


Seeing as though I'm only 15 and still have a lot to learn... I'd say not, but thanks (felt really gay putting that wink face)

There are people that I know (who do Xbox stuff) that are far better programmers than I.
#6. Posted:
JoshUS
  • TTG Contender
Status: Offline
Joined: May 20, 201013Year Member
Posts: 3,135
Reputation Power: 136
Status: Offline
Joined: May 20, 201013Year Member
Posts: 3,135
Reputation Power: 136
-CLK- wrote I remember coming across this thread and remembering it got no recognition. I think that more people should read this before asking questions about DLL's, so it's stickied.

Congrats RDCAx, you make very helpful posts that usually deserve a lot more attention than they get, and those need to be sticked, so congrats on this sticky, and hopefully it'll get more regognition, and your future posts do to.
#7. Posted:
coolbunny1234
  • Comment King
Status: Offline
Joined: Aug 09, 200914Year Member
Posts: 6,491
Reputation Power: 8063
Motto: The Original Bunny
Motto: The Original Bunny
Status: Offline
Joined: Aug 09, 200914Year Member
Posts: 6,491
Reputation Power: 8063
Motto: The Original Bunny
This helped explain a lot, this is useful information for a project I'm currently working on. Thanks!
#8. Posted:
Huntxr
  • TTG Senior
Status: Offline
Joined: Dec 12, 201013Year Member
Posts: 1,121
Reputation Power: 52
Status: Offline
Joined: Dec 12, 201013Year Member
Posts: 1,121
Reputation Power: 52
Very useful information. Very worthy of the sticky.

Congratz on two stickys!

-Huntxr
#9. Posted:
iHasZombiesHD
  • Prospect
Status: Offline
Joined: May 22, 201112Year Member
Posts: 679
Reputation Power: 46
Status: Offline
Joined: May 22, 201112Year Member
Posts: 679
Reputation Power: 46
Explained alot lol. Thank you for realzzzz.
#10. Posted:
JackM97
  • Prospect
Status: Offline
Joined: Jan 30, 201113Year Member
Posts: 638
Reputation Power: 25
Status: Offline
Joined: Jan 30, 201113Year Member
Posts: 638
Reputation Power: 25
Nice post!
-Worth the sticky!
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.