StartServiceCtrlDispatcher function advapi32
Connects the main thread of a service process to the service control manager, which causes the thread to be the service control dispatcher thread for the calling process.
To learn more, see learn.microsoft.com/windows/win32/api/winsvc/nf-winsvc-startservicectrldispatcherw.
Implementation
Win32Result<bool> StartServiceCtrlDispatcher(
Pointer<SERVICE_TABLE_ENTRY> lpServiceStartTable,
) {
resolveGetLastError();
final result_ = _StartServiceCtrlDispatcher(lpServiceStartTable);
return .new(value: result_ != FALSE, error: GetLastError());
}