|
| |||||||||
| Tags: code, cprogram, dll, entrypoint, program |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| 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
| ||||
| ||||
| 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
| |||
| |||
| 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
| |||
| |||
| 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. |
![]() |
|
| Thread Tools | Search this Thread |
| |
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 |