Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Video Card Drivers

  1. #11

    Video Card Info

    I got it to work, kinda.
    I can populate the ID structure but it doesn't have all the info I need.
    I can get the card name but no version numbers for the driver.
    Looking at the .pas file section from above the code completion doesn't show all the fields that are in your example.
    I am going to try the files from http://clootie.narod.ru/delphi/DX90/ because I have DirectX9 and I think the DelphiX stuff I have is for DirectX7.
    Thanks for your help so far.
    Chris Iverson
    <br />http://mywebpages.comcast.net/civerson

  2. #12

    Video Card Info

    This is what I have so far.

    [pascal]
    procedure TForm1.Button1Click(Sender: TObject);
    var
    DD : TDirectDraw;
    DXDriver : TDirectXDriver;
    ID: TDDDeviceIdentifier;

    begin
    DXDriver := dxdraw1.Drivers[0];
    dd := TDirectDraw.Create(DXDriver.GUID);
    dd.IDraw7.GetDeviceIdentifier(id, 1);

    ListBox1.Items.Add('Description: ' + id.szDescription);
    ListBox1.Items.Add('Driver Name: ' + DXDriver.DriverName);
    ListBox1.Items.Add('Driver Version: ' + id.szDriver);
    ListBox1.Items.Add('Device ID: ' + IntToStr(id.dwDeviceId));
    ListBox1.Items.Add(IntToStr(id.dwRevision));
    ListBox1.Items.Add(IntToStr(id.dwSubSysId));
    ListBox1.Items.Add(IntToStr(id.liDriverVersion));
    end;
    [/pascal]
    Chris Iverson
    <br />http://mywebpages.comcast.net/civerson

  3. #13

    Video Card Info

    The code above is kinda working. The id.liDriverVersion does not get a value. In VB it uses a low and hi. This is just an int64.

    Ideas?
    Chris Iverson
    <br />http://mywebpages.comcast.net/civerson

  4. #14

    Video Card Drivers

    Right, I've finally found a Delphi 7 compatible version of DelphiX and I've installed it (from Maxx's Delphi site, got from an old Turbo post I remembered).

    Note that if you have a TDXDraw component (you should!) then you can get access to the DDraw of it. I tried using IDraw7 and it raised an exception for some reason, but it works with IDraw4 -- I guess there's a property or {$DEFINE} somewhere that controls what version of DirectDraw DelphiX will target, but I don't know it since this is my first time looking at it.

    Bad news and good news. I tried the liDriverVersion field but for me, it gives 0 (no info ). The good news is that you _should_ be able to typecast it to a _LARGE_INTEGER structure to retrieve the relevant parts. The following code shows all the info. If you get 0 results then that probably means that you're out of luck getting info for that particular graphics card.

    [pascal]procedure TForm1.BitBtn1Click(Sender: TObject);
    var
    id: TDDDeviceIdentifier;
    Temp: _LARGE_INTEGER;
    begin
    dxdraw1.DDraw.IDraw4.GetDeviceIdentifier(id, 0);
    Showmessage(inttostr(id.liDriverVersion));

    Temp := _LARGE_INTEGER(id.liDriverVersion);
    ShowMessage(IntToStr(HIWORD(Temp.HighPart)));
    ShowMessage(IntToStr(LOWORD(Temp.HighPart)));
    ShowMessage(IntToStr(HIWORD(Temp.LowPart)));
    ShowMessage(IntToStr(LOWORD(Temp.LowPart)));
    ShowMessage(id.szDriver);
    ShowMessage(id.szDescription);
    ShowMessage(IntToStr(id.dwVendorId));
    ShowMessage(IntToStr(id.dwDeviceId));
    ShowMessage(IntToStr(id.dwSubSysId));
    ShowMessage(IntToStr(id.dwRevision));
    end;[/pascal]
    "All paid jobs absorb and degrade the mind."
    <br />-- Aristotle

Page 2 of 2 FirstFirst 12

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
  •