请,我如何获得一个C/C ++例程,用它可以检索硬盘序列号. [英] Please, how can I get a C/C++ routine with which I can retrieve the hard disc serial number.

查看:82
本文介绍了请,我如何获得一个C/C ++例程,用它可以检索硬盘序列号.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为反盗版计划的一部分,我需要一个例程,希望可以检索系统硬盘的序列号.
谁能告诉我在哪里可以得到这样的例程?

As part of an anti-piracy scheme ,I need a routine with wish I can retrieve the serial number of the system''s hard disc.
Can any one tell me where I can get one or more of such a routine?

推荐答案

更具体的链接 [
Do some research on WMI[^]. It is very useful for things like this. More specific link[^] to an appropriate part of WMI.


没有一种方法可以可靠地检索驱动器序列号.您必须使用大约4或5种不同方法的组合,其中一种或多种将返回驱动器的序列号,但是没有一种方法可用于所有驱动器.有些甚至需要管理员权限才能完全工作.

谷歌搜索"DiskId32"以找到它的站点.在该站点上,您还将找到它使用的源代码!
There is no one method that reliably retrieves the drive serial number. You have to use a combination of about 4 or 5 different methods, one or more of which will return the serial number of the drive, but no one method works for all drives. Some even require admin rights in order to work at all.

Google for "DiskId32" to find the site for it. On that site, you''ll also find the source code that it uses!


link [ ^ ]可能会为您提供帮助.也有多种语言的源代码.
This link[^] may help you. There is source in several languages as well.


这篇关于请,我如何获得一个C/C ++例程,用它可以检索硬盘序列号.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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