Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : win32service Functions : win32_create_service

win32_create_service

Creates a new service entry in the SCM database ()
mixed win32_create_service ( array details [, string machine] )

Example 2620. A win32_create_service() example

Any text that describes the purpose of the example, or what goes on in the example should go here (inside the

<?php
$x
= win32_create_service(array(
       
'service' => 'dummyphp',
       
'display' => 'sample dummy PHP service',
       
'params' => __FILE__ . ' run',
));
debug_zval_dump($x);
?>

Code Examples / Notes » win32_create_service

pauljamesthomson

Other start_type values:
0x00000002: A service started automatically by the service control manager during system startup. For more information, see Automatically Starting Services.
0x00000000: A device driver started by the system loader. This value is valid only for driver services.
0x00000003: A service started by the service control manager when a process calls the win32_start_service() function.
0x00000004: A service that cannot be started. Attempts to start the service result in the error code
0x00000001: A device driver started by the IoInitSystem function. This value is valid only for driver services.
I can confirm that 0x00000003 works as expected (service is created, but must be started manually).
More here:
http://msdn2.microsoft.com/en-us/library/ms682450.aspx


Change Language


Follow Navioo On Twitter
win32_create_service
win32_delete_service
win32_get_last_control_message
win32_query_service_status
win32_set_service_status
win32_start_service_ctrl_dispatcher
win32_start_service
win32_stop_service
eXTReMe Tracker