请教个问题

.NET技术相关

请教个问题


深林 2006-07-06, 15:34 下午
请教~网页.net如何读取硬盘的序列号或网卡的序列号

Re: 请教个问题


shakewang 2006-07-06, 21:23 下午
在win32 api里有个函数GetVolumeInformation可以获取硬盘序列号,如果使用c#的话需要导入kernel32.dll。
[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 );

具体该api的使用方法你可以查msdn。
三人行,必有我师

Re: 请教个问题


Stone Tao 2006-07-06, 21:27 下午
写activex吧,否则读取的只能是服务器的。而且还有权限问题

Powered by Community Server Powered by CnForums.Net