Fixed a couple of error codes.

This commit is contained in:
Alexandre Julliard 2005-07-29 14:41:14 +00:00
parent e491e8f897
commit f895ad180d
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;
}