Source of: /manual/en/function.win32-delete-service.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-delete-service.php',
1 => 'win32_delete_service',
),
'up' =>
array (
0 => 'ref.win32service.php',
1 => 'win32service Functions',
),
'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',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="function.win32-delete-service" class="refentry">
<div class="refnamediv">
<h1 class="refname">win32_delete_service</h1>
<p class="verinfo">(PECL win32service SVN)</p><p class="refpurpose"><span class="refname">win32_delete_service</span> — <span class="dc-title">Deletes a service entry from the SCM database</span></p>
</div>
<a name="function.win32-delete-service.description"></a><div class="refsect1 description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="type">int</span> <span class="methodname"><b>win32_delete_service</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">
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>
<a name="function.win32-delete-service.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-delete-service.returnvalues"></a><div class="refsect1 returnvalues">
<h3 class="title">Return Values</h3>
<p class="para">
Returns <b><tt class="constant">TRUE</tt></b> on success, or a win32 error code on failure.
</p>
</div>
<a name="function.win32-delete-service.examples"></a><div class="refsect1 examples">
<h3 class="title">Examples</h3>
<p class="para">
</p><div class="example">
<p><b>Example #1 A <b>win32_delete_service()</b> example</b></p>
<div class="example-contents para"><p>
Deletes the dummyphp service.
</p></div>
<div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB"><?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">?></span>
</span>
</code></div>
</div>
</div><p>
</p>
</div>
</div><?php manual_footer(); ?>