CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: Windows service

  1. #1
    Join Date
    Feb 2004
    Posts
    21

    Windows service

    I want to start an apllication(that I've already written in C++) as a service under Windows 2000 and send start/stop signals to that service with other program. I've red about this in MSDN but it's a bit unclear to me. Can somebody help me(may be with example???

  2. #2
    Join Date
    Nov 2003
    Posts
    1,902
    Look at the articles here under "NT Services" and "Services".

    gg

  3. #3
    Join Date
    Mar 2004
    Location
    (Upper-) Austria
    Posts
    2,899
    If its not clear you can have an example from me, how to write an service, start and stopping it etc...

    Do you want it?

  4. #4
    Join Date
    Feb 2004
    Posts
    21
    Thank you!
    I've already made it. However if want to install, run or stop the service i have to do it from the console(cmd.exe).

    I want to do these things from other program that I've written(console application), so if you can help me with that problem?

  5. #5
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537
    search the win32 api for service with my name...it's a long thread and we discuss...including sample service code.

  6. #6
    Join Date
    Feb 2004
    Posts
    81
    There are two ways. Either you can create your windows application as a service or you can create a service that runs your windows application.
    Both of these methods are usefull according to the situation.
    while(true)
    cout<<"C++ is divine\n";

    Feroz Zahid

  7. #7
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652

  8. #8
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    Look for information about the SRVANY utility.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  9. #9
    Join Date
    Feb 2004
    Posts
    21
    Thank you guys!
    I've made it.

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