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
StartService
..msdn    Add comment     W32 Constants      Translate this page
The StartService function starts a service.
Code examples:
Encapsulating access to the Windows Services in a class
Declaration:
BOOL StartService(
  SC_HANDLE hService,
  DWORD dwNumServiceArgs,
  LPCTSTR* lpServiceArgVectors
);
FoxPro declaration:
DECLARE INTEGER StartService IN advapi32;
    INTEGER hService,;
    LONG    dwNumServiceArgs,;
    INTEGER lpServiceArgVectors

Parameters:
hService
[in] Handle to the service. This handle is returned by the OpenService or CreateService function, and it must have the SERVICE_START access right.

dwNumServiceArgs
[in] Number of strings in the lpServiceArgVectors array. If lpServiceArgVectors is NULL, this parameter can be zero.

lpServiceArgVectors
[in] Pointer to an array of pointers to null-terminated strings to be passed to a service as arguments.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
A call to the StartService function to start a service in a locked database fails.

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


Copyright 2001-2014 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.1.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.211.201.65)
17 sec.Function: 'SHGetSpecialFolderLocation'
Function group: 'Shell Functions'
38 sec.Function: 'RtlDecompressBuffer'
40 sec.Function: 'WSAStartup'
43 sec.
Function group: 'Authentication'
52 sec.Function: 'InternetCrackUrl'
Function group: 'Internet Functions (WinInet)'
Google
Advertise here!