public NativeMethods.WObject GetObject() { NativeMethods.WObject drive = new NativeMethods.WObject(); StringBuilder builder = new StringBuilder(); for(int i = 0; i < drives.Count; i++) { builder.Append(drives[i]); } drive.type = NativeMethods.TYPE_DRIVE; drive.path = builder.ToString(); drive.aux = null; drive.wipeMethod = _wipeMethodId == WipeOptions.DefaultWipeMethod ? _options.DefaultFreeSpaceMethod : _wipeMethodId; drive.wipeOptions = 0; // set the options if(_wipeFreeSpace) { drive.wipeOptions |= NativeMethods.WIPE_FREE_SPACE; } if(_wipeClusterTips) { drive.wipeOptions |= NativeMethods.WIPE_CLUSTER_TIPS; } if(_wipeMFT) { drive.wipeOptions |= NativeMethods.WIPE_MFT; } return drive; }
/// <summary> /// Get the file object /// </summary> public NativeMethods.WObject GetObject() { NativeMethods.WObject file = new NativeMethods.WObject(); file.type = NativeMethods.TYPE_FILE; file.path = _path; file.aux = null; file.wipeMethod = _wipeMethodId == WipeOptions.DefaultWipeMethod ? _options.DefaultFileMethod : _wipeMethodId; file.wipeOptions = 0; // set the options if(_options.WipeAds) { file.wipeOptions |= NativeMethods.WIPE_ADS; } if(_options.WipeFileName) { file.wipeOptions |= NativeMethods.WIPE_FILENAME; } return file; }