> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CreateProtectedResourceSession (XBOX Series consoles)

> Creates an object that represents a session for content protection.

Creates an object that represents a session for content protection. You can then provide that session when you're creating resource or heap objects, to indicate that they should be protected.

<Note>
  Memory contents can't be transferred from a protected resource to an unprotected resource.
</Note>

## Syntax

```cpp theme={null}
HRESULT CreateProtectedResourceSession(
    const D3D12_PROTECTED_RESOURCE_SESSION_DESC  pDesc,
    const IID & riid,
    void  ppSession
)
```

### Parameters

*pDesc \[in]*<br />Type: const D3D12\_PROTECTED\_RESOURCE\_SESSION\_DESC \*

A pointer to a constant **D3D12\_PROTECTED\_RESOURCE\_SESSION\_DESC** structure, describing the session to create.

*riid \[in]*<br />Type: const IID &

A reference to the globally unique identifier (**GUID**) of the [ID3D12ProtectedResourceSession](/reference/graphics/d3d12/interfaces/id3d12protectedresourcesession/id3d12protectedresourcesession_public) interface.

*ppSession \[out]*<br />Type: void \*\*

A pointer to a memory block that receives an [ID3D12ProtectedResourceSession](/reference/graphics/d3d12/interfaces/id3d12protectedresourcesession/id3d12protectedresourcesession_public) interface pointer to the created session object.

### Return value

Type: HRESULT

## Remarks

## Requirements

**Header:** d3d12\_xs.h<br />**Library:** d3d12\_xs.lib<br />**Supported Platforms**: XBOX Series consoles

## See Also


## Related topics

- [CreateShaderCacheSession (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device9/methods/id3d12device9_createshadercachesession_public.md)
- [CreateHeap1 (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device4/methods/id3d12device4_createheap1_public.md)
- [CreateReservedResource1 (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device4/methods/id3d12device4_createreservedresource1_public.md)
- [CreateReservedResource2 (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device10/methods/id3d12device10_createreservedresource2_public.md)
- [CreateCommittedResource3 (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device10/methods/id3d12device10_createcommittedresource3_public.md)
