COM dll in vb.net windows service

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sutapa

    COM dll in vb.net windows service

    Hi,

    I am creating a vb.net windows service . In this service I am accessing a
    COM dll. I created meta DLL using tlbimp. I added reference of this meta dll
    in my vb.net service code.

    I declare globally
    Public WithEvents m_objAdmin As MyMetadata.Admi nistrationManag er
    Public WithEvents m_objRouting As MyMetadata.Rout ingManager
    Public m_objHipath As MyMetadata.HiPa thProCenterMana ger
    Public m_objMedia As MyMetadata.Medi aManager

    In my service start, I do all the login using objHipath object which are
    successful and service starts successfully.

    when I get Event for MyMetadata.Rout ingManager, I need to access my global
    objects objMedia ,objAdmin and objRouting but it throws error when i access
    any of these objects.It seems they are loosing the reference to these
    objects.

    When I try same code in vb.net window application it works fine.

    Could anybody tell me where i am going wrong and how to correct it.?

    Thanks

Working...