Detect DX version (and OpenGL version) installed?

BlitzMax Forums/BlitzMax Programming/Detect DX version (and OpenGL version) installed?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

when I run it on my computer, it returns:

DirectX Version : 4.09.00.0904

If I check DXDiag, it says "DirectX 9.0c(4.09.00.0904)

Any idea how to find out the 'friendly' version number based on the long string returned by the code above?

(I mean, I wouldn't have interpreted 4.09.00.0904 as 9.0c myself... And Of course have no idea how 9.0b, 9.0a or 8.0 would be represented either)