StartSessionKeyRefresh function

Gets a random number that can be used to refresh the session key.


VOID APIENTRY* StartSessionKeyRefresh(
  _In_    D3D10DDI_HDEVICE          hDevice,
  _In_    D3D11_1DDI_HCRYPTOSESSION hCryptoSession,
  _Inout_ UINT                      RandomNumberSize,
  _In_    VOID                      *pRandomNumber


hDevice [in]

A handle to the display device (graphics context).

hCryptoSession [in]

A handle to the cryptographic session object that was created through a call to the CreateCryptoSession function.

RandomNumberSize [in, out]

The size, in bytes, of the number in the buffer that is referenced by the pRandomNumber parameter.

pRandomNumber [in]

A pointer to a buffer that contains the status sequence number for the random start.

Return value

This function does not return a value.


The hardware and driver can optionally support StartSessionKeyRefresh for all cryptographic types.

When the Microsoft Direct3D runtime calls the driver's StartSessionKeyRefresh function, the driver generates and saves a random number and returns it in the buffer that the pRandomNumber parameter points to. When the runtime subsequently calls the driver's FinishSessionKeyRefresh function, the driver refreshes the session key by performing an XOR operation of the random number with the key.


Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Target platform


D3d10umddi.h (include D3d10umddi.h)

See also




Send comments about this topic to Microsoft