G
Guest
Hello,
I would like to know how exactly works loading/unloading of libraries in
..NET (1.1). I have an assembly X which references assembly Y. If no type from
Y is used and no method to Y is called, is Y loaded ? May a dll be ever
unloaded ? And how it works if managed code uses unmaneged libraries ?
The background of my question is that we are currently solving crashing of
our application written in .NET which uses DB2 Data managed provider from
HIS2004. We have DataAccess layer which is able to use SQL Server or/and DB2.
The functionality for DB2 is never used in the application, so DB2 Data
provider assembly and I expect no one of its dependant native modules from
HIS should be loaded. But using Debugging Tools for Windows and ADPlus script
shows that those DLLs are unloaded. Later then, in logging library is used
call System.Diagnostic.Process.GetCurrentProcess().ProcessName to get process
name used in log entry. This call causes handling of some performance
counters probably in the unloaded DLLs. This is what we got from memory dump.
There is no mention about Performance counters logic in porperty ProcessName
in MSDN. However, with this knowledge I found the dependency on Performance
counters by Google. But still I'd like to know the library handling in .NET.
Thanks,
eXavier
I would like to know how exactly works loading/unloading of libraries in
..NET (1.1). I have an assembly X which references assembly Y. If no type from
Y is used and no method to Y is called, is Y loaded ? May a dll be ever
unloaded ? And how it works if managed code uses unmaneged libraries ?
The background of my question is that we are currently solving crashing of
our application written in .NET which uses DB2 Data managed provider from
HIS2004. We have DataAccess layer which is able to use SQL Server or/and DB2.
The functionality for DB2 is never used in the application, so DB2 Data
provider assembly and I expect no one of its dependant native modules from
HIS should be loaded. But using Debugging Tools for Windows and ADPlus script
shows that those DLLs are unloaded. Later then, in logging library is used
call System.Diagnostic.Process.GetCurrentProcess().ProcessName to get process
name used in log entry. This call causes handling of some performance
counters probably in the unloaded DLLs. This is what we got from memory dump.
There is no mention about Performance counters logic in porperty ProcessName
in MSDN. However, with this knowledge I found the dependency on Performance
counters by Google. But still I'd like to know the library handling in .NET.
Thanks,
eXavier