|
-
June 14th, 2011, 11:10 AM
#3
Re: How to instantiate DLLs to avoid indirect calls?
 Originally Posted by TheGreatCthulhu
Um... What you mean by "DLL1 and DLL3 instantiated inside the main form" and "nested DLLs". Are you loading the DLLs dynamically?
You don't instantiate DLLs - they are libraries of classes. You instantiate classes within. The way DLLs work, it's allready as in figure 2. The less interdependencies they have, the more reusable they are, but you can't eliminate all of the interrelations.
I should have stated things more clearly. I am using VC# 2010 Express and dotNet V4. When I say DLL, I mean a class library, aka assembly in dotNet speak. And, no, they are not already in the architecture of figure 2, but rather of figure 1. I know because I created them.
Yes, they are being loaded dynamically, but not via explicit Win32 calls. They get loaded either when I instantiate them or when I first call one of their methods. I am not talking about services either. The class library file has a class defintion (and an interface defintions for some classes). There is only ever one instance of each class, but they are not singletons. They are intended only to provide general purpose functions that should really be accessible to most other classes.
However, you may have devised a way of creating DLL in the way of Figure 2. If so I would like to hear how you do it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|