Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do you scope information from one assembly to another?

I have a generic host dialog DLL and I use that to create applications in the form of user controls. The host dialog DLL however is the default system menu and has no scope of the assembly who's information I want to pass in.

For example:

Host dialog is a WinForm DLL. It has the client area as well as the non-client area for window controls (minimize close, system menu).

Apps are created using user controls that are addded to projects and each one has the host dialog in common.

I would like to have a generic About selection added to the system menu but display fields from the assembly of the project and not the host dialog DLL.

Hope that was clear

Thanks
Posted

1 solution

I guess what you are looking for is this aricle. Checked the source code out and explains it nice.

Get an Executable Assembly Name[^]

Good luck!

Ps. the example only shows that the dll can show you the exe name. If you dive in to this you can get more info of course.
 
Share this answer
 
v2
Comments
alleyes 28-Jul-10 13:40pm    
Assembly.GetEntryAssembly() was the clincher!!
Thanks for pointing out that sample

I was using Assembly.GetExecutingAssembly() and it always returned the wrong one.
alleyes 28-Jul-10 13:41pm    
Reason for my vote of 5
In context to the issue discussed

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900