This is how it's done usually: Just try to D3D11CreateDevice()
with all parameters you expect as to be fine, including D3D_DRIVER_TYPE_HARDWARE
(try different feature levels in the loop, to find out best). If this will fail, roll back to WARP. If WARP will fail, roll back to software, D3D9, GL, etc. If all possible variants will fail, notify user that he needs to upgrade his machine and/or OS =)
Each try you check return code, and device and context pointers. When you found (HRESULT == S_OK) && (device != 0) && (context != 0)
- Bingo!
Hope it helps.