小弟急用,请大侠们帮忙,有示例更好,Mail to :[email protected]关于获取硬盘、主板、CPU物理序列号,万分感谢!!!!  UP有分
关于获取硬盘、主板、CPU物理序列号,万分感谢!!!!  UP有分
关于获取硬盘、主板、CPU物理序列号,万分感谢!!!!  UP有分

解决方案 »

  1.   

    http://www.easthot.net/dl_search.asp?search=%D3%B2%C5%CC&submit1=+%CB%D1%CB%F7+&num=10
      

  2.   

    网上四处都是..
    找一下就是了...
    CSDN里都有..
      

  3.   

    Declare Sub GetSystemInfo Lib "kernel32" (lpSystemInfo As SYSTEM_INFO)
    Type SYSTEM_INFO
        dwOemID As Long
        dwPageSize As Long
        lpMinimumApplicationAddress As Long
        lpMaximumApplicationAddress As Long
        dwActiveProcessorMask As Long
        dwNumberOrfProcessors As Long              'Cpu的序号
        dwProcessorType As Long                    'Cpu的类型
        dwAllocationGranularity As Long
        dwReserved As Long
    End Type '取得CPU的序列号
    Function getCpuSN(sRoot As String) As Long
        Dim SInfo As SYSTEM_INFO
        'Get the system information
        GetSystemInfo SInfo
        'Print it to the form
    '    Me.Print "Number of procesor:" + Str$(SInfo.dwNumberOrfProcessors)
    '    Me.Print "Processor:" + Str$(SInfo.dwProcessorType)
    '    Me.Print "Low memory address:" + Str$(SInfo.lpMinimumApplicationAddress)
    '    Me.Print "High memory address:" + Str$(SInfo.lpMaximumApplicationAddress)
    getCpuSN = SInfo.dwOemID
    End Function
      

  4.   

    '下面的代码可以得到系统里面所有硬盘的标示名称和序列号
    Dim objNamespace, objDiskSet, objDisk
    Set objNamespace = GetObject("winmgmts:")
    Set objDiskSet = objNamespace.InstancesOf("Win32_DiskDrive")
    For Each objDisk In objDiskSet'我的是:ST3120022A
        Debug.Print objDisk.Signature'我的是:417405152
    Next
      

  5.   

    >> 回复人: bluelang(多情浪子) ( ) 信誉:100  我试了你的代码,用来取CPUID的为什么取出来的是0啊,CPU类型和内存支持都是对的
      

  6.   

    >> 回复人: bluelang(多情浪子) ( ) 信誉:100对于取硬盘序列号的代码,我试了,弹出个错误:对象不支持该属性或方法
    在   Debug.Print objDisk.Signature'我的是:417405152  处
      

  7.   

    硬盘序列号已经获得,那位能再提供CPU或主板的就结帐发分啦!!!!听说取CPU的序列号时只能对P3的,不知道是不是
      

  8.   

    http://www.csdn.net/cnshare/soft/20/20141.shtm
    cpu序列号纯vb原程序
      

  9.   

    不能下呀,上边的兄弟能不能发给我一个呀[email protected]
      

  10.   

    是:"胡俊杰" <[email protected]>吗
     我已经收到了,万分感谢!!!!! >>该文件摘取自intel的获取序列号的方法对别的CPU有没有效呀
      

  11.   

    建立一个新工程,在Form1中添加一个TextBox控件以及一个CommandButton控件,在CommandButton的Click事件中写入以下的代码:Private Sub Command1_Click()
        Dim s, System, item
        Dim i As Integer
        Set System = GetObject("winmgmts:").InstancesOf("Win32_ComputerSystem")
        For Each item In System        'List1.AddItem item.cputype
            s = "Computer Info" & vbCrLf
            s = s & "***********************" & vbCrLf
            s = s & "计算机名称: " & item.name & vbCrLf
            s = s & "状态: " & item.Status & vbCrLf
            s = s & "类型: " & item.SystemType & vbCrLf
            s = s & "生产厂家: " & item.Manufacturer & vbCrLf
            s = s & "型号: " & item.Model & vbCrLf
            s = s & "内存: ~" & item.totalPhysicalMemory \ 1024000 & "mb" & vbCrLf
            s = s & "域: " & item.domain & vbCrLf
            's = s & "工作组" & item.Workgroup & vbCrLf '获得工作组和域的选项不能同时用 
            s = s & "当前用户: " & item.username & vbCrLf
            s = s & "启动状态" & item.BootupState & vbCrLf
            s = s & "该计算机属于" & item.PrimaryOwnerName & vbCrLf
            s = s & "系统类型" & item.CreationClassName & vbCrLf
            s = s & "计算机类类型" & item.Description & vbCrLf        For i = 0 To 1  '这里假设安装了两个系统 
                s = s & Chr(5) & "启动选项" & i & " :" & item.SystemStartupOptions(i) _ 
                    & vbCrLf 
            Next i 
        Next
        Text1.Text = s 
    End Sub 
        运行程序,点击Command1,在textBox中就可以显示计算机的信息。以上是WMI编程示例,
    使用WMI可以做出“Windows优化大师”一样的软件。
    更多WMI编程信息请访问以下信息中给出的网址。http://b4018.xici.net(新任版主,欢迎光临。)
    提供:VB、VBA、Office二次开发免费技术支持;
    承接:各类项目开发,如MIS系统,WEB网站,中小型应用软件等等;CO.:Vansoft Workroom
    MSN:[email protected]
    Email:[email protected]
           [email protected]
    TEL:025-86685867(范,24H)
      

  12.   

    呵呵, 没在别在amd的试过。 我公司的都是intel的,你试试, 告诉我结果。
    不过amd的也有cpuid的指令集