DLL's and EXE's

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
<"=?Utf-8?B?SGVybsOhbiBHYXR0YQ==?=" <Hernán
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.
 
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!
 
Hern?n Gatta said:
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.
 
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 Gatta said:
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.
 
Back
Top