using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Management;
namespace MyQuery.Utils
{
/// <summary>
/// 封装获得机器信息
/// by 贾世义 2011-4-26
/// </summary>
public static class MachineHelper
{
///<summary>
///return Volume Serial Number from hard drive
///</summary>
///<param name="strDriveLetter">[optional] Drive letter</param>
///<returns>[string] VolumeSerialNumber</returns>
public static string GetVolumeSerial(string strDriveLetter)
{
if (strDriveLetter == "" || strDriveLetter == null) strDriveLetter = "C";
ManagementObject disk =