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
OpenService
..msdn    Add comment     W32 Constants      Translate this page
The OpenService function opens an existing service.
Code examples:
Encapsulating access to the Windows Services in a class
How to delete a service object
Declaration:
SC_HANDLE OpenService(
  SC_HANDLE hSCManager,
  LPCTSTR lpServiceName,
  DWORD dwDesiredAccess
);

FoxPro declaration:
DECLARE INTEGER OpenService IN advapi32;
    INTEGER hSCManager,;
    STRING  lpServiceName,;
    LONG    dwDesiredAccess

Parameters:
hSCManager
[in] Handle to the service control manager database. The OpenSCManager function returns this handle.

lpServiceName
[in] Pointer to a null-terminated string that specifies the name of the service to open.

dwDesiredAccess
[in] Access to the service.
Return value:
If the function succeeds, the return value is a handle to the service.
My comment:
Unicode: Implemented as OpenServiceW (Unicode) and OpenServiceA (ANSI).

The returned handle is only valid for the process that called OpenService. It can be closed by calling the CloseServiceHandle function.

See also: StartService, ControlService.
Word Index links for the OpenService :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-12-15 12:05:11
Modified: 2004-12-15 12:07:51
Visited in last 7 days: 26
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.156.67.122)
19 sec.Function: 'CeCopyFile'
40 sec.Function: 'CeGlobalMemoryStatus'
1 min.Function: 'wnsprintf'
1.37 min.Function: 'timeGetDevCaps'
1.73 min.Function: 'ReplaceFile'
2.17 min.Function: 'GetPrinter'
3.28 min.Function: 'FileIconInit'
Google
Advertise here!