Restart webserver

Posted on 2009-04-17
Last Modified: 2013-12-05
I need to be able to restart the webserver on my WinCE 5.0 device programmatically. I know it can be done but I have not found any articles laying it out. This probably works very similar to the WinXP or WinXP Embedded webserver. Any suggestions?
Question by:dbthompson
    LVL 86

    Expert Comment

    >>I need to be able to restart the webserver on my WinCE 5.0 device

    Take a look at ("Restarting the web server from your program"). The APIs introduced in this article also exist on CE, so that should get you going.

    Accepted Solution

    Thank you for the link. I have seen that page in CodeProject but it looked more involved than what I wanted to do so I decided to keep looking. Maybe I'm just stubborn. But ultimately I wound up hunting through the Windows folder of my CE device and noticed that there was an executable called "services". I started playing with it and sure enough I was able to figure out how to start and stop and refresh any windows service I wanted to. I have had a look on MSDN for information on Services and it ranged from scant to misleading. So for the sake of posterity I am posting the call to CreateProcess() has worked to restart a WinCE 5.0 Webserver inside my application. This is likely to work for many other services but I have not tested them.

    CString ServicesExe = "\\Windows\\services.exe";
    CString Arguments = "refresh HTP0:";

    BOOL bSuccess = CreateProcess(ServicesExe, Arguments, NULL, NULL, NULL, 0, NULL, NULL, NULL, &ProcInfo);

    Thanks again for the help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now