| 
 DirectDraw: 
  Adapter Information 
By: Jack Hoxley 
Written: August 2000 
  Download: 
  DxInfo_src.Zip
  (14kb) 
 
 
You may have noticed that several 
  games give you the option of selecting to use the hardware/software renderer 
  AND giving the hardware renderer as the graphics card name; for example on my 
  system "Hardware rendering through 3D Blaster Savage4".  
To get your application to do 
  this is extremely simple; and it also adds an extra, very neat feature for identifying 
  graphics cards. Just use this code: 
                                        
                                          
                                          
                                            
                                              
                                                
                                                  
                                                    
                                                      
                                                        
                                                          
                                                            
                                                              
                                                                
                                                                  
                                                                    
                                                                      
                                                                         Public Function GetAdapterInfo(ByRef 
      Name As String, ByRef GUID As String) 
      Dim Info As DirectDrawIdentifier 
      Set Info = DD.GetDeviceIdentifier(DDGDI_DEFAULT) 
      Name = Info.GetDescription 
      GUID = Info.GetDeviceIndentifier 
      End Function 
       
      'Then use the function like so: 
       
      Dim CardName as string, CardGUID as string 
      Call GetAdapterInfo(CardName, CardGUID) | 
                                                                       
                                                                    
                                                                   
                                                                 | 
                                                               
                                                            
                                                           
                                                         | 
                                                       
                                                    
                                                   
                                                 | 
                                               
                                            
                                           
                                          
                                         
You can now use the card name 
  as any normal string.... 
But what about the GUID bit? 
  well, this is more important than you may believe - the string returned will 
  be totally unique for the graphics card - all Voodoo 3 2000 PCI cards will have 
  the same GUID and all 3D Blaster Savage4 cards will have the same GUID - but 
  no two (different) cards will have the same GUID. You may well think that you can identify 
  a graphics card using it's name, in theory you could; but it's not guaranteed 
  to be 100% accurate - driver revisions may well change the name slightly (for 
  example). 
You may well want to identify 
  the card using the GUID should you know through testing that your game doesn't 
  work ever on a certain card. If you identify the GUID for the problem card you 
  can alert users to this problem before they run the program... 
There are other things that you 
  can get from the "DirectDrawIdentifier" type - but most of them are 
  useless really: 
   
    | Property | 
    What it means | 
   
   
    | GetDescription | 
    This is the 
      name of the card | 
   
   
    | GetDeviceID | 
    A number unique 
      to the chipset, this is not unique to the graphics card. Any graphics card 
      that has, for example, an nvidia Riva TNT 2 chipset will have the same value. | 
   
   
    | GetDeviceIdentifier | 
    This is the 
      GUID - we've already discussed this... | 
   
   
    | GetDriver | 
    This returns 
      the name of the driver, almost always the DLL filename...  | 
   
   
    | GetDriverSubVersion | 
    Returns the 
      Low part of the version number, you should not use this to track specific 
      cards. | 
   
   
    | GetDriverVersion | 
    Returns the 
      high part of the version number, again, do not use for identification | 
   
   
    | GetRevision | 
    returns the 
      revision of the chipset - not the driver | 
   
   
    | GetSubSysID | 
    Returns a number 
      representing the graphics subsytem. Typically, this means the particular 
      board. | 
   
   
    | GetVendorID | 
    Returns a number 
      representing the manufacturer, such as "Guillemot" or "Creative 
      Labs" - it's only a number though... | 
   
   
    | GetWHQLLevel | 
    The Windows 
      Hardware Quality Level for the current hardware/driver setup  | 
   
 
You should now be able to identify 
  everything you'll ever need about the current video card... 
                                       |