Hi,
Is there anyway I can determine when exactly a module file I have (part of a
bigger assembly) gets loaded into memory?
The AssemblyLoad event tells me when exactly an assembly gets loaded, but
not a module.
Basically, I want to confirm that a module will NOT get loaded into memory
UNTIL a type defined in that module is referenced. That's what I have read,
but, I am finding it difficult to confirm.
Any feedback will be appreciated.
Thanks
Praveen 6 2297
A module, behind the scenes is nothing but a Class with only static members.
So if your experiment succeeds with a Class with static members you can rest
assured that the result holds good for a module.
Thanks for the feedback.
The static const. gets called only when the Type gets referenced explicitly,
but the file (.netmodule file) itself gets locked (cannot delete it) at
around app start.
What I also observed was that I could run the app without the above
..netmodule, until a type in that module gets referenced.
So, it does seem like the module gets loaded only as necessary, but I am
wondering why the file gets "locked" ahead of time!
-Praveen
"Nice Chap" <Ni******@PlasmaDyne.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... A module, behind the scenes is nothing but a Class with only static
members. So if your experiment succeeds with a Class with static members you can
rest assured that the result holds good for a module.
I am not able to get what exactly you are after. Source files are locked by
Visual Studio not by CLR. Once compiled your module will be incorporated
into the assembly and there would be no question of locking the mod file.
"Praveen Ramesh" <rp******@syncfusion.com> wrote in message
news:eY**************@TK2MSFTNGP09.phx.gbl... Thanks for the feedback.
The static const. gets called only when the Type gets referenced
explicitly, but the file (.netmodule file) itself gets locked (cannot delete it) at around app start.
What I also observed was that I could run the app without the above .netmodule, until a type in that module gets referenced.
So, it does seem like the module gets loaded only as necessary, but I am wondering why the file gets "locked" ahead of time!
-Praveen
"Nice Chap" <Ni******@PlasmaDyne.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... A module, behind the scenes is nothing but a Class with only static members. So if your experiment succeeds with a Class with static members you can rest assured that the result holds good for a module.
I am not able to get what exactly you are after. Source files are locked by
Visual Studio not by CLR. Once compiled your module will be incorporated
into the assembly and there would be no question of locking the mod file.
"Praveen Ramesh" <rp******@syncfusion.com> wrote in message
news:eY**************@TK2MSFTNGP09.phx.gbl... Thanks for the feedback.
The static const. gets called only when the Type gets referenced
explicitly, but the file (.netmodule file) itself gets locked (cannot delete it) at around app start.
What I also observed was that I could run the app without the above .netmodule, until a type in that module gets referenced.
So, it does seem like the module gets loaded only as necessary, but I am wondering why the file gets "locked" ahead of time!
-Praveen
"Nice Chap" <Ni******@PlasmaDyne.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... A module, behind the scenes is nothing but a Class with only static members. So if your experiment succeeds with a Class with static members you can rest assured that the result holds good for a module.
Yes, that sounds wierd doesn't it? But that's what I see.
There is no VS.Net in the picture here.
Let's say I have modulex with just TypeX, then when I run my app, before
TypeX's static const. gets hit my moudlex file gets locked. By locked, I
mean that I cannot delete that file. Running FileMon util., I see that my
Client app has a reference to that module file and so I cannot delete it.
I am inclined to believe though that the module file has not been loaded
into memory but just been "locked". That is how I would like to behave. But
I am not sure.
Thanks for the feedback.
-Praveen
"Nice Chap" <Ni******@PlasmaDyne.com> wrote in message
news:uf**************@TK2MSFTNGP09.phx.gbl... I am not able to get what exactly you are after. Source files are locked
by Visual Studio not by CLR. Once compiled your module will be incorporated into the assembly and there would be no question of locking the mod file.
"Praveen Ramesh" <rp******@syncfusion.com> wrote in message news:eY**************@TK2MSFTNGP09.phx.gbl... Thanks for the feedback.
The static const. gets called only when the Type gets referenced explicitly, but the file (.netmodule file) itself gets locked (cannot delete it) at around app start.
What I also observed was that I could run the app without the above .netmodule, until a type in that module gets referenced.
So, it does seem like the module gets loaded only as necessary, but I am wondering why the file gets "locked" ahead of time!
-Praveen
"Nice Chap" <Ni******@PlasmaDyne.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... A module, behind the scenes is nothing but a Class with only static members. So if your experiment succeeds with a Class with static members you
can rest assured that the result holds good for a module.
Yes, that sounds wierd doesn't it? But that's what I see.
There is no VS.Net in the picture here.
Let's say I have modulex with just TypeX, then when I run my app, before
TypeX's static const. gets hit my moudlex file gets locked. By locked, I
mean that I cannot delete that file. Running FileMon util., I see that my
Client app has a reference to that module file and so I cannot delete it.
I am inclined to believe though that the module file has not been loaded
into memory but just been "locked". That is how I would like to behave. But
I am not sure.
Thanks for the feedback.
-Praveen
"Nice Chap" <Ni******@PlasmaDyne.com> wrote in message
news:uf**************@TK2MSFTNGP09.phx.gbl... I am not able to get what exactly you are after. Source files are locked
by Visual Studio not by CLR. Once compiled your module will be incorporated into the assembly and there would be no question of locking the mod file.
"Praveen Ramesh" <rp******@syncfusion.com> wrote in message news:eY**************@TK2MSFTNGP09.phx.gbl... Thanks for the feedback.
The static const. gets called only when the Type gets referenced explicitly, but the file (.netmodule file) itself gets locked (cannot delete it) at around app start.
What I also observed was that I could run the app without the above .netmodule, until a type in that module gets referenced.
So, it does seem like the module gets loaded only as necessary, but I am wondering why the file gets "locked" ahead of time!
-Praveen
"Nice Chap" <Ni******@PlasmaDyne.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... A module, behind the scenes is nothing but a Class with only static members. So if your experiment succeeds with a Class with static members you
can rest assured that the result holds good for a module.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tim Werth |
last post by:
I am trying to use reflection to add an event handler for the RowUpdated
event of the OracleDataAdapter object (ODP.NET), but the same thing can be
said for SqlDataAdapter if you only use...
|
by: Amit D.Shinde |
last post by:
I am adding a new picturebox control at runtime on the form
How can i create click event handler for this control
Amit Shinde
|
by: Adil Akram |
last post by:
I want to cancel an event from its event procedure on some condition, I know
how to do this in VB6 i.e. by setting cancel=true. Please tell me how can I
do this in VB.net I don't know how to use...
|
by: Praveen Ramesh |
last post by:
Hi,
Is there anyway I can determine when exactly a module file I have (part of a
bigger assembly) gets loaded into memory?
The AssemblyLoad event tells me when exactly an assembly gets loaded,...
|
by: Artur |
last post by:
After trying to solve this, I noticed another strange thing. When in
secure connection Page_Load method of page is not invoked (Load event
not fired). I looked where this method is assigned to this...
| |
by: peter shaw |
last post by:
Hi,
I got an error message after I created a new event procedure for a grid
control. But I can write a new procedure without any problem.
The error is...
|
by: patjones |
last post by:
Hi everyone:
I have a form in my database called "frmChecks". In the properties for this form, I set On Load to , which points to some code in VB that maximizes the form window and sets a...
|
by: AMD_GAMER |
last post by:
Hi,
I am trying to print address labels. I have a form which asks for
the user to input the first name, middle initial, and last name. On
the button click to print the label, I have an event...
|
by: Lila Godel |
last post by:
My VB.NET 2008 application is setup with a Sub Main and no forms. At run
time a NotifyIcon is created with one context menu choice (Close which
terminates app).
I have no trouble running the...
|
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,...
|
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,...
| |
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...
|
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...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
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...
|
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 ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |