mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-02-05 02:38:10 -05:00
ee04af5243
1. Add UDF filesytem option. 2. Add Cluster Size option. 3. Support FAT32 for disk bigger than 32GB. 4. Fix the format fail issue. 5. Add a tip bubble with cluster size when mouse hover on the file system type string. 6. The secure boot lock character can not show in early Windows, change it to a yellow icon.
77 lines
2.7 KiB
C
77 lines
2.7 KiB
C
/******************************************************************************
|
|
* DiskService.h
|
|
*
|
|
* Copyright (c) 2021, longpanda <admin@ventoy.net>
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation; either version 3 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
|
|
#ifndef __DISKSERVICE_H__
|
|
#define __DISKSERVICE_H__
|
|
|
|
typedef struct VDS_PARA
|
|
{
|
|
UINT64 Attr;
|
|
GUID Type;
|
|
GUID Id;
|
|
WCHAR Name[36];
|
|
ULONG NameLen;
|
|
ULONGLONG Offset;
|
|
CHAR DriveLetter;
|
|
DWORD ClusterSize;
|
|
}VDS_PARA;
|
|
|
|
//DISK API
|
|
BOOL DISK_CleanDisk(int DriveIndex);
|
|
BOOL DISK_DeleteVtoyEFIPartition(int DriveIndex, UINT64 EfiPartOffset);
|
|
BOOL DISK_ChangeVtoyEFIAttr(int DriveIndex, UINT64 Offset, UINT64 Attr);
|
|
BOOL DISK_ChangeVtoyEFI2ESP(int DriveIndex, UINT64 Offset);
|
|
BOOL DISK_ChangeVtoyEFI2Basic(int DriveIndex, UINT64 Offset);
|
|
BOOL DISK_ShrinkVolume(int DriveIndex, const char* VolumeGuid, CHAR DriveLetter, UINT64 OldBytes, UINT64 ReduceBytes);
|
|
BOOL DISK_FormatVolume(char DriveLetter, int fs, UINT64 VolumeSize);
|
|
|
|
|
|
//VDS com
|
|
BOOL VDS_CleanDisk(int DriveIndex);
|
|
BOOL VDS_DeleteAllPartitions(int DriveIndex);
|
|
BOOL VDS_DeleteVtoyEFIPartition(int DriveIndex, UINT64 EfiPartOffset);
|
|
BOOL VDS_ChangeVtoyEFIAttr(int DriveIndex, UINT64 Offset, UINT64 Attr);
|
|
BOOL VDS_ChangeVtoyEFI2ESP(int DriveIndex, UINT64 Offset);
|
|
BOOL VDS_ChangeVtoyEFI2Basic(int DriveIndex, UINT64 Offset);
|
|
BOOL VDS_ShrinkVolume(int DriveIndex, const char* VolumeGuid, CHAR DriveLetter, UINT64 OldBytes, UINT64 ReduceBytes);
|
|
BOOL VDS_IsLastAvaliable(void);
|
|
BOOL VDS_FormatVolume(char DriveLetter, int fs, DWORD ClusterSize);
|
|
|
|
//diskpart.exe
|
|
BOOL DSPT_CleanDisk(int DriveIndex);
|
|
BOOL DSPT_FormatVolume(char DriveLetter, int fs, DWORD ClusterSize);
|
|
|
|
//powershell.exe
|
|
BOOL PSHELL_CleanDisk(int DriveIndex);
|
|
BOOL PSHELL_DeleteVtoyEFIPartition(int DriveIndex, UINT64 EfiPartOffset);
|
|
BOOL PSHELL_ChangeVtoyEFI2ESP(int DriveIndex, UINT64 Offset);
|
|
BOOL PSHELL_ChangeVtoyEFI2Basic(int DriveIndex, UINT64 Offset);
|
|
BOOL PSHELL_ShrinkVolume(int DriveIndex, const char* VolumeGuid, CHAR DriveLetter, UINT64 OldBytes, UINT64 ReduceBytes);
|
|
BOOL PSHELL_FormatVolume(char DriveLetter, int fs, DWORD ClusterSize);
|
|
|
|
//
|
|
// Internel define
|
|
//
|
|
|
|
|
|
|
|
|
|
#endif
|