告诉原码送50分,告诉资料可靠送20分
谁能告诉我怎么取得cpu和硬盘的系列号,发源码到liqian1234@yeah.net,告诉地址就在这里了 问题点数:50、回复次数:12Top
1 楼liqian0108(乐神仙)回复于 2002-04-23 13:11:08 得分 0
不是真的吧,我问的问题真就这么困难么,原来大家都和我一样只会些简单的问题呀Top
2 楼98440622(民工++)回复于 2002-04-23 13:17:33 得分 0
我只会用汇编的方法不知道可以吗?
下次帖给你!Top
3 楼liqian0108(乐神仙)回复于 2002-04-23 13:21:36 得分 0
当然可以了,有着方面的就行呀,我现在急呀,能快写告诉我么,Top
4 楼quengzi(Hades)回复于 2002-04-23 13:48:21 得分 0
BOOL GetVolumeInformation(
LPCTSTR lpRootPathName, // 硬盘的路径
LPTSTR lpVolumeNameBuffer, // 硬盘的卷标
DWORD nVolumeNameSize, // 卷标的字符串长度
LPDWORD lpVolumeSerialNumber, // 硬盘的序列号
LPDWORD lpMaximumComponentLength, // 最大的文件长度
LPDWORD lpFileSystemFlags, // 文件系统的一此标志
LPTSTR lpFileSystemNameBuffer, // 存储所在盘符的分区类型的长指针变量
DWORD nFileSystemNameSize // 分区类型的长指针变量所指向的字符串长度
);Top
5 楼qiuanhong(练从难处练,用从易处用)回复于 2002-04-23 13:56:05 得分 0
GetVolumeInformation
The GetVolumeInformation function returns information about a file system and volume whose root directory is specified.
BOOL GetVolumeInformation(
LPCTSTR lpRootPathName, // address of root directory of the
// file system
LPTSTR lpVolumeNameBuffer, // address of name of the volume
DWORD nVolumeNameSize, // length of lpVolumeNameBuffer
LPDWORD lpVolumeSerialNumber, // address of volume serial number
LPDWORD lpMaximumComponentLength,
// address of system's maximum
// filename length
LPDWORD lpFileSystemFlags, // address of file system flags
LPTSTR lpFileSystemNameBuffer, // address of name of file system
DWORD nFileSystemNameSize // length of lpFileSystemNameBuffer
);
Parameters
lpRootPathName
Pointer to a string that contains the root directory of the volume to be described. If this parameter is NULL, the root of the current directory is used. If this parameter is a UNC name, you must follow it with an additional backslash. For example, you would specify \\MyServer\MyShare as \\MyServer\MyShare\.
lpVolumeNameBuffer
Pointer to a buffer that receives the name of the specified volume.
nVolumeNameSize
Specifies the length, in characters, of the volume name buffer. This parameter is ignored if the volume name buffer is not supplied.
lpVolumeSerialNumber
Pointer to a variable that receives the volume serial number. This parameter can be NULL if the serial number is not required.
lpMaximumComponentLength
Pointer to a doubleword value that receives the maximum length, in characters, of a filename component supported by the specified file system. A filename component is that portion of a filename between backslashes.
The value stored in variable pointed to by *lpMaximumComponentLength is used to indicate that long names are supported by the specified file system. For example, for a FAT file system supporting long names, the function stores the value 255, rather than the previous 8.3 indicator. Long names can also be supported on systems that use the NTFS file system.
lpFileSystemFlags
Pointer to a doubleword that receives flags associated with the specified file system. This parameter can be any combination of the following flags, however, FS_FILE_COMPRESSION and FS_VOL_IS_COMPRESSED are mutually exclusive. Value Meaning
FS_CASE_IS_PRESERVED The file system preserves the case of filenames when it places a name on disk.
FS_CASE_SENSITIVE The file system supports case-sensitive filenames.
FS_UNICODE_STORED_ON_DISK The file system supports Unicode in filenames as they appear on disk.
FS_PERSISTENT_ACLS The file system preserves and enforces ACLs. For example, NTFS preserves and enforces ACLs, and FAT does not.
FS_FILE_COMPRESSION The file system supports file-based compression.
FS_VOL_IS_COMPRESSED The specified volume is a compressed volume; for example, a DoubleSpace volume.
FILE_SUPPORTS_ENCRYPTION The file system supports the Encrypted File System (EFS).
FILE_SUPPORTS_OBJECT_IDS The file system supports object identifiers.
FILE_SUPPORTS_REPARSE_POINTS The file system supports reparse points.
FILE_SUPPORTS_SPARSE_FILES The file system supports sparse files.
FILE_VOLUME_QUOTAS The file system supports disk quotas.
lpFileSystemNameBuffer
Pointer to a buffer that receives the name of the file system (such as FAT or NTFS).
nFileSystemNameSize
Specifies the length, in characters, of the file system name buffer. This parameter is ignored if the file system name buffer is not supplied.
Return Values
If all the requested information is retrieved, the return value is nonzero.
If not all the requested information is retrieved, the return value is zero. To get extended error information, call GetLastError.
Remarks
If you are attempting to obtain information about a floppy drive that does not have a floppy disk or a CD-ROM drive that does not have a compact disc, the system displays a message box asking the user to insert a floppy disk or a compact disc, respectively. To prevent the system from displaying this message box, call the SetErrorMode function with SEM_FAILCRITICALERRORS.
The FS_VOL_IS_COMPRESSED flag is the only indicator of volume-based compression. The file system name is not altered to indicate compression. This flag comes back set on a DoubleSpace volume, for example. With volume-based compression, an entire volume is either compressed or not compressed.
The FS_FILE_COMPRESSION flag indicates whether a file system supports file-based compression. With file-based compression, individual files can be compressed or not compressed.
The FS_FILE_COMPRESSION and FS_VOL_IS_COMPRESSED flags are mutually exclusive; both bits cannot come back set.
The maximum component length value, stored in the DWORD variable pointed to by lpMaximumComponentLength, is the only indicator that a volume supports longer-than-normal FAT (or other file system) file names. The file system name is not altered to indicate support for long file names.
The GetCompressedFileSize function obtains the compressed size of a file. The GetFileAttributes function can determine whether an individual file is compressed.
QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
See Also
File Systems Overview, File System Functions, GetCompressedFileSize, GetFileAttributes, SetErrorMode, SetVolumeLabel
Top
6 楼liqian0108(乐神仙)回复于 2002-04-23 14:00:24 得分 0
这个函数能找硬盘序列号么,还有cpu的序列号呢,怎么得呀Top
7 楼darkbb(小虫)回复于 2002-04-23 14:04:59 得分 0
使用CPUID指令,使用这个指令在网上搜索,或者直接找源码(硬件信息的);Top
8 楼quengzi(Hades)回复于 2002-04-23 14:07:02 得分 0
另外我在vb的论坛里看到有人提到
怎么得到网卡信息的帖子,
你可以参考Top
9 楼liqian0108(乐神仙)回复于 2002-04-23 14:11:14 得分 0
谢谢,各位,有没有人有原代码Top
10 楼liqian0108(乐神仙)回复于 2002-04-23 14:48:00 得分 0
到底有没有这方面更多的资料呢Top
11 楼delphihero(何去何从)回复于 2002-04-23 15:59:13 得分 50
我给你发一个 VC CPU的程序。记得给分,硬盘上面楼上有函数Top
12 楼liqian0108(乐神仙)回复于 2002-04-23 16:05:07 得分 0
好的,不会忘的,谢谢Top




