Results 1 to 4 of 4

Thread: Dynamically Loading a C# DLL

  1. #1
    Join Date
    Mar 2008
    Posts
    672

    Dynamically Loading a C# DLL

    I want to load my dll dynamically in C#program and also want to know the what is an entrypoint, and what should i specify as an entrypoint. Can someone please help me.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: Dynamically Loading a C# DLL

    Create a seperate class library project (interop dll). .Net dlls are not really dlls.Create an interface that you'll use to reference, create a seperate class library. create a class that implements the interface defined in the interop dll create an application that will load the add in.

  3. #3
    Join Date
    Jan 2009
    Posts
    199

    Re: Dynamically Loading a C# DLL

    You'd use reflection to load the DLL at runtime.. However, unlike the Java there is an additional requirement - a ‘module manager’ class needs to be within the API. By dynamically loading a DLL you decide at runtime which DLL to use. This means you can give your program different functionality depending on which DLL's are present (freeware or shareware versions of a program).

  4. #4
    Join Date
    Dec 2008
    Posts
    177

    Re: Dynamically Loading a C# DLL

    You can PInvoke to call Win32 functions, LoadLibrary and GetProcAddress. Windows provides two ways to load DLLs into the process of an executable. When the DLL is unloaded you must make sure that you never try to call any of the functions contained in it, otherwise you'll be greeted with an access violation.

Similar Threads

  1. Dynamically Loading External JavaScript and CSS Files
    By Adrina_g in forum Software Development
    Replies: 5
    Last Post: 02-03-2010, 11:36 AM
  2. Not able to Include files dynamically in ASP
    By DANIEL 602 in forum Software Development
    Replies: 4
    Last Post: 03-02-2010, 01:32 AM
  3. How can I call VBA method dynamically?
    By opaper in forum Software Development
    Replies: 5
    Last Post: 28-01-2010, 09:25 AM
  4. Dynamically listing comboBox
    By MAGALY in forum Software Development
    Replies: 3
    Last Post: 25-11-2009, 05:41 PM
  5. How to add forms Dynamically with JavaScript
    By Neil'o in forum Software Development
    Replies: 3
    Last Post: 12-03-2009, 01:12 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,222,362.34395 seconds with 17 queries