473,698 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3636
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.co m

"Ivan" <iv**@mailgroup s.microsoft.com wrote in message
news:3D******** *************** ***********@mic rosoft.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
14461
by: Larry Woods | last post by:
I have a "homegrown" dll that I am using in IIS (VBScript). I need to replace it on a production server, but I don't want to stop/restart server in order to replace the dll. Possible? TIA, Larry Woods
2
8489
by: Patrick Blackman | last post by:
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.
3
2668
by: Alex S. | last post by:
Hi, It's possible to load dynamically a Dll and later to unload it ? Thanks Alex
2
10846
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. When trying to delete the DLL file I get an exception that access is denied. When trying to copy over the DLL file, I get an exception that it is being used by another process.
3
3179
by: Daniel | last post by:
How do i dynamicaly load and unload a C# dll at runtime
2
5333
by: Razzie | last post by:
Hey all, I'm working on this project where I'm dynamically loading an assembly. Basically what I want is that I can just replace my old dll file with a new one without having to do anything else. So to test this, I did the following: I temporarily tested it by saving my dll file in C:\, so let's say I have C:\dynamic.dll. I have created a winforms application with a simple button that calls the method with Assembly.Load, which you can...
2
6871
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 without interfaces if need be. But try as I may they will ot unload. I have been working on this problem for weeks. I have seen other apps using Remoting but I know there has got to be a way to create a child AppDomain and reference obkect via...
3
22142
by: Frank Uray | last post by:
Hi all I have a problem with loading a assembly ... I am trying to do the following: - I have a directory with a dll (assembly) in it (not the currect dir.) - I am trying to load this assembly, run a method in it, and than close it. The question would be: How is the right way to do it ????
2
1959
by: chandu | last post by:
I want to load an assembly dinamically into another application with a button click. how to load and execute that dinamic assebly.. i tried like this copied that target assebly in bin folder and like........ AppDomain newdomain = AppDomain.CreateDomain("RMS"); newdomain.ExecuteAssembly("dllsample.dll");
0
8672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9021
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3038
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2323
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.