This topic has not yet been rated - Rate this topic

NtClose function

Applies to: desktop apps only

Deprecated. Closes the specified handle. NtClose is superseded by CloseHandle.

Syntax

NTSTATUS WINAPI NtClose(
  __in  HANDLE Handle
);

Parameters

Handle [in]

The handle being closed.

Return value

The various NTSTATUS values are defined in NTSTATUS.H, which is distributed with the Windows DDK.

Return codeDescription
STATUS_SUCCESS

The handle was closed.

 

Remarks

The NtClose function closes handles to the following objects.

  • Access token
  • Communications device
  • Console input
  • Console screen buffer
  • Event
  • File
  • File mapping
  • Job
  • Mailslot
  • Mutex
  • Named pipe
  • Process
  • Semaphore
  • Socket
  • Thread

Because there is no import library for this function, you must use GetProcAddress.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Winternl.h

DLL

Ntdll.dll

 

 

Build date: 4/6/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ