#ifndef _NTD3DKMT_H
// rev
/**
* Duplicates a graphics shared-allocation NT handle into a process in a guest VM.
* This is not a general-purpose DuplicateHandle replacement. SourceHandle needs READ_CONTROL.
* VirtualMachineId must be nonzero. TargetProcessId is a guest process ID, not a process handle.
* Only SAME_ACCESS is accepted in Flags; when set, DesiredAccess must be zero.
* The returned TargetHandle belongs to the guest process and must not be closed in the caller.
* Layout: 48 bytes on x64, 36 bytes on x86. Handles are native-width, not D3DKMT_HANDLE values.
*/
typedef struct _D3DKMT_DUPLICATEHANDLE
{
HANDLE SourceHandle;
GUID VirtualMachineId;
HANDLE TargetProcessId;
HANDLE TargetHandle;
ACCESS_MASK DesiredAccess;
ULONG Flags; // D3DKMT_DUPLICATEHANDLE_*
} D3DKMT_DUPLICATEHANDLE, *PD3DKMT_DUPLICATEHANDLE;
View code on GitHubNo description available.