直接给程序:     Dim sDeviceHWID As String
     Dim bDevInfo() As Byte     Dim Arr() As String
     Dim i as Integer     sDeviceHWID = StrConv(bDevInfo, vbUnicode)
     If Arr(i) = sDeviceHardwareID Then
     ...
     End If
这样是不是因为sDeviceHWID和Arr(i)的类型不同, 永远不能成立?  我用两个Textbox看值是相同的.

解决方案 »

  1.   

    刚查了下资料, 好像是需要把Byte型转成String型才行. 不知道是不是?
      

  2.   

    前后的程序都没有,不知道你要做什么.
        Dim sDeviceHWID As String
        Dim bDevInfo() As Byte    Dim Arr() As String
        Dim i As IntegerReDim Preserve bDevInfo(3)
    bDevInfo(0) = &H72
    bDevInfo(1) = &H32
    bDevInfo(2) = &H45
    bDevInfo(3) = &H63    sDeviceHWID = StrConv(bDevInfo, vbUnicode)
        If Arr(i) = sDeviceHWID Then
    '    ...
        End If但,Arr(i)从何而来?不知道它的值,怎么比!