Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 1.17 KB

ntclose.md

File metadata and controls

21 lines (16 loc) · 1.17 KB

Closes the specified kernel handle. This function is documented in Windows Driver Kit here and here.

Parameters

  • Handle - a handle to a kernel object.

Notable return values

  • STATUS_INVALID_HANDLE - an invalid handle value was specified.
  • STATUS_HANDLE_NOT_CLOSABLE - the provided handle is marked as protected from closing. See OBJ_PROTECT_CLOSE for more details.

Remarks

NtClose is one the few Native API functions that can raise exceptions instead of returning an error status code. See the exploit protection reference for a description of the mitigation that causes this behavior.

Related Win32 API

See also

  • OBJ_PROTECT_CLOSE
  • NtMakeTemporaryObject
  • NtDuplicateObject
  • NtQueryObject
  • NtSetInformationObject