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 create a service object
How to delete a service object
OpenSCManager
..msdn    Add comment     W32 Constants      Translate this page
The OpenSCManager function establishes a connection to the service control manager on the specified computer and opens the specified service control manager database.
Code examples:
Encapsulating access to the Windows Services in a class
How to delete a service object
How to create a service object
Declaration:
SC_HANDLE OpenSCManager(
  LPCTSTR lpMachineName,
  LPCTSTR lpDatabaseName,
  DWORD dwDesiredAccess
);

FoxPro declaration:
DECLARE INTEGER OpenSCManager IN advapi32;
    STRING lpMachineName,;
    STRING lpDatabaseName,;
    LONG   dwDesiredAccess

Parameters:
lpMachineName
[in] Pointer to a null-terminated string that specifies the name of the target computer.

lpDatabaseName
[in] Pointer to a null-terminated string that specifies the name of the service control manager database to open.

dwDesiredAccess
[in] Access to the service control manager.
Return value:
If the function succeeds, the return value is a handle to the specified service control manager database.
My comment:
The returned handle is only valid for the process that called the OpenSCManager function. It can be closed by calling the CloseServiceHandle function.
Word Index links for the OpenSCManager :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-12-13 21:43:21
Modified: 2004-12-13 21:45:37
Visited in last 7 days: 24
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.166.203.76)
3 sec.Function: 'InternetQueryOption'
4 sec.Function: 'ConvertSidToStringSid'
6 sec.Function: 'GetPwrCapabilities'
9 sec.Function: 'CoCreateGuid'
10 sec.Function: 'GetPrinter'
12 sec.Function: 'LookupPrivilegeDisplayName'
14 sec.Function: 'URLDownloadToFile'
17 sec.
Function group: 'HTTP Functions (WinHTTP)'
19 sec.Function: 'CeCreateFile'
22 sec.Function: 'GetWorldTransform'
Google
Advertise here!