DuplicateHandle function
Applies to: desktop apps only
The DuplicateHandle function creates a duplicate handle. The returned duplicate is in the caller's process space.
Syntax
NTSTATUS DuplicateHandle( __in HANDLE SourceHandle, __out PHANDLE DestinationHandle );
Parameters
- SourceHandle [in]
-
A handle to duplicate.
- DestinationHandle [out]
-
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
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
See also
Send comments about this topic to Microsoft
Build date: 3/13/2012