D3DKMTShareObjects function

Shares resource objects that were created with the D3DKMTCreateAllocation, D3DKMTCreateKeyedMutex2, and D3DKMTCreateSynchronizationObject2 functions.

Syntax

NTSTATUS D3DKMTShareObjects(
  UINT                cObjects,
  const D3DKMT_HANDLE *hObjects,
  POBJECT_ATTRIBUTES  pObjectAttributes,
  DWORD               dwDesiredAccess,
  HANDLE              *phSharedNtHandle
);

Parameters

cObjects

The number of resource objects specified by the hObjects parameter.

The number of resource objects must be ≤D3DKMT_MAX_OBJECTS_PER_HANDLE.

hObjects

A pointer to an array of local kernel-mode handles that specify the resource objects to be shared.

For more information on using hObjects, see the Remarks section.

pObjectAttributes

A pointer to an OBJECT_ATTRIBUTES structure that specifies attributes of the resource objects.

dwDesiredAccess

Specifies read and write access for the resource.

phSharedNtHandle

A pointer to a shared NT handle that specifies the resource objects.

This parameter must be NULL if the NtSecuritySharing flag value is not set. For more information, see the Remarks section.

Return Value

None

Remarks

Objects to be shared using D3DKMTShareObjects must first be created with the NtSecuritySharing flag value set. This flag value is available in the D3DKMT_CREATEALLOCATIONFLAGS, D3DKMT_CREATEKEYEDMUTEX2_FLAGS, and D3DDDI_SYNCHRONIZATIONOBJECT_FLAGS structures.

This function must specify handles through the hObjects parameter only to the following combinations of input object array types:

  • an allocation
  • an allocation, a keyed mutex, and a synchronization object
  • a synchronization object
The operating system will reject any other input handle combinations.

Requirements

   
Minimum supported client Windows 8
Minimum supported server Windows Server 2012
Target Platform Universal
Header d3dkmthk.h (include D3dkmthk.h)
Library Gdi32.lib
DLL Gdi32.dll

See Also

D3DDDI_SYNCHRONIZATIONOBJECT_FLAGS

D3DKMTCreateAllocation

D3DKMTCreateKeyedMutex2

D3DKMTCreateSynchronizationObject2

D3DKMT_CREATEALLOCATIONFLAGS

D3DKMT_CREATEKEYEDMUTEX2_FLAGS