LSA_DUPLICATE_HANDLE callback function (ntsecpkg.h)

The DuplicateHandle function creates a duplicate handle. The returned duplicate is in the caller's process space.

Syntax

LSA_DUPLICATE_HANDLE LsaDuplicateHandle;

NTSTATUS LsaDuplicateHandle(
  [in]  HANDLE SourceHandle,
  [out] PHANDLE DestionationHandle
)
{...}

Parameters

[in] SourceHandle

A handle to duplicate.

[out] DestionationHandle

Pointer that receives the address of a duplicate of the SourceHandle handle. The duplicate handle is in the caller's process space. When you have finished using the handle, close it by calling the CloseHandle 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 it failed.

Remarks

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

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header ntsecpkg.h

See also

LSA_SECPKG_FUNCTION_TABLE

SpInitialize