Beispiel #1
0
    public bool FormatDrive(bool quickFormat, string format, string label, long diskSizeMB)
    {
        string volumeId = this._volumeId.TrimEnd("\\".ToCharArray());

        CVolume.FormatCallBackDelegate callBackDelegate1 = new CVolume.FormatCallBackDelegate(CVolume.formatCallBack);
        int    mediaFlag    = 12;
        string fsType       = format;
        string label1       = label;
        int    quickFormat1 = quickFormat ? 1 : 0;
        int    clusterSize  = 0;

        CVolume.FormatCallBackDelegate callBackDelegate2 = callBackDelegate1;
        CVolume.FormatEx(volumeId, mediaFlag, fsType, label1, quickFormat1, clusterSize, callBackDelegate2);
        return(string.Compare(format, this.FileSystem, true, CultureInfo.InvariantCulture) == 0);
    }
Beispiel #2
0
 public static extern void FormatEx(string volumeId, int mediaFlag, string fsType, string label, int quickFormat, int clusterSize, CVolume.FormatCallBackDelegate callBackDelegate);