ID3D12SDKConfiguration::SetSDKVersion method (d3d12.h)

Configures the SDK version to use.

Syntax

HRESULT SetSDKVersion(
  UINT   SDKVersion,
  LPCSTR SDKPath
);

Parameters

SDKVersion

Type: UINT

The SDK version to set.

SDKPath

Type: _In_z_ LPCSTR

A NULL-terminated string that provides the relative path to d3d12core.dll at the specified SDKVersion. The path is relative to the process exe of the caller. If d3d12core.dll isn't found, or isn't of the specified SDKVersion, then Direct3D 12 device creation fails.

Return value

Type: HRESULT

If the function succeeds, then it returns S_OK. Otherwise, it returns one of the Direct3D 12 return codes.

Remarks

This method can be used only in Windows Developer Mode.

To set the SDK version using this API, you must call it before you create the Direct3D 12 device. Calling this API after creating the Direct3D 12 device will cause the Direct3D 12 runtime to remove the device.

If the d3d12core.dll installed with the OS is newer than the SDK version specified, then the OS version is used instead.

You can retrieve the version of a particular D3D12Core.dll from the exported symbol D3D12SDKVersion, which is a variable of type UINT, just like the variables exported from applications to enable use of the Agility SDK.

Requirements

Requirement Value
Minimum supported client Windows 10 Build 20348
Minimum supported server Windows 10 Build 20348
Target Platform Windows
Header d3d12.h
Library D3D12.lib
DLL D3D12.dll