> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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.

## Syntax

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

### Parameters

*pDesc \[in]*\
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]*\
Type: const IID &

A reference to the globally unique identifier (**GUID**) of the [ID3D12ProtectedResourceSession](https://docs.xbox.com/reference/graphics/d3d12/interfaces/id3d12protectedresourcesession/id3d12protectedresourcesession_public.md) interface.

*ppSession \[out]*\
Type: void \*\*

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

### Return value

Type: HRESULT

## Remarks

## Requirements

**Header:** d3d12\_xs.h\
**Library:** d3d12\_xs.lib\
**Supported Platforms**: XBOX Series consoles

## See Also


## Related topics

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