如何得到win98下的显卡类型?我查了WMI的函数都是for win2000的

解决方案 »

  1.   

    怎样得到显卡、声卡的型号,请赐教? (请以代码说明)  
    ---------------------------------------------------------------  
     
    '用WMI,工程-引用  Microsoft  WMI  Scripting  V1.1  Library  
    '以下是获得显卡型号  
     
    Private  Sub  Command1_Click()  
           wmiVideoControllerInfo  
    End  Sub  
     
    Private  Sub  wmiVideoControllerInfo()  
         Dim  wmiObjSet  As  SWbemObjectSet  
         Dim  obj  As  SWbemObject  
         Set  wmiObjSet  =  GetObject("winmgmts:{impersonationLevel=impersonate}").  _  
                                                       InstancesOf("Win32_VideoController")  
         On  Local  Error  Resume  Next  
           
         For  Each  obj  In  wmiObjSet  
               MsgBox  obj.VideoProcessor  
         Next  
     
    End  Sub  
     
    '用WMI,记得先工程-引用  Microsoft  WMI  Scripting  V1.1  Library  
    '以下是获得声卡型号  
     
    Private  Sub  Command1_Click()  
           wmiSoundDeviceInfo  
    End  Sub  
     
    Private  Sub  wmiSoundDeviceInfo()  
     
         Dim  wmiObjSet  As  SWbemObjectSet  
         Dim  obj  As  SWbemObject  
           
         Set  wmiObjSet  =  GetObject("winmgmts:{impersonationLevel=impersonate}").  _  
                                                       InstancesOf("Win32_SoundDevice")  
         On  Local  Error  Resume  Next  
           
         For  Each  obj  In  wmiObjSet  
               MsgBox  obj.ProductName  
         Next  
    End  Sub  
     
     
    总结文章  
     
    在VB中使用WMI获取系统硬件和软件有关信息  
    http://www.csdn.net/Develop/read_article.asp?id=23371
      

  2.   

    非常感谢,这些代码我都运行过,在win2000以上都是正常的,但是在win98下是无法取出来的。我现在除了读注册表以外还没有找到更好的办法
      

  3.   

    是啊,win98不支持该方法
    看能不能通过API函数实现,回家试一试。