急、急_怎样取得Cpu和硬盘的序列号?200分

saien 2002-03-04 09:23:38
急、急_怎样取得Cpu和硬盘的序列号?200分
...全文
58 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
luo73 2002-03-05
  • 打赏
  • 举报
回复
中山舰,收到你的感谢信了,不用太客气,大家互相帮助,同舟共济嘛!
但是真不好意思开口,我的分数实在是太低:别忘了给我加分呀!

另附一贴:
回:怎样才能将分数给你想加分的回复人呢?

单击右上方的“管理”,进入管理叶面后,在“贴子加分”栏中,在你想加分的回复人前面打勾!在每个你想加分的回复人后面配好分数(分值之和应该为你以前给这个问题的点数)。然后输入您的密码,单击“给分”就搞定了!
quark 2002-03-05
  • 打赏
  • 举报
回复
//==============================================================================
//获得硬盘序列号****************************************************************
//==============================================================================
function GetHardDiskSerial(Drive: string): string;
var VolumeSerialNumber: DWORD;
MaximumComponentLength: DWORD;
FileSystemFlags: DWORD;
begin
if Drive[Length(Drive)]=':' then Drive := Drive + '\';
GetVolumeInformation(PChar(Drive), nil, 0, @VolumeSerialNumber, MaximumComponentLength, FileSystemFlags, nil, 0);
Result := IntToHex(HiWord(VolumeSerialNumber), 4) + '-' + IntToHex(LoWord(VolumeSerialNumber), 4);
end;
TechnoFantasy 2002-03-04
  • 打赏
  • 举报
回复
vc写的dll,带delphi范例:
http://www.applevb.com/lib/diskio.rar
vc源程序:
http://www.applevb.com/DiskID.rar
luo73 2002-03-04
  • 打赏
  • 举报
回复
已经邮寄过去了,请查收!
saien 2002-03-04
  • 打赏
  • 举报
回复
我的邮箱是zhongshanjian0206@sina.com
luo73 2002-03-04
  • 打赏
  • 举报
回复
这是原始作者的位置,您也可以从这里下载:
http://home.online.tj.cn/user/dandy/

//注意mbcupid.zip不能再Win2k/XP下运行!
outer2000 2002-03-04
  • 打赏
  • 举报
回复
请查看API
The GetSystemInfo function returns information about the current system.

VOID GetSystemInfo(

LPSYSTEM_INFO lpSystemInfo // address of system information structure
);


Parameters

lpSystemInfo

Points to a SYSTEM_INFO structure to be filled in by this function.



Return Values

This function does not return a value.
The SYSTEM_INFO structure contains information about the current computer system. This includes the architecture and type of the processor, the number of processors in the system, the page size, and other such information.

typedef struct _SYSTEM_INFO { // sinf
union {
DWORD dwOemId;
struct {
WORD wProcessorArchitecture;
WORD wReserved;
};
};
DWORD dwPageSize;
LPVOID lpMinimumApplicationAddress;
LPVOID lpMaximumApplicationAddress;
DWORD dwActiveProcessorMask;
DWORD dwNumberOfProcessors;
DWORD dwProcessorType;
DWORD dwAllocationGranularity;
WORD wProcessorLevel;
WORD wProcessorRevision;

} SYSTEM_INFO;


Members

dwOemId

An obsolete member that is retained for compatibility with previous versions of Windows NT. Beginning with Windows NT 3.51 and the initial release of Windows 95, use the wProcessorArchitecture branch of the union.
Windows 95: The system always sets this member to zero, the value defined for PROCESSOR_ARCHITECTURE_INTEL.

wProcessorArchitecture

Specifies the system's processor architecture. This value can be one of the following values:

Value
PROCESSOR_ARCHITECTURE_INTEL
Windows NT only: PROCESSOR_ARCHITECTURE_MIPS
Windows NT only: PROCESSOR_ARCHITECTURE_ALPHA
Windows NT only: PROCESSOR_ARCHITECTURE_PPC
Windows NT only: PROCESSOR_ARCHITECTURE_UNKNOWN


wReserved

Reserved for future use.

dwPageSize

Specifies the page size and the granularity of page protection and commitment. This is the page size used by the VirtualAlloc function.

lpMinimumApplicationAddress

Pointer to the lowest memory address accessible to applications and dynamic-link libraries (DLLs).

lpMaximumApplicationAddress

Pointer to the highest memory address accessible to applications and DLLs.

dwActiveProcessorMask

Specifies a mask representing the set of processors configured into the system. Bit 0 is processor 0; bit 31 is processor 31.

dwNumberOfProcessors

Specifies the number of processors in the system.

dwProcessorType

Windows 95:

Specifies the type of processor in the system.

Windows NT:

This member is no longer relevant, but is retained for compatibility with Windows 95 and previous versions of Windows NT. Use the wProcessorArchitecture, wProcessorLevel, and wProcessorRevision members to determine the type of processor.

This member is one of the following values:

Value
PROCESSOR_INTEL_386
PROCESSOR_INTEL_486
PROCESSOR_INTEL_PENTIUM
Windows NT only: PROCESSOR_MIPS_R4000
Windows NT only: PROCESSOR_ALPHA_21064


dwAllocationGranularity

Specifies the granularity with which virtual memory is allocated. For example, a VirtualAlloc request to allocate 1 byte will reserve an address space of dwAllocationGranularity bytes. This value was hard coded as 64K in the past, but other hardware architectures may require different values.

wProcessorLevel

Windows 95: This member is not used.
Windows NT: Specifies the system's architecture-dependent processor level.
If wProcessorArchitecture is PROCESSOR_ARCHITECTURE_INTEL, wProcessorLevel can be one of the following values:

Value Meaning
3 Intel 80386
4 Intel 80486
5 Pentium


If wProcessorArchitecture is PROCESSOR_ARCHITECTURE_MIPS, wProcessorLevel is of the form 00xx, where xx is an 8-bit implementation number (bits 8-15 of the PRId register). The member can be the following value:

Value Meaning
0004 MIPS R4000


If wProcessorArchitecture is PROCESSOR_ARCHITECTURE_ALPHA, wProcessorLevel is of the form xxxx, where xxxx is a 16-bit processor version number (the low-order 16 bits of a version number from the firmware). The member can be one of the following values:

Decimal Value Meaning
21064 Alpha 21064
21066 Alpha 21066
21164 Alpha 21164


If wProcessorArchitecture is PROCESSOR_ARCHITECTURE_PPC, wProcessorLevel is of the form xxxx, where xxxx is a 16-bit processor version number (the high-order 16 bits of the Processor Version Register). The member can be one of the following values:

Decimal Value Meaning
1 PPC 601
3 PPC 603
4 PPC 604
6 PPC 603+
9 PPC 604+
20 PPC 620


wProcessorRevision

Windows 95: This member is not used.
Windows NT: Specifies an architecture-dependent processor revision. The following table shows how the revision value is assembled for each type of processor architecture.

Processor Architecture Value
Intel 80386 or 80486 A value of the form xxyz. If xx is equal to 0xFF, y - 0xA is the model number, and z is the stepping identifier. For example, an Intel 80486-D0 system returns 0xFFD0.If xx is not equal to 0xFF, xx + 'A' is the stepping letter and yz is the minor stepping.
Intel Pentium,
Cyrix, or
NextGen 586 A value of the form xxyy, where xx is the model number and yy is the stepping. For example, a value of 0x0201 indicates Model 2, Stepping 1.
MIPS A value of the form 00xx, where xx is the 8-bit revision number of the processor (the low-order 8 bits of the PRId register).
ALPHA A value of the form xxyy, where xxyy is the low-order 16 bits of the processor revision number from the firmware. Display this value as follows: Model 'A'+xx, Pass yy
PPC A value of the form xxyy, where xxyy is the low-order 16 bits of the Processor Version Register. Display this value as a fixed point number:xx.yy


Remarks

Beginning with Windows NT 3.51 and the initial release of Windows 95, the SYSTEM_INFO structure has changed as follows:

?The dwOemId member has been changed to a union. The union supports a new way to describe processor architecture used by Windows NT, while maintaining compatibility with Windows 95 and previous versions of Windows NT.
?The dwProcessorType member is now obsolete on Windows NT. It is still used on Windows 95.
?A previously reserved DWORD member at the end of the structure has been replaced by the wProcessorLevel and wProcessorRevision members. Windows 95 does not use these members.
luo73 2002-03-04
  • 打赏
  • 举报
回复
网上有免费的DLL,但是太容易被CRACK掉,我改编了别人作的一个VCL控件,适用于WIN98/2K/XP,可方便获取硬盘物理序列号,CPU ID,适用于DEPHI 5/6,CB5/6,有需要的朋友,可以Email给我(luo_qs@163.net),我将免费赠送!
saien 2002-03-04
  • 打赏
  • 举报
回复
如果答对,一定给分。

828

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧