If necessary, the caller can override one or both defaults by setting the DUPLICATE_SAME_ATTRIBUTES and DUPLICATE_SAME_ACCESS flags in the Options parameter. The calling process must have PROCESS_DUP_HANDLE access to the target process.īy default, the duplicate handle is created with the attributes specified by the HandleAttributes parameter, and with the access rights specified by the DesiredAccess parameter. The duplicate handle is created in the handle table of the specified target process. The calling process must have PROCESS_DUP_HANDLE access to the source process. The source handle is evaluated in the context of the specified source process. Otherwise, it returns an appropriate error status code. ZwDuplicateObject returns STATUS_SUCCESS if the call is successful. Instead of using the DesiredAccess parameter, copy the access rights from the source handle to the target handle. Instead of using the HandleAttributes parameter, copy the attributes from the source handle to the target handle. Set this parameter to zero or to the bitwise OR of one or more of the following flags. For more information about attributes, see the description of the Attributes member in OBJECT_ATTRIBUTES.Ī set of flags to control the behavior of the duplication operation. This parameter is optional and can be specified as NULL if no duplicate handle is to be created.Īn ACCESS_MASK value that specifies the desired access for the new handle.Ī ULONG that specifies the desired attributes for the new handle. The duplicated handle is valid in the specified target process. This parameter is optional and can be specified as NULL if the DUPLICATE_CLOSE_SOURCE flag is set in Options.Ī pointer to a HANDLE variable into which the routine writes the new duplicated handle. HANDLE TargetProcessHandle,Ī handle to the source process for the handle being duplicated.Ī handle to the target process that is to receive the new handle. Syntax NTSYSAPI NTSTATUS ZwDuplicateObject( The ZwDuplicateObject routine creates a handle that is a duplicate of the specified source handle.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |