Using Win32 functions in Visual FoxPro Image Gallery
Service
..msdn
CloseServiceHandle
ControlService
CreateService
DeleteService
EnumServicesStatus
GetUserObjectInformation
LockServiceDatabase
OpenSCManager
OpenService
StartService
UnlockServiceDatabase
Code examples:
How to delete a service object
DeleteService
..msdn    Add comment     W32 Constants      Translate this page
Marks the specified service for deletion from the service control manager database.
Code examples:
How to delete a service object
Declaration:
BOOL WINAPI DeleteService(
    SC_HANDLE hService
);

FoxPro declaration:
DECLARE INTEGER DeleteService IN advapi32;
    INTEGER hService

Parameters:
hService
[in] Handle to the service.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
This handle is returned by the OpenService or CreateService function, and it must have the DELETE access right.

The DeleteService function marks a service for deletion from the service control manager database. The database entry is not removed until all open handles to the service have been closed by calls to the CloseServiceHandle function, and the service is not running.

A running service is stopped by a call to the ControlService function with the SERVICE_CONTROL_STOP control code. If the service cannot be stopped, the database entry is removed when the system is restarted.

The service control manager deletes the service by deleting the service key and its subkeys from the registry.

1072=ERROR_SERVICE_MARKED_FOR_DELETE
1062=ERROR_SERVICE_NOT_ACTIVE
Word Index links for the DeleteService :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2006-09-30 13:51:01
Modified: 2006-09-30 13:53:39
Visited in last 7 days: 48
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.76.240)
2 sec.Function: 'GetDiskFreeSpaceEx'
4 sec.Function: 'GdipMeasureString'
6 sec.
Function group: 'Multilingual User Interface'
8 sec.Function: 'ChangeClipboardChain'
9 sec.Function: 'FreeEnvironmentStrings'
12 sec.Function: 'DrawDibDraw'
13 sec.Function: 'FreeLibrary'
15 sec.Function: 'GdipGetPropertyItemSize'
17 sec.Function: 'FlushFileBuffers'
19 sec.
Function group: 'Remote Access Service (RAS)'
Google
Advertise here!