473,388 Members | 1,385 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

How to display a message from a .NET dll when it is loaded into a program written by another developer.

When a library user runs their exe I want the dll to display a message. How
can this be done?
Thanks in advance.
Nov 16 '05 #1
2 1137
David,

What you need is two assemblies. The first is one that you know will
always be loaded. This will cycle through the app domains in a process, and
hook up to the AssemblyLoad event.

Then, when you handle the event, you need to identify your assembly
somehow (a custom attribute would be perfect here). If it is indeed your
assembly, then you would show the message.

You should make sure that you are not running in a server environment
though, as this kind of message being thrown up by a library would really
put a crimp on things (no interactive session is enabled, and it would just
hang really).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"David T." <Da***********@AdsorptionProcessModeling.com> wrote in message
news:XJKtd.309$vC.182@lakeread06...
When a library user runs their exe I want the dll to display a message.
How can this be done?
Thanks in advance.

Nov 16 '05 #2
Thank you.

I think what I really need is access to a pre-wired event that is raised
while a component is loading. I want to execute code before any code is
executed. This can be done with COM can probably also be done from .NET.

Is there an equivalent to the OnLoad event
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@TK2MSFTNGP12.phx.gbl...
David,

What you need is two assemblies. The first is one that you know will
always be loaded. This will cycle through the app domains in a process,
and hook up to the AssemblyLoad event.

Then, when you handle the event, you need to identify your assembly
somehow (a custom attribute would be perfect here). If it is indeed your
assembly, then you would show the message.

You should make sure that you are not running in a server environment
though, as this kind of message being thrown up by a library would really
put a crimp on things (no interactive session is enabled, and it would
just hang really).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"David T." <Da***********@AdsorptionProcessModeling.com> wrote in message
news:XJKtd.309$vC.182@lakeread06...
When a library user runs their exe I want the dll to display a message.
How can this be done?
Thanks in advance.


Nov 16 '05 #3

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

Similar topics

2
by: Stephen Harris | last post by:
I downloaded: Windows Binaries PHP 5.0.4 zip package - 31 Mar 2005 md5: fff10991a8e6f3b36ee567eb236ae3f4 This is the current BETA release of version 5.0 of the MySQL database server....
0
by: daviddabwang | last post by:
Everything is OK, ie. Database connectivity, binding with dataset. When test it with IE, no thing display. Debug output: '/LM/w3svc/1/root/WebDBApplication-8-127559199566471760': Loaded...
7
by: Oleg | last post by:
I have a web form let's say 'YYZ.aspx'. It has an iframe in it. When it loads it shows progress bar in IE this way: loading for page then again loading for page in iframe. This part is fine....
7
by: Ralf Gedrat | last post by:
Hello! I have some Vb.Net applications, which are terminated at indefinite times without message. If I call in the program regulated system.GC.Collect, then the program is terminated here...
3
by: Samuel R. Neff | last post by:
I just started having a problem with the Add Reference dialog not displaying in VS.NET 2003. Whenever I click Add Reference the dialog doesn't display. I've tried several different projects and...
6
by: Ken Fine | last post by:
I'm using SQLDataSource, which generates some kind of dataset, and then I attach that datasource to various data display controls such as DataList and repeater which loop through to the end of the...
9
by: tshad | last post by:
This was posted before but the message got messed up (all NLs were stripped out for some reason). I have 2 labels that hold the name of different images on my .aspx page. <asp:Label ID="Logo"...
4
by: Nicolas R | last post by:
Hi all, Im trying to figure out how to display a 'loading' message when scripts are being executed, ie when the page is still not ready for interaction. This is for a web app which relies on...
3
by: Mufasa | last post by:
I need to write a windows program in C# that will display a word document on the screen without having Word loaded on the machine. How can I do this? TIA - J.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
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
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 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.