Okay, So I would like my engine to detect weather or not it can use DirectX 10, if it can't it defaults to DirectX 9.0c but, the function DirectXSetupGetVersion() will only return Versions 5 through 9. Could someone point me to what could tell me the device capabilities? Thank you for your time.
Detect the OS version. If you are on XP or below, you are limited to 9. Using the DirectXSetup API isn't terribly useful, instead you should look at device capability bits to determine what features are supported (and to what extent) and tailor your code based on that.
If you are on Vista or above, you can use the D3D11 API. When you initialize D3D11, you can specify and/or query for the feature levels supported. You could also just attempt to initialize D3D10 and see if it fails.
In all cases, you should package the appropriate runtime redistributable(s) with your application installer to ensure the DLLs are available at runtime.
Try a LoadLibrary on d3d10.dll - that'll tell you quickly enough if Direct3D 10 is available.
The user could quite easily pop a DLL called "d3d10.dll" in their program folder which would break this.
If you statically link to the Direct3D 10 libs then trying to run the program on XP or below just won't work anyway; Direct3D 10 or above is just not available for these Windows versions.
Direct3D 10 is always gonna be installed anyway on Windows Vista or higher (whether or not it can actually run a Direct3D 10 program is another matter).
I think we need more info, such as what versions of Windows you're targetting, before we can definitively answer this one.