CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2009
    Posts
    13

    AtlService in VS2008

    Hi all,

    im trying to do an Atl Service in VS2008. I use the Atl Project Wizard and select Service (EXE). Then I add one AtlSimple Object. Compile & Register via /RegServer

    From a client application I can CoCreate the AtlObject inside my .exe.

    The Problem:
    As soon as I register my service with cmd option -Service, I can no longer CoCreate the AtlObject. Any call to CoCreateInstance will run into a timeout and fail with 0x80080005 - "Server execution failed".

    What am I doing wrong? Any ideas?


    See attached my test project.
    To reproduce:
    rebuild AtlServerIII
    start AtlClient
    ==>ok
    run AtlServerIII -Service
    start AtlClient
    ==>timout & error in CoCreateInstance
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2009
    Posts
    13

    Re: AtlService in VS2008

    Okay- did a little more "investigation" on this

    The only difference between -RegServer and -Service Options is that the Service adittionally calls CAtlServiceModuleT::Install() and uses ServiceManager to install the service... and... messes up my ATL Objects.

    If I use sc.exe to install my service by Hand (instead of -Service option) everything will work... So *** is wrong with the ATL implementation??

    Regards,
    Christoph

  3. #3
    Join Date
    Feb 2009
    Posts
    13

    Re: AtlService in VS2008

    Nobody any Idea about that?
    (actually sc.exe also does not really work...)


    So the question basically is how do I implement an ATL Service containing a simple COM object wich can be instantiated from another app?
    This worked perfectly in vc6 but not in VS 2005/2008

  4. #4
    Join Date
    Feb 2009
    Posts
    13

    Re: AtlService in VS2008

    Has anybody done this yet?

  5. #5
    Join Date
    Feb 2009
    Posts
    13

    Resolved Re: AtlService in VS2008

    As it turned out, the problem is due to a bug in VS2008 : The registration Script (.rgs) generated by the Wizard is incorrect. Value "AppId" is missing.


    http://blogs.msdn.com/jigarme/archiv...l-service.aspx

Tags for this Thread

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