Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Sharing Not using DLL

If I wanted to use a module or function in another program without importing a dll how would I do this? Is it possible?
jb
[134 byte] By [jcb1269] at [2007-11-11 10:16:49]
# 1 Re: Sharing Not using DLL
Add the module to the project (Project...Add Existing Item).
pclement at 2007-11-11 20:48:18 >
# 2 Re: Sharing Not using DLL
Well Paul, I really didn't think it was that easy. I new this.. I'm going back to sleep. Thank you for the help!

jb :(
jcb1269 at 2007-11-11 20:49:18 >
# 3 Re: Sharing Not using DLL
One more question all,

If I only need 1 method out of the other application but I still have to bring in the whole module or class, How do I use the one I need without useing or compiling the other code in there. Is this possible?

I just loaded the module I need and short of adding everthing in that project I lots of errors from other code. How do I avoid this? Can I avoid this?

Thanks.

jb
jcb1269 at 2007-11-11 20:50:19 >
# 4 Re: Sharing Not using DLL
You can't selectively compile a single method or function in the module. If your module has dependencies then you need to include them in any project which references the module.

In a ideal world the class should encapsulate all its dependencies if it is to be shared amongst other applications.
pclement at 2007-11-11 20:51:18 >
# 5 Re: Sharing Not using DLL
I was hoping I wouldn't have to do that. Oh well. I added all dependencies to the project and all is good.

Thanks again..

jb :)
jcb1269 at 2007-11-11 20:52:24 >
# 6 Re: Sharing Not using DLL
One more question all,

If I only need 1 method out of the other application but I still have to bring in the whole module or class, How do I use the one I need without useing or compiling the other code in there. Is this possible?

I just loaded the module I need and short of adding everthing in that project I lots of errors from other code. How do I avoid this? Can I avoid this?

Thanks.

jb

Well, you can always copy the method out of the other module and paste it into a new/exiting one in your project :D
joewmaki at 2007-11-11 20:53:23 >