Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 816 of file scm.c.
Referenced by stop_service_dependents(), and TV2_GetDependants().
{ ENUM_SERVICE_STATUSW ServiceStatus; LPENUM_SERVICE_STATUSW lpStatusPtr; DWORD dwBufferSize; DWORD dwError; DWORD dwCount; TRACE("EnumDependentServicesW() called\n"); if (lpServices == NULL || cbBufSize < sizeof(ENUM_SERVICE_STATUSW)) { lpStatusPtr = &ServiceStatus; dwBufferSize = sizeof(ENUM_SERVICE_STATUSW); } else { lpStatusPtr = lpServices; dwBufferSize = cbBufSize; } RpcTryExcept { dwError = REnumDependentServicesW((SC_RPC_HANDLE)hService, dwServiceState, (LPBYTE)lpStatusPtr, dwBufferSize, pcbBytesNeeded, lpServicesReturned); } RpcExcept(EXCEPTION_EXECUTE_HANDLER) { dwError = ScmRpcStatusToWinError(RpcExceptionCode()); } RpcEndExcept; if (dwError == ERROR_SUCCESS || dwError == ERROR_MORE_DATA) { if (*lpServicesReturned > 0) { for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++) { if (lpStatusPtr->lpServiceName) lpStatusPtr->lpServiceName = (LPWSTR)((ULONG_PTR)lpServices + (ULONG_PTR)lpStatusPtr->lpServiceName); if (lpStatusPtr->lpDisplayName) lpStatusPtr->lpDisplayName = (LPWSTR)((ULONG_PTR)lpServices + (ULONG_PTR)lpStatusPtr->lpDisplayName); lpStatusPtr++; } } } if (dwError != ERROR_SUCCESS) { TRACE("REnumDependentServicesW() failed (Error %lu)\n", dwError); SetLastError(dwError); return FALSE; } TRACE("EnumDependentServicesW() done\n"); return TRUE; }