<?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 => 'ja',
  ),
  'this' => 
  array (
    0 => 'function.win32-delete-service.php',
    1 => 'win32_delete_service',
    2 => 'SCM データベースからサービスのエントリを削除する',
  ),
  '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' => 'ja',
    '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">SCM データベースからサービスのエントリを削除する</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">
   SCM データベースからサービスの削除を試みます。管理者権限が必要です。
  </p>
  <p class="para">
   この関数は、単にサービスに削除マークをつけるだけです。もし他のプロセス
   （サービスアプレットなど）が開かれた場合、削除処理はそのアプリケーションが
   終了するまで延期されます。サービスに削除マークがつけられると、それ以降は
   同じサービスに対する削除の試行は失敗します。また同名の新規サービスを作成
   しようとする処理も失敗します。
  </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">
       サービスの短い名前。
      </p>
     </dd>
    
    
     <dt><code class="parameter">machine</code></dt>
     <dd>
      <p class="para">
       オプションのマシン名。指定しなかった場合、ローカルマシンが使用されます。
      </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">
    バージョン 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">
    <code class="parameter">servicename</code> 引数が空の場合は、
    <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> がスローされます。
  </p>

   <p class="para">
    エラー時には <span class="classname"><a href="class.win32serviceexception.php" class="classname">Win32ServiceException</a></span> がスローされます。
   </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>
        引数に不正な値があった場合、
        <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> をスローするようになりました。
        これより前のバージョンでは、<strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返していました。
       </td>
      </tr>

      <tr>
       <td>PECL win32service 1.0.0</td>
       <td>
        エラー時に
        <span class="classname"><a href="class.win32serviceexception.php" class="classname">Win32ServiceException</a></span> をスローするようになりました。
        これより前のバージョンでは、
        <a href="win32service.constants.php#win32service.constants.errors" class="link">Win32 エラーコード</a> を返していました。
       </td>
      </tr>

      <tr>
       <td>PECL win32service 1.0.0</td>
       <td>
        戻り値の型が <span class="type"><span class="type"><a href="language.types.void.php" class="type void">void</a></span></span> になりました。
        これより前のバージョンでは、<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 <span class="function"><strong>win32_delete_service()</strong></span> の例</strong></p>
    <div class="example-contents"><p>
     dummyphp サービスを削除します。
    </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> - SCM データベースに新しいサービスのエントリを作成する</span></li>
    <li><a href="win32service.constants.php#win32service.constants.errors" class="link">Win32 エラーコード</a></li>
   </ul>
  </p>
 </div>


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