Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , ,

Sponsored Links



Dynamically Loading a C# DLL

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 23-11-2009
Allan.d's Avatar
Member
 
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.
Reply With Quote
  #2  
Old 23-11-2009
Zecho's Avatar
Member
 
Join Date: May 2008
Posts: 2,267
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.
Reply With Quote
  #3  
Old 23-11-2009
Member
 
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).
Reply With Quote
  #4  
Old 23-11-2009
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Dynamically Loading a C# DLL"
Thread Thread Starter Forum Replies Last Post
Dynamically Loading External JavaScript and CSS Files Adrina_g Software Development 5 02-03-2010 11:36 AM
How to calculate value dynamically in JavaScript? KAIRU26 Software Development 5 24-02-2010 11:01 PM
Calling Events Dynamically In VB.net ramsun Software Development 5 03-02-2010 08:14 PM
Not able to Include files dynamically in ASP DANIEL 602 Software Development 4 03-02-2010 01:32 AM
Casting a table dynamically Logan 2 Software Development 5 16-01-2010 11:55 AM


All times are GMT +5.5. The time now is 04:04 AM.