It works like this - you decide the absolute minimum version of DirectX you'll support. In the code, you request the corresponding IIDs for this version. Then, to use later versions, you use QueryInterface() to grab the new IIDs you want. If QueryInterface() fails, you fallback on the old IID... if it succeeds, you throw away the old IID and use the new IID.
Just a suggestion.
Mason McCuskey
Spin Studios
www.spin-studios.com