G
Guest
Hi,
I'm working on a piece of software that is now growing into a suite of
software products. When I started the work, I wasn't fully up to speed with
dotnet concepts (am I now either ;-), so the App is probably not built
accoridng to best practices.
Now I'm facing a situation, where I need to make a new module to the
software, but I don't want to compile everything into a single EXE because it
is getting quite large (already 2 MB+), so I thought about taking the shared
classes out of the current EXE into a separate DLL, and then the new App
would use the same DLL to access the shared items.
The problem is this. Many of the classes use other classes, and there are
also some globally defined objects that would need to be accessible to both
the EXE and the DLL.
Example:
I have a class called clSysSettings and I define a global object SysSettings
that is an instance of that class. Then I also have a class called clItem
that is used by objects in various places of the app. clItems also needs
access to Syssettings for various things. If the object SysSettings is
declared in Module1 of App.EXE, is it also available to Item objects based on
clItem which reside in the DLL ?
Of course I could change the way I use SysSettings and declare it privately
in each class, but there are a lot of classes in the app...
Thanks for any ideas !
Petri
I'm working on a piece of software that is now growing into a suite of
software products. When I started the work, I wasn't fully up to speed with
dotnet concepts (am I now either ;-), so the App is probably not built
accoridng to best practices.
Now I'm facing a situation, where I need to make a new module to the
software, but I don't want to compile everything into a single EXE because it
is getting quite large (already 2 MB+), so I thought about taking the shared
classes out of the current EXE into a separate DLL, and then the new App
would use the same DLL to access the shared items.
The problem is this. Many of the classes use other classes, and there are
also some globally defined objects that would need to be accessible to both
the EXE and the DLL.
Example:
I have a class called clSysSettings and I define a global object SysSettings
that is an instance of that class. Then I also have a class called clItem
that is used by objects in various places of the app. clItems also needs
access to Syssettings for various things. If the object SysSettings is
declared in Module1 of App.EXE, is it also available to Item objects based on
clItem which reside in the DLL ?
Of course I could change the way I use SysSettings and declare it privately
in each class, but there are a lot of classes in the app...
Thanks for any ideas !
Petri