读取BIOS或HDD或机器序列号 [英] read BIOS or HDD or Machine Serial Number

查看:122
本文介绍了读取BIOS或HDD或机器序列号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是任何类型编程的新手。我已将此发布到其他

组,希望得到任何人的回复。


任何人都可以告诉我如何让我的VB程序读取Bios序列号

(或HDD会更好,还是两者兼而有之?)并将这些信息放入VB编程中,这样

程序就无法在另一台计算机上运行。我的程序使用MSAccess表。


非常感谢您的帮助!


谢谢

加文


解决方案

有一个api调用来返回HD序列号。我无法记住它

离我头顶,也许别人可以帮忙...


2003年8月8日09:09: 51 -0700, no*****@samuelhon.co.uk (Samuel Hon)

写道:

有一个api调用返回HD序列号。我无法记住它
我的头顶,也许别人可以帮忙...




GetVolumeInformation


有一个未记录的VB函数:


声明Sub GetMem1 Lib" msvbvm60.dll" (ByVal MemAddress As Long,var As

Byte)


它允许您一次读取一个字节的内存。由于BIOS在启动时加载到RAM中,你可以读取50个字节的BIOS来获取字符串。

我不记得该区域是什么保留给BIOS,但我知道

你可以通过读取8个字节来选择9x的BIOS日期,以

& HFFFF5开头(例如:04 / 06/99)。


我不认为NT会让你读到那个区域,但我不确定

那个。 br />
我确实看到了一个小系统信息。程序一段时间后,除其他外,

会将整个BIOS作为文本吐出。你将不得不玩它



看看这样的东西是不是一个可能的解决方案。


-

-
$ b $bAndréJoubert< ja **** @ sympatico.ca>在消息中写道

新闻:Fi ******************** @ news20.bellglobal.com。 ..

该API不会返回硬盘序列号。但只有format命令选择的音量序列号。每次格式化
磁盘时它都会改变。将有一个卷序列号。每个分区。所以在单个硬盘上
3卷(3个分区)你得到3卷序列号。

André

" J French" < ER ***** @ nowhere.com>在消息中写道
新闻:3f *************** @ news.btclick.com ...

2003年8月8日09:09: 51 -0700, no*****@samuelhon.co.uk (Samuel Hon)
写道:

有一个api调用来返回HD序列号。我无法记住它
在我的头顶,也许别人可以帮助...



GetVolumeInformation




Hi, I''m a newbie to programming of any kind. I have posted this to other
groups in a hope to get a response from anyone.

Can any one tell me how to make my VB program read the Bios serial number
(or would HDD be better, or both?) and put that info into VB prog so the
program won''t work on another computer. My program uses an MSAccess table.

Much appreciated if you can help!

Thanks
Gavin


解决方案

There is a api call to return the HD serial number. I cant remember it
off the top of my head, maybe someone else can help...


On 8 Aug 2003 09:09:51 -0700, no*****@samuelhon.co.uk (Samuel Hon)
wrote:

There is a api call to return the HD serial number. I cant remember it
off the top of my head, maybe someone else can help...



GetVolumeInformation


There''s an undocumented VB function:

Declare Sub GetMem1 Lib "msvbvm60.dll" (ByVal MemAddress As Long, var As
Byte)

It lets you read one byte of memory at a time. Since the BIOS is loaded
into RAM at startup you could read, say, 50 bytes of BIOS to get a string.
I don''t remember offhand what the area is reserved for BIOS, but I do know
that you can pick out the BIOS date on 9x by reading 8 bytes starting with
&HFFFF5 (ex.: 04/06/99 ).

I don''t think that NT lets you read that area, but I''m not sure about
that.
I did see a small system info. program awhile back that, among other things,
would spit out the entire BIOS as text. You''d have to play around with it
to
see if something like that would be a possible solution.

--
--
André Joubert <ja****@sympatico.ca> wrote in message
news:Fi********************@news20.bellglobal.com. ..

That API DOES NOT return the HDD serial no. but only the volume serial
as selected by the format command. It will change every time you format your disk. There will be one volume serial no. per partition. So on single HDD
with
3 volumes (3 partitions) you get 3 volume serial no.

André
"J French" <er*****@nowhere.com> wrote in message
news:3f***************@news.btclick.com...

On 8 Aug 2003 09:09:51 -0700, no*****@samuelhon.co.uk (Samuel Hon)
wrote:

There is a api call to return the HD serial number. I cant remember it
off the top of my head, maybe someone else can help...



GetVolumeInformation




这篇关于读取BIOS或HDD或机器序列号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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