-2
\$\begingroup\$

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

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

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.

\$\endgroup\$
  • \$\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\$ – Chuck Walbourn Oct 24 '16 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\$ – Chuck Walbourn Oct 24 '16 at 16:39
  • \$\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\$ – Chuck Walbourn Oct 24 '16 at 16:49
  • \$\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 '16 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.