CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Posts
    29

    COM+ and NT service

    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.

  2. #2
    Join Date
    Mar 2003
    Posts
    2
    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.

  3. #3
    Join Date
    Oct 2002
    Location
    Singapore
    Posts
    3,128
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured