CloseSamUser function

The CloseSamUser function closes a handle to a Security Accounts Manager (SAM) user account.

Syntax


NTSTATUS CloseSamUser(
  _In_ PVOID UserHandle
);

Parameters

UserHandle [in]

A handle to the SAM user account previously opened using the OpenSamUser function.

Return value

If the function succeeds, the return value is STATUS_SUCCESS.

If the function fails, the return value is an NTSTATUS code indicating the reason. The following table lists a common reason for failure and the error code that the function returns.

Return codeDescription
STATUS_INVALID_HANDLE

The value specified for UserHandle is not valid or NULL.

 

Remarks

A pointer to the CloseSamUser function is available in the LSA_SECPKG_FUNCTION_TABLE structure received by the SpInitialize function.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Ntsecpkg.h

See also

OpenSamUser
LSA_SECPKG_FUNCTION_TABLE
SpInitialize

 

 

Show: