Using Win32 functions in Visual FoxPro Image Gallery
Service
..msdn
CloseServiceHandle
ControlService
CreateService
DeleteService
EnumServicesStatus
GetUserObjectInformation
LockServiceDatabase
OpenSCManager
OpenService
StartService
UnlockServiceDatabase
Code examples:
Encapsulating access to the Windows Services in a class
How to delete a service object
ControlService
..msdn    Add comment     W32 Constants      Translate this page
The ControlService function sends a control code to a service.
Code examples:
Encapsulating access to the Windows Services in a class
How to delete a service object
Declaration:
BOOL ControlService(
  SC_HANDLE hService,
  DWORD dwControl,
  LPSERVICE_STATUS lpServiceStatus
);
FoxPro declaration:
DECLARE INTEGER ControlService IN advapi32;
    INTEGER  hService,;
    LONG     dwControl,;
    STRING @ lpServiceStatus

Parameters:
hService
[in] Handle to the service. This handle is returned by the OpenService or CreateService function.

dwControl
[in] This parameter can be one of predefined control codes.

lpServiceStatus
[out] Pointer to a SERVICE_STATUS structure that receives the latest service status information.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
The ControlService function asks the Service Control Manager (SCM) to send the requested control code to the service. The SCM sends the code if the service has specified that it will accept the code, and is in a state in which a control code can be sent to it.

See also: OpenService, StartService.
Word Index links for the ControlService :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-12-15 12:13:30
Modified: 2004-12-15 12:16:08
Visited in last 7 days: 19
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.146.59.207)
2 sec.Function: 'GetErrorMode'
4 sec.Function: 'FileTimeToLocalFileTime'
6 sec.Function: 'DrawAnimatedRects'
8 sec.Function: 'CreateRoundRectRgn'
10 sec.Function: 'GdipGetFamilyName'
12 sec.
Function group: 'URL Monikers'
13 sec.Function: 'GetCursorPos'
16 sec.Function: 'GetKeyNameText'
17 sec.
Function group: 'Menu'
19 sec.Function: 'FileTimeToSystemTime'
Google
Advertise here!