打开你的项目文件 TaoBaoAPI(文件类型:Visual C# Project file)
更改Project 项 ToolsVersion="40"
打开你的项目属性文件 TaoBaoAPIcsproj(文件类型:Visual Studio Project User Options file) 更改 Project 项 ToolsVersion="40"
Private Function 硬盘序列号() As StringTry
Dim myInfo As MicrosoftWin32RegistryKey = MyComputerRegistryLocalMachineOpenSubKey("HARDWARE\DEVICEMAP\Scsi\Scsi Port 0\Scsi Bus 1\Target Id 0\Logical Unit Id 0")
硬盘序列号 = Trim(myInfoGetValue("SerialNumber"))
Catch
Try
Dim myInfo As MicrosoftWin32RegistryKey = MyComputerRegistryLocalMachineOpenSubKey("HARDWARE\DEVICEMAP\Scsi\Scsi Port 1\Scsi Bus 1\Target Id 0\Logical Unit Id 0")
硬盘序列号 = Trim(myInfoGetValue("SerialNumber"))
Catch
硬盘序列号 = ""
End Try
End Try
End Function
只在我的电脑上试过,你试下
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)