Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 12 of file delete.c.
Referenced by DECLARE_INTERFACE_(), RawCheckForDismount(), RegistryPage(), and ScControl().
{ SC_HANDLE hSCManager = NULL; SC_HANDLE hSc = NULL; #ifdef SCDBG _tprintf(_T("service to delete - %s\n\n"), ServiceName); #endif hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT); if (hSCManager != NULL) { hSc = OpenService(hSCManager, ServiceName, DELETE); if (hSc != NULL) { if (DeleteService(hSc)) { _tprintf(_T("[SC] DeleteService SUCCESS\n")); CloseServiceHandle(hSc); CloseServiceHandle(hSCManager); return TRUE; } } } ReportLastError(); if (hSc) CloseServiceHandle(hSc); if (hSCManager) CloseServiceHandle(hSCManager); return FALSE; }