关于硬盘序列号的类
using System;
using using using using Microsoft.Win32;
namespace Wjb.ReadOrWriteIniAndReg
{
/// <summary>
///
/// 读取指定盘符的硬盘序列号
/// 功能:读取指定盘符的硬盘序列号
/// </summary>
public class HardDiskVal
{
[ private static extern int
string string int ref int int int string int );
/// <summary>
/// 获得盘符为 /// </summary>
/// < /// <returns></returns>
public string string {
const int MAX_FILENAME_LEN = 256;
int
int a =0;
int b =0;
string str1 = null;
string str2 = null;
int
str1,
MAX_FILENAME_LEN,
ref str2,
MAX_FILENAME_LEN
);
return }
public string {
const int MAX_FILENAME_LEN = 256;
int
int a =0;
int b =0;
string str1 = null;
string str2 = null;
int "c:\\",
str1,
MAX_FILENAME_LEN,
ref str2,
MAX_FILENAME_LEN
);
return }
}
}