/* FIXME: Encrypt the password */
lpEncryptedPassword = (LPBYTE)lpPasswordW;
- dwPasswordLength = (DWORD)(lpPasswordW ? (wcslen(lpPasswordW) + 1) * sizeof(WCHAR) : 0);
+ dwPasswordLength = (wcslen(lpPasswordW) + 1) * sizeof(WCHAR);
}
RpcTryExcept
dwDependenciesLength *= sizeof(WCHAR);
}
- /* FIXME: Encrypt the password */
- lpEncryptedPassword = (LPBYTE)lpPassword;
- dwPasswordLength = (lpPassword ? (wcslen(lpPassword) + 1) * sizeof(WCHAR) : 0);
+ if (lpPassword != NULL)
+ {
+ /* FIXME: Encrypt the password */
+ lpEncryptedPassword = (LPBYTE)lpPassword;
+ dwPasswordLength = (wcslen(lpPassword) + 1) * sizeof(WCHAR);
+ }
RpcTryExcept
{
/* FIXME: Encrypt the password */
lpEncryptedPassword = (LPBYTE)lpPasswordW;
- dwPasswordLength = (DWORD)(lpPasswordW ? (wcslen(lpPasswordW) + 1) * sizeof(WCHAR) : 0);
+ dwPasswordLength = (wcslen(lpPasswordW) + 1) * sizeof(WCHAR);
}
RpcTryExcept
dwDependenciesLength *= sizeof(WCHAR);
}
- /* FIXME: Encrypt the password */
- lpEncryptedPassword = (LPBYTE)lpPassword;
- dwPasswordLength = (DWORD)(lpPassword ? (wcslen(lpPassword) + 1) * sizeof(WCHAR) : 0);
+ if (lpPassword != NULL)
+ {
+ /* FIXME: Encrypt the password */
+ lpEncryptedPassword = (LPBYTE)lpPassword;
+ dwPasswordLength = (wcslen(lpPassword) + 1) * sizeof(WCHAR);
+ }
RpcTryExcept
{
}
+/**********************************************************************
+ * I_ScGetCurrentGroupStateW
+ *
+ * @implemented
+ */
+DWORD WINAPI
+I_ScGetCurrentGroupStateW(SC_HANDLE hSCManager,
+ LPWSTR pszGroupName,
+ LPDWORD pdwGroupState)
+{
+ DWORD dwError;
+
+ TRACE("I_ScGetCurrentGroupStateW() called\n");
+
+ RpcTryExcept
+ {
+ dwError = RI_ScGetCurrentGroupStateW((SC_RPC_HANDLE)hSCManager,
+ pszGroupName,
+ pdwGroupState);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ RpcEndExcept
+
+ if (dwError != ERROR_SUCCESS)
+ {
+ TRACE("RI_ScGetCurrentGroupStateW() failed (Error %lu)\n", dwError);
+ SetLastError(dwError);
+ }
+
+ return dwError;
+}
+
+
/**********************************************************************
* LockServiceDatabase
*