我想用 C# 编程格式化 (FAT32) 可移动驱动器。在互联网上我找到了一种方法,但问题是它打开了通用的 windows 格式程序。但我只想用 C# 来做,没有内置的 Windows 支持。
我的方法是:
// FAT32 Format Button click event
[DllImport("shell32.dll")]
static extern uint SHFormatDrive(IntPtr hwnd, uint drive, uint fmtID, uint options);
最佳答案
您可以使用 wmi ,有一种方法可以做到这一点。
http://msdn.microsoft.com/en-us/library/aa390432%28v=VS.85%29.aspx
关于c# - 使用 C# 编程格式化可移动媒体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3240377/