downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.win32-query-service-status.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = 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 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.win32-query-service-status.php',
   
1 => 'win32_query_service_status',
  ),
 
'up' =>
  array (
   
0 => 'ref.win32service.php',
   
1 => 'win32service Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.win32-get-last-control-message.php',
   
1 => 'win32_get_last_control_message',
  ),
 
'next' =>
  array (
   
0 => 'function.win32-set-service-status.php',
   
1 => 'win32_set_service_status',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.win32-query-service-status" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">win32_query_service_status</h1>
  <p class="verinfo">(PECL win32service SVN)</p><p class="refpurpose"><span class="refname">win32_query_service_status</span> &mdash; <span class="dc-title">Queries the status of a service</span></p>

 </div>
 <a name="function.win32-query-service-status.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><a href="language.pseudo-types.php#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><b>win32_query_service_status</b></span>
    ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$servicename</tt></span>
   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$machine</tt></span>
  ] )</div>


  <p class="para rdfs-comment">
   Queries the current status for a service, returning an array of
   information.
  </p>

 </div>

 <a name="function.win32-query-service-status.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">servicename</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The short name of the service.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">machine</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The optional machine name.  If omitted, the local machine will be used.
      </p>
     </dd>

   
   </dl>
<p>
  </p>
 </div>

 <a name="function.win32-query-service-status.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <b><tt class="constant">FALSE</tt></b> on failure, otherwise returns an array consisting of the
   following information:
  </p>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">ServiceType</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The dwServiceType.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">CurrentState</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The dwCurrentState.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">ControlsAccepted</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       Which service controls are accepted by the service.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">Win32ExitCode</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       If the service exited, the return code from the process.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">ServiceSpecificExitCode</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       If the service exited with an error condition, the service specific
       code that is logged in the event log is visible here.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">CheckPoint</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       If the service is shutting down, holds the current check point number.
       This is used by the SCM as a kind of heart-beat to detect a wedged service
       process.  The value of the check point is best interpreted in
       conjunction with the WaitHint value.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">WaitHint</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       If the service is shutting down it will set WaitHint to a checkpoint
       value that will indicate 100% completion.  This can be used to
       implement a progress indicator.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">ProcessId</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The Windows process identifier.  If 0, the process is not running.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">ServiceFlags</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The dwServiceFlags.
      </p>
     </dd>

   
   </dl>
<p>
  </p>

 </div>


 


 


 


 


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites