LsaClose function (ntsecapi.h)

The LsaClose function closes a handle to a Policy or TrustedDomain object.

Syntax

NTSTATUS LsaClose(
  [in] LSA_HANDLE ObjectHandle
);

Parameters

[in] ObjectHandle

A handle to a Policy object returned by the LsaOpenPolicy function or to a TrustedDomain object returned by the LsaOpenTrustedDomainByName function. Following the completion of this call, the handle is no longer valid.

Return value

If the function succeeds, the return value is STATUS_SUCCESS.

If the function fails, the return value is an NTSTATUS code. For more information, see LSA Policy Function Return Values.

You can use the LsaNtStatusToWinError function to convert the NTSTATUS code to a Windows error code.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header ntsecapi.h
Library Advapi32.lib
DLL Advapi32.dll

See also

LsaOpenPolicy