Load and unload DLL's. Possible?

  • Thread starter Thread starter Ivan
  • Start date Start date
I

Ivan

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
 
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.
 
Back
Top