| 565 | return result; |
| 566 | } |
| 567 | BOOL DeleteWindowsService(LPCWSTR name) |
| 568 | { |
| 569 | BOOL result = FALSE; |
| 570 | |
| 571 | SC_HANDLE serviceManager = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); |
| 572 | if (serviceManager) |
| 573 | { |
| 574 | SC_HANDLE service = OpenServiceW(serviceManager, name, SC_MANAGER_ALL_ACCESS); |
| 575 | if (service) |
| 576 | { |
| 577 | if (DeleteService(service)) |
| 578 | { |
| 579 | result = TRUE; |
| 580 | } |
| 581 | |
| 582 | CloseServiceHandle(service); |
| 583 | } |
| 584 | |
| 585 | CloseServiceHandle(serviceManager); |
| 586 | } |
| 587 | |
| 588 | return result; |
| 589 | } |
| 590 | HANDLE CreatePublicNamedPipe(LPCWSTR name) |
| 591 | { |
| 592 | // Get security attributes for "EVERYONE", so the named pipe is accessible to all processes. |
no outgoing calls
no test coverage detected