<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.win32service.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.win32-set-service-status.php',
    1 => 'win32_set_service_status',
    2 => 'Update the service status',
  ),
  'up' => 
  array (
    0 => 'ref.win32service.php',
    1 => 'win32service Функції',
  ),
  'prev' => 
  array (
    0 => 'function.win32-set-service-pause-resume-state.php',
    1 => 'win32_set_service_pause_resume_state',
  ),
  'next' => 
  array (
    0 => 'function.win32-start-service.php',
    1 => 'win32_start_service',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/win32service/functions/win32-set-service-status.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.win32-set-service-status" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">win32_set_service_status</h1>
  <p class="verinfo">(PECL win32service &gt;=0.1.0)</p><p class="refpurpose"><span class="refname">win32_set_service_status</span> &mdash; <span class="dc-title">Update the service status</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.win32-set-service-status-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>win32_set_service_status</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$status</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$checkpoint</code><span class="initializer"> = 0</span></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="para rdfs-comment">
   Informs the SCM of the current status of a running service.
   This call is only valid for a running service process.
  </p>
    
  <div class="caution"><strong class="caution">Застереження</strong>
   <p class="para">
    Since version 0.2.0, this function work only in &quot;cli&quot; SAPI. On other SAPI 
    this function is disabled.
   </p>
  </div>

 </div>

 <div class="refsect1 parameters" id="refsect1-function.win32-set-service-status-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">status</code></dt>
     <dd>
      <p class="para">
       The service status code, one of
       <strong><code><a href="win32service.constants.php#constant.win32-service-running">WIN32_SERVICE_RUNNING</a></code></strong>,
       <strong><code><a href="win32service.constants.php#constant.win32-service-stopped">WIN32_SERVICE_STOPPED</a></code></strong>,
       <strong><code><a href="win32service.constants.php#constant.win32-service-stop-pending">WIN32_SERVICE_STOP_PENDING</a></code></strong>,
       <strong><code><a href="win32service.constants.php#constant.win32-service-start-pending">WIN32_SERVICE_START_PENDING</a></code></strong>,
       <strong><code><a href="win32service.constants.php#constant.win32-service-continue-pending">WIN32_SERVICE_CONTINUE_PENDING</a></code></strong>,
       <strong><code><a href="win32service.constants.php#constant.win32-service-pause-pending">WIN32_SERVICE_PAUSE_PENDING</a></code></strong>,
       <strong><code><a href="win32service.constants.php#constant.win32-service-paused">WIN32_SERVICE_PAUSED</a></code></strong>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">checkpoint</code></dt>
     <dd>
      <p class="para">
       The checkpoint value the service increments periodically to report its
       progress during a lengthy start, stop, pause, or continue operation.
       For example, the service should increment this value as it completes
       each step of its initialization when it is starting up.
      </p>
      <p class="para">
       The <code class="parameter">checkpoint</code> is only valid when the
       <code class="parameter">status</code> is one of
       <strong><code><a href="win32service.constants.php#constant.win32-service-stop-pending">WIN32_SERVICE_STOP_PENDING</a></code></strong>,
       <strong><code><a href="win32service.constants.php#constant.win32-service-start-pending">WIN32_SERVICE_START_PENDING</a></code></strong>,
       <strong><code><a href="win32service.constants.php#constant.win32-service-continue-pending">WIN32_SERVICE_CONTINUE_PENDING</a></code></strong> or
       <strong><code><a href="win32service.constants.php#constant.win32-service-pause-pending">WIN32_SERVICE_PAUSE_PENDING</a></code></strong>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.win32-set-service-status-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Не повертає значень.
  </p>
  <p class="para">
    Prior to version 1.0.0, повертається <strong><code><a href="win32service.constants.php#constant.win32-no-error">WIN32_NO_ERROR</a></code></strong> у разі
успіху, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> якщо виникли складнощі з параметрами, або <a href="win32service.constants.php#win32service.constants.errors" class="link">Код помилки Win32</a> у разі збою.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.win32-set-service-status-errors">
  <h3 class="title">Помилки/виключення</h3>
  <p class="para">
   Prior to version 1.0.0, if the SAPI is not <code class="literal">&quot;cli&quot;</code>, this function emits an 
<strong><code><a href="errorfunc.constants.php#constant.e-error">E_ERROR</a></code></strong> level error.
  </p>
   <p class="para">
    As of version 1.0.0, will throw a 
    <span class="classname"><a href="class.win32serviceexception.php" class="classname">Win32ServiceException</a></span> if SAPI is not 
    <code class="literal">&quot;cli&quot;</code>
   </p>
 </div>

 
 <div class="refsect1 changelog" id="refsect1-function.win32-set-service-status-changelog">
  <h3 class="title">Журнал змін</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Версія</th>
       <th>Опис</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>PECL win32service 1.0.0</td>
       <td>
        Throws a <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> on invalid data in parameters,
        previously <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> was returned.
       </td>
      </tr>

      <tr>
       <td>PECL win32service 1.0.0</td>
       <td>
        Throws a <span class="classname"><a href="class.win32serviceexception.php" class="classname">Win32ServiceException</a></span> on error,
        previously a 
        <a href="win32service.constants.php#win32service.constants.errors" class="link">Win32 Error Code</a>
        was returned.
       </td>
      </tr>

      <tr>
       <td>PECL win32service 1.0.0</td>
       <td>
        The return type is now <span class="type"><span class="type"><a href="language.types.void.php" class="type void">void</a></span></span>, previously it was <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span>.
       </td>
      </tr>

      <tr>
       <td>PECL win32service 0.2.0</td>
       <td>
        This function works only in the <code class="literal">&quot;cli&quot;</code> SAPI.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.win32-set-service-status-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.win32-start-service-ctrl-dispatcher.php" class="function" rel="rdfs-seeAlso">win32_start_service_ctrl_dispatcher()</a> - Registers the script with the SCM, so that it can act as the service with the given name</span></li>
    <li><span class="function"><a href="function.win32-get-last-control-message.php" class="function" rel="rdfs-seeAlso">win32_get_last_control_message()</a> - Returns the last control message that was sent to this service</span></li>
    <li><span class="function"><a href="function.win32-set-service-exit-mode.php" class="function" rel="rdfs-seeAlso">win32_set_service_exit_mode()</a> - Define or return the exit mode for the current running service</span></li>
    <li><span class="function"><a href="function.win32-set-service-exit-code.php" class="function" rel="rdfs-seeAlso">win32_set_service_exit_code()</a> - Define or return the exit code for the current running service</span></li>
    <li><a href="win32service.constants.php#win32service.constants.servicestatus" class="link">Win32Service Service Status Constants</a></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>