Code Examples
  Home arrow Code Examples arrow Dynamic Link Libraries Inside-Out
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
CODE EXAMPLES

Dynamic Link Libraries Inside-Out
By: Digvijay Chauhan
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 58
    2004-09-15

    Table of Contents:
  • Dynamic Link Libraries Inside-Out
  • Advantages and Disadvantages of Using DLLs
  • What Does the DLL Contain?
  • The DLL Entry Point Function: DllMain
  • Types of DLL Linking
  • Resource Only DLLs
  • Dynamic Link Library Redirection
  • Points of Interest
  • Troubleshooting and Common Errors

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Dynamic Link Libraries Inside-Out


    (Page 1 of 9 )

    This article covers the advantages and disadvantages of Dynamic Link Libraries, how to write them, a discussion of the Entry point function, types of DLL linkage and more.


    Support Files for this article are available at the end of this article.


    Overview

    Reusing code has been an area of interest for researchers and developers equally. With each new emerging technology we get to see a new form of it in action. Let it be COM (the binary standard) or the new buzzword .NET, all are equipped to provide code reusability to today’s developer.

    In this article we’re going to talk about DLLs or the Dynamic Link Libraries. The areas that’ll be highlighted include the advantages/disadvantages, writing DLLs, a discussion of the Entry point function, types of DLL linkage and more. We’ll also discuss the common pitfalls and mistakes made by developers and common troubleshooting issues. I’ve also included a PowerPoint presentation which gives a brief overview of this article that you may find useful.

    I won’t assume that you’ve ever written or used DLLs, but I do assume that you know basic Win32 application programming using the C/SDK and understand how to use the Visual Studio IDE. It’d be a plus if you’re familiar with basic operating system concepts like processes threads and fibers because you’ll get a better understanding of the concept being explained. But be sure that at the end of this article you’ll be able to harness the power offered by DLLs in the next project you design.

    Introduction

    As the name ‘Dynamic Link Library’ implies DLLs are libraries that contain code and data that can be used across multiple applications at the same time. For example the USER32.dll or the KERNEL32.dll are the DLLs that every windows program needs in order to work on the Win32 Subsystem.

    Once written and packed in a DLL, a function can be used in any application in its binary form without actually referring to its source code. Same is the case with data (if you choose to!). But you may ask, “I can do so by just including the source files and using the function in my application.” Yes, indeed, this was the way programs were written in the DOS days, but the enhancements made to the underlying hardware when reflected by the operating system sitting at the top of it are magnified manifolds and one should be able to leverage it to reap maximum benefits. Moreover there might be situations where you don’t have the source code and you know a third-party DLL can be used. Talking of benefits, we shall just glance through the advantages and disadvantages of using DLLs.

    More Code Examples Articles
    More By Digvijay Chauhan


       · hi,Its Ravi Verma from India. This article on dll is really a master piece....
       · hi,Its Ravi Verma from India. This article on dll is really a master piece....
       · hey you indian,you have my job. stop outsourcing now
       · Where are the pictures in this article?Best RegardsHolland
       · I Jon't have a job either
       · Companies hire only talented deserving people......
       · Yes very True,That's why 'I QUIT' and don't have a job. They don't know how to...
       · the article could have been better if mapping of dll to address space have been...
       · Great article, thanks for sharing...
     

    CODE EXAMPLES ARTICLES

    - Bipartite Graphs
    - Connectivity in Graphs
    - The Ford-Fulkerson Algorithm
    - Critical Paths
    - The Bellman-Ford and Roy-Floyd Algorithms
    - Shortest Path Algorithms in Graphs
    - Minimum Spanning Tree
    - Articulation Edges and Vertexes
    - Circles and Connectivity in Graphs
    - Depth-First Search in Graphs
    - Breadth-First Search in Graphs
    - The Prufer Code and the Floyd-Warshall Algor...
    - An Insight into Graphs
    - Coding a Custom Object with WSC
    - Creating a Custom Object with WSC





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek