473,473 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

mixed assembly, unmanaged process, FreeLibrary (.NET 2.0)

DPR
Hi,

I've recognized that a mixed assembly with unmanaged exports and an
unmanaged "DllMain" can't be unloaded from a (unmanaged) process, even
if it's no longer needed and the (unmanaged) process calls the
"FreeLibrary" function.
I couldn't find any documentation for this special restriction ! So
isn't there any possibility to unload a mixed assembly manually from a
unmanaged process once it has been loaded without killing that process ?

I've tried to unload the whole CLR from the process in order to get the
assembly unloaded - but it seems that the CLR can't (???) be unloaded
from a running process once it has been loaded.

The MSDN documentation is very inconsistent as to this CLR behavior:

"CoUninitializeCor is obsolete. The common language runtime cannot be
unloaded from a process. To completely remove the runtime from a running
process, you must shut down that process."

ICLRRuntimeHost::Stop
"Do not call this method. The host cannot unload the runtime from a
process."

On the other hand:

ICorRuntimeHost::Stop
"Unloads the common language runtime from the current process."
[...]
"It is typically unnecessary to call this method, as the common language
runtime is automatically unloaded when the process exits.
Note:
After a call to Stop, the common language runtime cannot be
re-initialized into the same process."
Thanks for any help in advance !

--

DPR
Feb 6 '06 #1
0 1350

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

Similar topics

8
by: Ted Miller | last post by:
Hi folks, I'm looking at moving a large base of C++ code to .Net under tight time constraints. The code runs in mission-critical environments, and I am extremely concerned about the loader lock...
9
by: Edward Diener | last post by:
I received no answers about this the first time I posted, so I will try again. My inability to decipher an MSDN topic may find others who have the same inability and someone who can decipher and...
0
by: Frank Lopez | last post by:
My program structure is: 1. 2. 3. => manually does the crt-init and crt-terminate calls 4. -- this is accessed by the unmanaged C++ classes in (3) using LoadLibrary and FreeLibrary
8
by: Nadav | last post by:
Hi, I am writing a performence critical application, this require me to stick to unmanaged C++ as performance is much better using unmanaged C++ ( about 33% better ), Still, I am trying to avoid...
1
by: rudi | last post by:
Hi everybody, I have a problem with a mixed mode application. It consists of an unmanaged C++ dll, a "mixed mode" dll and various VB.NET dlls using the mixed mode dll to talk to the unmanaged...
10
by: ajtaylor | last post by:
Hello, I have a load of native C++ code that I want to use in a CLR class library. My "logic" being that I create a C++/CLI managed class that acts as an interface to the unmanged code. I...
0
by: MC-Advantica | last post by:
I have built a managed wrapper class and assembly that expose much functionality available in unmanaged legacy DLLs. I can write VB apps that interface with the managed assembly, and the managed...
0
by: MC-Advantica | last post by:
I have built a managed wrapper class and assembly that expose much functionality available in unmanaged legacy DLLs. I can write VB apps that interface with the managed assembly, and the managed...
1
by: =?Utf-8?B?SmltIFdhbHNo?= | last post by:
I have an VC++ MFC Win32 application that isn't working correctly when I build it with VS2005. The problem seems to be in some ADO ActiveX controls that came with VS6 and are now out of support....
0
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,...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.