检索系统序列号... [英] Retrieving a system serial number...

查看:62
本文介绍了检索系统序列号...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何检索系统序列号?我正在写一个

审核程序,需要抓一点信息。


谢谢!

Does anyone know how to retrieve the system serial number? I''m writing an
auditing program and need to grab that little bit of info.

Thanks!

推荐答案

也许你可以使用下一个api-call中的序列号:

私有声明函数GetVolumeInformation Lib" Kernel32" Alias

" GetVolumeInformationA" (ByVal lpRootPathName As String,ByVal

lpVolumeNameBuffer As String,ByVal nVolumeNameSize As Long,

lpVolumeSerialNumber As Long,lpMaximumComponentLength As Long,

lpFileSystemFlags As Long,ByVal lpFileSystemNameBuffer As String,ByVal

nFileSystemNameSize As Long)As long


" Terry Olsen" <到****** @ hotmail.com>在消息中写道

新闻:Oa ************** @ TK2MSFTNGP11.phx.gbl ...
Maybe you can use the serialnumber from the next api-call:
Private Declare Function GetVolumeInformation Lib "Kernel32" Alias
"GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal
lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long,
lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long,
lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal
nFileSystemNameSize As Long) As Long

"Terry Olsen" <to******@hotmail.com> wrote in message
news:Oa**************@TK2MSFTNGP11.phx.gbl...
有谁知道如何检索系统序列号?我正在写一个
审核程序,需要抓一点信息。

谢谢!
Does anyone know how to retrieve the system serial number? I''m writing an
auditing program and need to grab that little bit of info.

Thanks!



特里,


没有真正的序列号,有时会有一个处理器号和

,计算机连接到局域网或无论使用什么网络适配器,

a Mac地址,可能还有更多数字,但据我所见,不是
总是存在唯一的。


您可以在这里阅读那些开始阅读的人(在此消息之后是一个小的

样本)。

http://msdn.microsoft .com / library / de ... Management.asp

http://msdn.microsoft.com/library/de...classtopic.asp

收藏中有很多收藏品。


我目前还没有这些数字的样本,但是请参阅

此示例如何获取驱动器信息。我不知道在哪里得到它

了。


\\\添加了对System.Management.dll的引用。

Dim disk As New ManagementObject(_

" Win32_LogicalDisk.DeviceID ="" C:""")

Dim diskProperty As PropertyData

For DiskProperty in disk.Properties

Console.WriteLine(_

" {0} = {1}" ,_

diskProperty.Name,

diskProperty.Value)

下一个diskProperty

///


我希望这有帮助吗?


Cor



" Terry Olsen" <到****** @ hotmail.com> schreef in bericht

新闻:Oa ************** @ TK2MSFTNGP11.phx.gbl ...
Terry,

There is not a real serial number, there is sometimes a processor number and
with a computer connected to a LAN or whatever that uses a network adapter,
a Mac address, and probably more numbers, however as far as I have seen not
an always existing unique one.

You can find those starting reading here reading (after that a is a little
sample in this message).

http://msdn.microsoft.com/library/de...Management.asp

http://msdn.microsoft.com/library/de...classtopic.asp

It are a lot of collections in collections.

I have not at the moment a sample at hand for those numbers, however see
this sample how to get drive information. I do not know where I got it
anymore.

\\\Add a reference to "System.Management.dll".
Dim disk As New ManagementObject( _
"Win32_LogicalDisk.DeviceID=""C:""" )
Dim diskProperty As PropertyData
For Each diskProperty In disk.Properties
Console.WriteLine( _
"{0} = {1}", _
diskProperty.Name,
diskProperty.Value )
Next diskProperty
///

I hope this helps?

Cor


"Terry Olsen" <to******@hotmail.com> schreef in bericht
news:Oa**************@TK2MSFTNGP11.phx.gbl...
有谁知道如何检索系统序列号?我正在写一个
审核程序,需要抓一点信息。

谢谢!
Does anyone know how to retrieve the system serial number? I''m writing an
auditing program and need to grab that little bit of info.

Thanks!



也许你可以使用下一个api-call中的序列号:

私有声明函数GetVolumeInformation Lib" Kernel32" Alias

" GetVolumeInformationA" (ByVal lpRootPathName As String,ByVal

lpVolumeNameBuffer As String,ByVal nVolumeNameSize As Long,

lpVolumeSerialNumber As Long,lpMaximumComponentLength As Long,

lpFileSystemFlags As Long,ByVal lpFileSystemNameBuffer As String,ByVal

nFileSystemNameSize As Long)As long


" Terry Olsen" <到****** @ hotmail.com>在消息中写道

新闻:Oa ************** @ TK2MSFTNGP11.phx.gbl ...
Maybe you can use the serialnumber from the next api-call:
Private Declare Function GetVolumeInformation Lib "Kernel32" Alias
"GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal
lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long,
lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long,
lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal
nFileSystemNameSize As Long) As Long

"Terry Olsen" <to******@hotmail.com> wrote in message
news:Oa**************@TK2MSFTNGP11.phx.gbl...
有谁知道如何检索系统序列号?我正在写一个
审核程序,需要抓一点信息。

谢谢!
Does anyone know how to retrieve the system serial number? I''m writing an
auditing program and need to grab that little bit of info.

Thanks!



这篇关于检索系统序列号...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆