472,811 Members | 1,308 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,811 software developers and data experts.

Load / Unload Dll as runtime?

I have a program that search the application path for all the Dll that
implement a certain interface IText ,when a Dll with the interface is found
,I run a method called
IText.Format() which works very beautifully but then I would like to unload
the Dll after running the ITextFormat procedure. Any ideas about doing this?
I was told that it had something to do with creating a new AppDomain ...

Any help would be appreciated.
Nov 15 '05 #1
2 8397
Hi,

You may create the new AppDomain, load single assembly into it, check for
interface, run the IText.Format() and so on. After that, you may unload the
AppDomain and go to the next assembly.
The assembly can be unloaded only with the parent AppDomain. You couldn't
unload single assembly from the AppDomain.
--
Andrew Gnenny
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Patrick Blackman" <ca*******@videotron.ca> wrote in message
news:e$**************@TK2MSFTNGP10.phx.gbl...
I have a program that search the application path for all the Dll that
implement a certain interface IText ,when a Dll with the interface is found ,I run a method called
IText.Format() which works very beautifully but then I would like to unload the Dll after running the ITextFormat procedure. Any ideas about doing this? I was told that it had something to do with creating a new AppDomain ...

Any help would be appreciated.

Nov 15 '05 #2
A small example would be helpful, thanks
"Andrew Gnenny" <pulsar2003@/no-spam/email.ru> wrote in message
news:3f********@nexus.validio.com.ua...
Hi,

You may create the new AppDomain, load single assembly into it, check for
interface, run the IText.Format() and so on. After that, you may unload the AppDomain and go to the next assembly.
The assembly can be unloaded only with the parent AppDomain. You couldn't
unload single assembly from the AppDomain.
--
Andrew Gnenny
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Patrick Blackman" <ca*******@videotron.ca> wrote in message
news:e$**************@TK2MSFTNGP10.phx.gbl...
I have a program that search the application path for all the Dll that
implement a certain interface IText ,when a Dll with the interface is

found
,I run a method called
IText.Format() which works very beautifully but then I would like to

unload
the Dll after running the ITextFormat procedure. Any ideas about doing

this?
I was told that it had something to do with creating a new AppDomain ...

Any help would be appreciated.


Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: DB2 Novice | last post by:
Hi, What are the utils provided by IBM to fast load and unload DB2 in Unix and Windows env. I read about High Performance Unload and this is just Unload, waht about Load? What is the best way...
2
by: Lauren Hines | last post by:
Hello, I have read numerous post stating that the only way to unload an assembly (DLL in my case) is to create a separate AppDomain, load the assembly, then unload it by calling AppDomain.Unload....
3
by: Daniel | last post by:
How do i dynamicaly load and unload a C# dll at runtime
2
by: brianbender | last post by:
I am trying to load and unload assemblies dynamically and call methods and properties when loaded into an Appdomain I can load assemblies all day in the current AppDomain without references and...
2
by: Chris Dunaway | last post by:
I am using reflection to load an assembly dynamically at runtime. If there are classes in the assembly that implement a particular interface, I put an entry in a list for later use. My...
7
by: tojigneshshah | last post by:
Hi, I am loading data from ascii delimiter file and some of the rows are getting rejected while loading. 1.0|11487.0|FQ|105061.0|332735.0|01|X.NNIE HATFIELD|1992-06-25 00:00:00|1992-...
2
by: Artem | last post by:
When I use the method Thread.Abort, it only sends a request of aborting to OS to stop a thread. The thread itself isn't killed and allocated resources aren't released. I tried to run that thread...
6
by: Ronald S. Cook | last post by:
We have a Windows app that has one main form (a shell, sort of). We then load user controls into a panel on the form depending on what the user has selected. Our current code to unload the...
1
by: Ivan | last post by:
Hello, What I want to do is to create DLL that I can load and use and then unload when needed. What I mean by this is: After object released - dll file can be removed, etc. So, file won't be...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.