asp.net 读硬盘号码 格式化之后号码还变的那种
来源:互联网 发布:淘宝宝贝尺码怎么改 编辑:程序博客网 时间:2024/05/22 06:42
读硬盘序列号:
using System;
using System.Runtime.InteropServices;
namespace ArLi.CommonPrj
{
public class getvol
{
[DllImport("kernel32.dll")]
private static extern int GetVolumeInformation(
string lpRootPathName,
string lpVolumeNameBuffer,
int nVolumeNameSize,
ref int lpVolumeSerialNumber,
int lpMaximumComponentLength,
int lpFileSystemFlags,
string lpFileSystemNameBuffer,
int nFileSystemNameSize
);
public static string GetVolOf(string drvID){
const int MAX_FILENAME_LEN = 256;
int retVal = 0;
int a =0;
int b =0;
string str1 = null;
string str2 = null;
int i = GetVolumeInformation(
drvID + @":/",
str1,
MAX_FILENAME_LEN,
ref retVal,
a,
b,
str2,
MAX_FILENAME_LEN
);
return retVal.ToString("x");
}
}
}
protected void Button1_Click(object sender, EventArgs e)
{
this.txtharddisk.Text = GetVolOf("c");
}
- asp.net 读硬盘号码 格式化之后号码还变的那种
- 获取cup和硬盘的id号码
- 解决iphone4无法格式化号码的问题
- 号码
- 号码
- 号码!
- 号码
- 打乱手机号之后,穷举所有号码组成可能的合法号码
- UITextField格式化银行卡号码解决方案
- why?我的计算机格式化硬盘之后 为什么还能找到我以前的数据?
- 用aSP实现号码转换
- 保留号码的方案
- QQ号码的基本知识
- 求两张票的号码
- 指定的号码
- 信用卡号码的检测
- 颠倒的号码牌
- 魔术号码的原因
- 在我的T23上成功装上KDE4.1,顺便秀图
- C++中的inline
- 开发视频播放Filter
- 奥运工具栏—奥运会信息了解的好东西
- 今天你多态了吗
- asp.net 读硬盘号码 格式化之后号码还变的那种
- Spring集成其他Web框架
- 技术人员应掌握市场营销
- OO的乒乓球练习 = =
- IP视频监控系统中云台控制模块的设计与实现 (转)
- Windows Message ID constants
- 查配置管理器,开启sql server相关协议
- 自定义公共事件
- C++箴言:理解typename的两个含义