Click to See Complete Forum and Search --> : COM+ and NT service


Alexander
October 16th, 2002, 02:57 AM
Hi! Could You please help me to solve the problem :
I configured my COM+ application as NT service.
Now I need to do some action when this NT service is being started
but my components' dll is being loaded to com+ applications'proces
only when some client is trying to create my component.
So I can't use DllMain with dwReason == DLL_PROCESS_ATTACH in this case...
Is there any way to make my COM+ application load component's dll everytime when
the application is starting.

BWirtz
March 14th, 2003, 04:12 PM
Perhaps you could instantiate some class from your component dll in the InitInstance method of your app. This should cause load your dll to load when the app begins.

Kheun
March 16th, 2003, 07:13 PM
Correct me if I am wrong. If you only need to do some actions once when the NT service started, creating an static instance of an object may help. You may use the constructor of the object to do your tasks. This is due to the fact that static object is first created before any other object.