Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / August 2005

Tip: Looking for answers? Try searching our database.

DLL's and EXE's

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hernán Gatta - 17 Aug 2005 04:26 GMT
Hello:

I'm trying to start to implement DLL's in my Windows Application solutions,
but I'm having a liitle problem.

Can I access members of executables projects from DLL projects?

Thanks!
Jon Skeet [C# MVP] - 17 Aug 2005 07:16 GMT
<"=?Utf-8?B?SGVybsOhbiBHYXR0YQ==?=" <Hernán
Gatta@discussions.microsoft.com>> wrote:
> I'm trying to start to implement DLL's in my Windows Application solutions,
> but I'm having a liitle problem.
>
> Can I access members of executables projects from DLL projects?

Unfortunately not - you can't add references to executables in VS.NET
(even though .NET itself supports it). I'd suggest putting almost all
your classes in class libraries, and just a thin wrapper executable to
launch things appropriately.

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Hernán Gatta - 17 Aug 2005 18:47 GMT
Yes, is true. I have been already thinking about that, but moving all my code
from the executable and putting it into a DLL's will be a bit hard, that's
why I asked before. I wanted to be sure that what I want cannot be done.

Now, I have a little doubt about what you said: If .NET itself supports
accessing EXE members from DLL's, isn't there any way of doing this by code?

Thank you!
Jon Skeet [C# MVP] - 17 Aug 2005 19:04 GMT
Hern?n Gatta <HernnGatta@discussions.microsoft.com> wrote:
> Yes, is true. I have been already thinking about that, but moving all my code
> from the executable and putting it into a DLL's will be a bit hard, that's
> why I asked before. I wanted to be sure that what I want cannot be done.
>
> Now, I have a little doubt about what you said: If .NET itself supports
> accessing EXE members from DLL's, isn't there any way of doing this by code?

You wouldn't need any code - the only problem is that VS.NET just won't
add the reference for you. If you're happy to do all your building
using NAnt or the command line, you'd probably be okay - but it's
really not a good idea in general for DLLs to link to EXEs rather than
the other way round.

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Hernán Gatta - 17 Aug 2005 19:19 GMT
OK. Thank you very much for your answers!
So now, I'll try to migrate all my EXE code to DLL's and see if all goes
right.

In addittion, I'm sure that I'll have a few more questions during the
process, so, if you agree, I'll add your E-Mail address to my Contacts List
for further questions.

Once again, thank you very much for your co-operation with my project!

Best regards!
-------------------
Hernán A. Gatta
Jon Skeet [C# MVP] - 17 Aug 2005 21:20 GMT
Hern?n Gatta <HernnGatta@discussions.microsoft.com> wrote:
> OK. Thank you very much for your answers!
> So now, I'll try to migrate all my EXE code to DLL's and see if all goes
> right.

Goodo.

> In addittion, I'm sure that I'll have a few more questions during the
> process, so, if you agree, I'll add your E-Mail address to my Contacts List
> for further questions.

I think it would be better to ask questions here - that way everyone
can benefit, and other people can weigh in with their answers too.

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Hernán Gatta - 18 Aug 2005 02:52 GMT
I didn't think about that.

No problem and thank you again!
-------------------
Hernán A. Gatta

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.