PC Review


Reply
Thread Tools Rate Thread

DLL's and EXE's

 
 
=?Utf-8?B?SGVybsOhbiBHYXR0YQ==?=
Guest
Posts: n/a
 
      17th Aug 2005
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!
 
Reply With Quote
 
 
 
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      17th Aug 2005
<"=?Utf-8?B?SGVybsOhbiBHYXR0YQ==?=" <Hernán
(E-Mail Removed)>> 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.

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
=?Utf-8?B?SGVybsOhbiBHYXR0YQ==?=
Guest
Posts: n/a
 
      17th Aug 2005
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!
 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      17th Aug 2005
Hern?n Gatta <(E-Mail Removed)> 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.

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
=?Utf-8?B?SGVybsOhbiBHYXR0YQ==?=
Guest
Posts: n/a
 
      17th Aug 2005
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
 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      17th Aug 2005
Hern?n Gatta <(E-Mail Removed)> 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.

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
=?Utf-8?B?SGVybsOhbiBHYXR0YQ==?=
Guest
Posts: n/a
 
      18th Aug 2005
I didn't think about that.

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

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:41 PM.