can a program become a service?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: can a program become a service?

  1. #1
    Join Date
    Mar 2013
    Posts
    30

    can a program become a service?

    i have a very basic client server program in c++ console application where the client sends a message to the server, the server accepts the message and echoes it back to the client.

    can the server become an application that runs as a service and still echo back the clients messages?

    if i can do this how is it done?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,392

    Re: can a program become a service?

    You could start from what has beendiscussed here
    Victor Nijegorodov

  3. #3
    Join Date
    Mar 2013
    Posts
    30

    Re: can a program become a service?

    thanks but that link didn't help much.
    ok so i know a program can become a service but can the server still echo back the clients messages?

  4. #4
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,882

    Re: can a program become a service?

    Any program can become a service if it "behaves like a service". that is... it's not interactive and it doesn't do certain things that services aren't allowed to do.

    You can either rewrite the app to specifically respond to the system as a service.
    Or you can use a tool called SRVANY.

    Note that this SRVANY approach does have it's limitations...

  5. #5
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    5,974

    Re: can a program become a service?

    Quote Originally Posted by kw1991 View Post
    ok so i know a program can become a service but can the server still echo back the clients messages?
    Let's start with some other thing. What is the point of making your program be a service? How much you know about service programs, especially Windows Vista/7 services that are just not allowed to interact with user desktops?
    Best regards,
    Igor

  6. #6
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,289

    Re: can a program become a service?

    Quote Originally Posted by kw1991 View Post
    thanks but that link didn't help much.
    ok so i know a program can become a service but can the server still echo back the clients messages?
    Sure, a service can pass data between client applications. You'll need to do some sort of interprocess communication.

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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center