By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,190 Members | 1,412 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,190 IT Pros & Developers. It's quick & easy.

Load and unload DLL's. Possible?

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.