OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Jonas Blunck TACMa (jobuTAC.SE)
Date: Tue Feb 05 2002 - 04:35:16 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    You'll need to call QueryServiceStatus, and when it return SERVICE_STOPPED
    in the dwCurrentState param, the service is stopped. How long time it will
    take to stop is depending on the service and there is no way of telling this
    in advance (none that I know of)..

    // B

    -----Original Message-----
    From: Ramya [mailto:myaSRASYS.CO.IN]
    Sent: den 5 februari 2002 11:16
    To: DCOMDISCUSS.MICROSOFT.COM
    Subject: stopping a service using ControlService API

    Hi,
    When I issue a stop message to the SCM by passing SERVICE_CONTROL_STOP
    through the ControlService API, the dwCurrentStatus shows the status of the
    service as SERVICE_RUNNING even after the ControlService function has
    returned.

    I do not get SERVICE_STOP_PENDING most of the times. But this is what I am
    looking for.
    The service does stop however after a while. This is after I get
    SERVICE_RUNNING in the status of ControlService.

    Can you please let me know if there is any way to know reliably if the
    ControlService will really stop the service. Also how long the service may
    take to stop?.The service was created using ATL Wizard.

    Thanks in advance,
    Ramya

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html . To unsubscribe,
    mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM