Results 1 to 3 of 3

Thread: Obtaining the DirectX version with Delphi

  1. #1

    Obtaining the DirectX version with Delphi

    I'm writing a small system info program right now (I'll release it here when it's done) and for that I wanted to write a function that returns the DirectX version number as a string. Sounds pretty easy but it actually isn't (if you know otherwise, let me know).
    After looking around for some time I found an example program that came with the DirectX 9 SDK which basically tried two different methods to obtain the version number. The first method is to create an interface to DXDiag and obtain the version number from there, the second method is to check the version numbers of the DirectX DLL files.
    Long story short, I began by translating the DXDiag C header file to Delphi, then I translated the sample program from the DirectX SDK and then I rewrote it to make it look more like Delphi and less like C.
    So if you need to check the DirectX version number, you can download the header and example program here. Of course it's open source so do with it whatever you like. If you're having problems, please let me know.
    Ask me about the xcess game development kit

  2. #2

    Obtaining the DirectX version with Delphi

    it works but in dxdiag.pas. line 31 it should read

    Code:
      DXDIAG_E_INSUFFICIENT_BUFFER = $8007007A;
    not

    Code:
      DXDIAG_E_INSUFFICIENT_BUFFER = $8007007AL;
    otherwise it wont compile (well in delphi 7)

  3. #3

    Obtaining the DirectX version with Delphi

    damn you copy'n paste!

    Thanks.
    Ask me about the xcess game development kit

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •