Commit f895ad18 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed a couple of error codes.

parent e491e8f8
......@@ -331,13 +331,13 @@ int close_handle( struct process *process, obj_handle_t handle, int *fd )
if (!(entry = get_handle( process, handle ))) return 0;
if (entry->access & RESERVED_CLOSE_PROTECT)
{
set_error( STATUS_INVALID_HANDLE );
set_error( STATUS_HANDLE_NOT_CLOSABLE );
return 0;
}
obj = entry->ptr;
if (!obj->ops->close_handle( obj, process, handle ))
{
set_error( STATUS_INVALID_HANDLE );
set_error( STATUS_HANDLE_NOT_CLOSABLE );
return 0;
}
entry->ptr = NULL;
......
......@@ -270,7 +270,7 @@ struct thread *get_thread_from_id( thread_id_t id )
struct object *obj = get_ptid_entry( id );
if (obj && obj->ops == &thread_ops) return (struct thread *)grab_object( obj );
set_win32_error( ERROR_INVALID_THREAD_ID );
set_error( STATUS_INVALID_CID );
return NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment