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

search for in the

win32_get_last_control_message> <win32_create_service
Last updated: Fri, 13 Nov 2009

view this page in

win32_delete_service

(PECL win32service SVN)

win32_delete_serviceSCM データベースからサービスのエントリを削除する

説明

int win32_delete_service ( string $servicename [, string $machine ] )

SCM データベースからサービスの削除を試みます。管理者権限が必要です。

この関数は、単にサービスに削除マークをつけるだけです。もし他のプロセス (サービスアプレットなど)が開かれた場合、削除処理はそのアプリケーションが 終了するまで延期されます。サービスに削除マークがつけられると、それ以降は 同じサービスに対する削除の試行は失敗します。また同名の新規サービスを作成 しようとする処理も失敗します。

パラメータ

servicename

サービスの短い名前。

machine

オプションのマシン名。指定しなかった場合、ローカルマシンが使用されます。

返り値

成功した場合に TRUE 、失敗した場合に win32 エラーコードを返します。

例1 win32_delete_service() の例

dummyphp サービスを削除します。

<?php
win32_delete_service
('dummyphp');
?>



add a note add a note User Contributed Notes
win32_delete_service
Patrick Crocker
17-Jan-2007 08:45
The manual states that this function "Returns TRUE on success", however, I have found that this function returns WIN32_NO_ERROR  (zero) on success.

Environment as tested:
----------------------
Windows XP SP2
PHP 5.1.4
PECL php_win32service.dll 5.1.2

win32_get_last_control_message> <win32_create_service
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites