mirror of
https://github.com/reactos/reactos.git
synced 2024-07-02 02:34:53 +00:00
- Add more error checks
svn path=/trunk/; revision=39438
This commit is contained in:
parent
ab81d30c29
commit
994dea8d8a
|
@ -487,6 +487,12 @@ CloseServiceHandle(SC_HANDLE hSCObject)
|
||||||
|
|
||||||
TRACE("CloseServiceHandle() called\n");
|
TRACE("CloseServiceHandle() called\n");
|
||||||
|
|
||||||
|
if (!hSCObject)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
/* Call to services.exe using RPC */
|
/* Call to services.exe using RPC */
|
||||||
|
@ -1212,6 +1218,19 @@ EnumServicesStatusExA(SC_HANDLE hSCManager,
|
||||||
|
|
||||||
TRACE("EnumServicesStatusExA() called\n");
|
TRACE("EnumServicesStatusExA() called\n");
|
||||||
|
|
||||||
|
if (InfoLevel != SC_ENUM_PROCESS_INFO)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_LEVEL);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!hSCManager)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
dwError = REnumServicesStatusExA((SC_RPC_HANDLE)hSCManager,
|
dwError = REnumServicesStatusExA((SC_RPC_HANDLE)hSCManager,
|
||||||
|
|
Loading…
Reference in a new issue