<?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-delete-service.php',
    1 => 'win32_delete_service',
    2 => 'Deletes a service entry from the SCM database',
  ),
  'up' => 
  array (
    0 => 'ref.win32service.php',
    1 => 'win32service Функції',
  ),
  'prev' => 
  array (
    0 => 'function.win32-create-service.php',
    1 => 'win32_create_service',
  ),
  'next' => 
  array (
    0 => 'function.win32-get-last-control-message.php',
    1 => 'win32_get_last_control_message',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/win32service/functions/win32-delete-service.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.win32-delete-service" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">win32_delete_service</h1>
  <p class="verinfo">(PECL win32service &gt;=0.1.0)</p><p class="refpurpose"><span class="refname">win32_delete_service</span> &mdash; <span class="dc-title">Deletes a service entry from the SCM database</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.win32-delete-service-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>win32_delete_service</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$servicename</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$machine</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>


  <p class="para rdfs-comment">
   Attempts to delete a service from the SCM database.  Administrative
   privileges are required for this to succeed.
  </p>
  <p class="para">
   This function really just marks the service for deletion.  If other
   processes (such as the Services Applet) are open, then the deletion will be
   deferred until those applications are closed.  If a service is marked for
   deletion, further attempts to delete it will fail, and attempts to create a
   new service with that name will also fail.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.win32-delete-service-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">servicename</code></dt>
     <dd>
      <p class="para">
       The short name of the service.
      </p>
     </dd>
    
    
     <dt><code class="parameter">machine</code></dt>
     <dd>
      <p class="para">
       The optional machine name.  If omitted, the local machine will be used.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.win32-delete-service-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-delete-service-errors">
  <h3 class="title">Помилки/виключення</h3>
  <p class="para">
    A <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> is thrown if the
    value of <code class="parameter">servicename</code> parameter is empty.
  </p>

   <p class="para">
    A <span class="classname"><a href="class.win32serviceexception.php" class="classname">Win32ServiceException</a></span> is thrown on error.
   </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.win32-delete-service-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>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.win32-delete-service-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 A <span class="function"><strong>win32_delete_service()</strong></span> example</strong></p>
    <div class="example-contents"><p>
     Deletes the dummyphp service.
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />win32_delete_service</span><span style="color: #007700">(</span><span style="color: #DD0000">'dummyphp'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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


 <div class="refsect1 seealso" id="refsect1-function.win32-delete-service-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.win32-create-service.php" class="function" rel="rdfs-seeAlso">win32_create_service()</a> - Creates a new service entry in the SCM database</span></li>
    <li><a href="win32service.constants.php#win32service.constants.errors" class="link">Win32 Error Codes</a></li>
   </ul>
  </p>
 </div>


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