Re: Console application to become COM server?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 11/22/04

  • Next message: Igor Tandetnik: "Re: How to convert VARIANT to char*/CStringArray?"
    Date: Mon, 22 Nov 2004 14:45:00 -0500
    
    

    "apocalypznow" <apocalypznow@gmail.com> wrote in message
    news:%23pTH3LM0EHA.1524@TK2MSFTNGP09.phx.gbl
    > No kidding. Short of having to hand code repetitive boiler plate
    > code, what would you recommend a quick way to go about it? Should I
    > take the wizard's generated ATL server code and merge it into the
    > console app? If so, what things ought I to be careful of? Is there
    > another viable method?

    I'd use the Wizard to generate a skeleton in a separate project, then
    port my exising code. It is unlikely that you can just tack a few
    modifications and turn your console app into a COM server. The two
    usually have different lifecycles: the console application starts, does
    its job, and terminates; the server starts, waits for the client to call
    it, does what the client asks, waits again, works again, ... In other
    words, console apps tend to be procedural, servers are event-driven.
    This often affects major design decisions.

    -- 
    With best wishes,
        Igor Tandetnik
    With sufficient thrust, pigs fly just fine. However, this is not 
    necessarily a good idea. It is hard to be sure where they are going to 
    land, and it could be dangerous sitting under them as they fly 
    overhead. -- RFC 1925 
    

  • Next message: Igor Tandetnik: "Re: How to convert VARIANT to char*/CStringArray?"

    Relevant Pages

    • RE: SharePoint
      ... in a console app, it must be something to do with web priviledges. ... I hope other SharePoint actions aren't as convoluted... ... the sid used internally may have been somewhat mangled. ... if you have other sharepoint server ...
      (microsoft.public.sharepoint.portalserver.development)
    • Re: RemotingException: Cannot load type
      ... The remoting will only work if the client and server reference the ... > I have a console app which is a remoting server. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Diagnostics.Process class and ASP.NET
      ... You have to remember that ASP.NET runs server side. ... A console application runs on a local client, ... > In a simple console app the following few lines open up an Acrobat file ... No error message, not ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Console application to become COM server?
      ... Microsoft MVP, MCSD ... > and turn your console app into a COM server. ... > the client asks, waits again, works again, ... ...
      (microsoft.public.vc.atl)
    • Re: Diagnostics.Process class and ASP.NET
      ... server, not the client. ... > You have to remember that ASP.NET runs server side. ... >> In a simple console app the following few lines open up an Acrobat file ... No error message, not ...
      (microsoft.public.dotnet.languages.csharp)