Discussion Locked

In-Process dll's

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm developing an Access 97 application.

Scenario: I create app A which references a dll. Then I create app B which references the same dll. Then I create app C which references both A and B, but not the dll directly.

My question: Is the memory space for app C using multiple instances of the same dll and therefore wasting resources? Am I better off with an out-of-process exe instead of an in-process dll?

The reason this becomes important to me is that my real final app (like app C in my example) is going to reference close to 20 individual apps, all of which will be using the same dll.

Thanks.

4 replies

by medievaldude

There are a couple of main types of instancing you can do with COM objects - singleuse and multiuse. With singleuse, each time you create an object in reference to your COM object, a new instance of the COM object is created. With multiuse, all objects you create in reference to your COM object use the same instance of the COM object.

COM dll's cannot have singleuse instancing, due to the fact that they are in-process by nature.

The only way to use singleuse would be to use a COM exe (which is out-of-process by nature). Since your final app is going to reference around 20 individual apps that create objects in reference to one COM object, I would strongly recommend using a COM exe rather than a dll because of the singleuse instancing properties only found in an exe.

Let me know if you need more clarification, or if you have any further questions.

This discussion is closed to new replies.