472,129 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Load and unload DLL's. Possible?

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 blocked.
Now I use regular EXE and pass command line but I need to pass objects, so
EXE doesn't work well anymore.

Thank you,
Ivan

Nov 13 '08 #1
1 3559
Ivan,

Generally, if you load the assembly manually, you won't be able to
unload the assembly unless you unload the entire app domain. To get around
this, you would usually spin up a new app domain and then create the object
in that domain, and then unload the domain when done.

You can use the classes in the System.AddIn namespace now to do what you
want though, as opposed to rolling this all yourself.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ivan" <iv**@mailgroups.microsoft.comwrote in message
news:3D**********************************@microsof t.com...
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 blocked.
Now I use regular EXE and pass command line but I need to pass objects, so
EXE doesn't work well anymore.

Thank you,
Ivan

Nov 13 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Patrick Blackman | last post: by
3 posts views Thread by Alex S. | last post: by
2 posts views Thread by Lauren Hines | last post: by
2 posts views Thread by Razzie | last post: by
2 posts views Thread by brianbender | last post: by
3 posts views Thread by Frank Uray | last post: by
2 posts views Thread by chandu | last post: by
reply views Thread by leo001 | last post: by

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.