I'm trying to work with a directx 12 sample using windows 10 sdk, visual studio 2015, on windows 7 SP1. I get the following error

The procedure entry point CreateFile2 could not be located in the dynamic link library Kernel32.dll

  • 2
    \$\begingroup\$ DirectX 12 requires Windows 10. \$\endgroup\$ Oct 23, 2016 at 15:05
  • 1
    \$\begingroup\$ CreateFile2 - "Minimum supported client : Windows 8" - this is aside from the Windows 10 requirement to use D3D12. \$\endgroup\$ Oct 23, 2016 at 17:22

1 Answer 1


According to Microsoft itself the latest DirectX version supported on Windows 7 SP1 is "DX11.1". Even on Windows 8 you don't have access to DX12. I guess that's what causing the problem. No matter what, you won't be able to develop a DX12 app on any version of windows beside Win10.

  • \$\begingroup\$ That's correct. You can use the Windows 10 SDK to build a desktop application on Windows 7 Service Pack 1, but you must use APIs that are supported by Windows 7 Service Pack 1 if you want to run it on that system. Typically this is handled by setting _WINNT_WIN32 to 0x0601 for Windows 7 or 0x0A00 for Windows 10. Unsupported COM-based APIs will of course fail to create. See Using the Windows Headers. \$\endgroup\$ Oct 24, 2016 at 16:37
  • \$\begingroup\$ As noted, DirectX 12 is only supported on Windows 10. CreateFile2 is supported on Windows 8.0, Windows 8.1, and Windows 10. Again, it is possible to write a desktop application that uses DirectX 12 on Windows 10 and falls back to DirectX 11 for Windows 7 SP1, but this requires careful planning. For simplicity, most of our DX12 developer education material is assuming you are running Windows 10 and makes other assumptions such as CreateFile2 being supported--as to why CreateFile2 exists in the first place, this is to support the AppContainer security context used by Windows Store. \$\endgroup\$ Oct 24, 2016 at 16:39
  • 1
    \$\begingroup\$ If you have Windows 7 and don't wish to upgrade to Windows 10, you can stick with DirectX 11 (specifically 11.1). Of course, even if are using Windows 10 you may still want to stick with DirectX 11. DirectX 12 is an expert API and is very unforgiving, and assumes you already are an expert DirectX 11 user. See DirectX Tool Kit. \$\endgroup\$ Oct 24, 2016 at 16:49
  • 1
    \$\begingroup\$ One last note, you should technically be able to write your code on Windows 7 device, and remotely debug it on a Windows 10 device. \$\endgroup\$
    – Ali1S232
    Oct 24, 2016 at 16:53
  • 1
    \$\begingroup\$ sadly, this answer is false. There are ways to have DX12 APIs on any hardware that supports Vulkan, namely github.com/HansKristian-Work/vkd3d-proton (also, you can get D3D 11 higher than D3D 11.1 by using github.com/doitsujin/dxvk), and there is also microsoft.github.io/DirectX-Specs/d3d/D3D12onWin7.html (which is more tricky, but still viable). I'm not saying those options are reasonable here (they require some arguable effort TBH), but just saying No matter what, you won't be able to develop a DX12 app on any version of windows beside Win10. is just blatantly false. \$\endgroup\$
    – user213769
    Jun 25, 2023 at 21:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .