D3DKMT_OPENRESOURCE structure (d3dkmthk.h)

The D3DKMT_OPENRESOURCE structure describes parameters for opening a resource.

Syntax

typedef struct _D3DKMT_OPENRESOURCE {
  [in]     D3DKMT_HANDLE hDevice;
  [in]     D3DKMT_HANDLE hGlobalShare;
  [in]     UINT          NumAllocations;
  union {
    [in/out] D3DDDI_OPENALLOCATIONINFO  *pOpenAllocationInfo;
             D3DDDI_OPENALLOCATIONINFO2 *pOpenAllocationInfo2;
  };
  [in]     VOID          *pPrivateRuntimeData;
  [in]     UINT          PrivateRuntimeDataSize;
  [in/out] VOID          *pResourcePrivateDriverData;
  [in]     UINT          ResourcePrivateDriverDataSize;
  [in/out] VOID          *pTotalPrivateDriverDataBuffer;
  [in/out] UINT          TotalPrivateDriverDataBufferSize;
  [out]    D3DKMT_HANDLE hResource;
} D3DKMT_OPENRESOURCE;

Members

[in] hDevice

A handle to the device that the resource and allocations are associated with.

[in] hGlobalShare

A handle to the shared resource to open.

[in] NumAllocations

The number of elements in the array that pOpenAllocationInfo specifies, which represents the number of allocations that are associated with the resource.

[in/out] pOpenAllocationInfo

An array of D3DDDI_OPENALLOCATIONINFO structures that describe each allocation to update.

pOpenAllocationInfo2

This member is reserved and should be set to zero.

This member is available beginning with Windows 7.

[in] pPrivateRuntimeData

A pointer to a caller-supplied buffer where the OpenGL runtime copies private data that is associated with the resource.

[in] PrivateRuntimeDataSize

The size, in bytes, of the buffer that pPrivateRuntimeData points to.

[in/out] pResourcePrivateDriverData

A pointer to a buffer that receives the private data that is associated with the resource. This data is per resource and not per allocation.

[in] ResourcePrivateDriverDataSize

The size, in bytes, of the buffer that pResourcePrivateDriverData points to.

[in/out] pTotalPrivateDriverDataBuffer

A pointer to a buffer that receives the private data for all of the allocations that are associated with the resource. The caller should never access this private data directly.

[in/out] TotalPrivateDriverDataBufferSize

On input, the size, in bytes, of the buffer that pTotalPrivateDriverDataBuffer points to. On output, this member specifies the size, in bytes, of data that is written to the buffer that pTotalPrivateDriverDataBuffer points to.

[out] hResource

A D3DKMT_HANDLE data type that represents a kernel-mode handle to the newly opened shared resource that is associated with the allocations.

Requirements

Requirement Value
Minimum supported client Windows Vista
Header d3dkmthk.h (include D3dkmthk.h)

See also

D3DDDI_OPENALLOCATIONINFO

D3DKMTOpenResource