18#define ISOLATION_AWARE_ENABLED 1
19#define STRSAFE_NO_DEPRECATE
27#define WIN32_NO_STATUS
35#define NO_SHLWAPI_STRFCNS
42#define SUBVOL_ROOT_INODE 0x100
51#define FileAccessInformation (FILE_INFORMATION_CLASS)8
61#define FileStandardInformation (FILE_INFORMATION_CLASS)5
78 }
else if (
riid == IID_IShellExtInit) {
95 ss =
fn + wstring(
L"\\*");
103 if (ffd.cFileName[0] !=
'.' || ((ffd.cFileName[1] != 0) && (ffd.cFileName[1] !=
'.' || ffd.cFileName[2] != 0))) {
107 fn2 =
fn +
L"\\"s + ffd.cFileName;
109 fn2 =
fn + wstring(
L"\\") + ffd.cFileName;
123 memset(&bii2, 0,
sizeof(bii2));
201 memset(&bii2, 0,
sizeof(bii2));
319 UINT num_files,
i, sv = 0;
338 for (
i = 0;
i < num_files;
i++) {
363 FORMATETC
format = {
CF_HDROP,
nullptr, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
373 stgm.tymed = TYMED_HGLOBAL;
452 memset(&bii2, 0,
sizeof(bii2));
652 memset(&fbi, 0,
sizeof(fbi));
658 fbi.FileAttributes &= ~FILE_ATTRIBUTE_READONLY;
716 for (
i = 0;
i < num_files;
i++) {
731 wstring
s, size_on_disk, cr, frag;
732 WCHAR old_text[1024];
767 if (frag != old_text)
788 if (this->uid !=
uid) {
797 if (this->gid !=
gid) {
807 WCHAR old_text[1024];
811 for (
i = 0;
i < 5;
i++) {
816 if (
size != old_text)
869 }
else if (!
min && !
max) {
875 style &= ~BS_AUTOCHECKBOX;
894 for (
i = 0;
i < num_files;
i++) {
900 t =
L"\""s + modfn +
L"\",ShowPropSheet "s +
fn;
902 t = wstring(
L"\"") + modfn + wstring(
L"\",ShowPropSheet ") +
fn;
928#define major(rdev) ((((rdev) >> 8) & 0xFFF) | ((uint32_t)((rdev) >> 32) & ~0xFFF))
929#define minor(rdev) (((rdev) & 0xFF) | ((uint32_t)((rdev) >> 12) & ~0xFF))
939 static ULONG perms[] = {
S_IRUSR,
S_IWUSR,
S_IXUSR,
S_IRGRP,
S_IWGRP,
S_IXGRP,
S_IROTH,
S_IWOTH,
S_IXOTH,
S_ISUID,
S_ISGID,
S_ISVTX, 0 };
1003 SetTimer(hwndDlg, 1, 250,
nullptr);
1025 while (comp_types[
i] != 0) {
1044 while (perm_controls[
i] != 0) {
1055 s = to_wstring(
uid);
1065 s = to_wstring(
gid);
1079 while (perm_controls[
i] != 0) {
1326 icex.
dwSize =
sizeof(icex);
1332 psp.
dwSize =
sizeof(psp);
1340 psp.pfnCallback =
nullptr;
1346 if (pfnAddPage(hPage,
lParam)) {
1382 icex.
dwSize =
sizeof(icex);
1388 psp.
dwSize =
sizeof(psp);
1395 psp.pfnCallback =
nullptr;
#define FSCTL_BTRFS_SET_INODE_INFO
#define FSCTL_BTRFS_GET_INODE_INFO
void change_perm_flag(HWND hDlg, ULONG perm, UINT state)
uint8_t max_compression_type
void change_gid(HWND hDlg, uint32_t gid)
void change_uid(HWND hDlg, uint32_t uid)
virtual HRESULT __stdcall AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam)
void init_propsheet(HWND hwndDlg)
DWORD search_list_thread()
HRESULT __stdcall QueryInterface(REFIID riid, void **ppObj)
void do_search(const wstring &fn)
uint8_t min_compression_type
void apply_changes(HWND hDlg)
void set_size_on_disk(HWND hwndDlg)
virtual HRESULT __stdcall Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID)
void set_cmdline(const wstring &cmdline)
HRESULT check_file(const wstring &fn, UINT i, UINT num_files, UINT *sv)
void apply_changes_file(HWND hDlg, const wstring &fn)
virtual HRESULT __stdcall ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam)
bool compress_type_changed
void open_as_admin(HWND hwndDlg)
deque< wstring > search_list
void change_inode_flag(HWND hDlg, uint64_t flag, UINT state)
void update_size_details_dialog(HWND hDlg)
void push_back(const value_type &__t=_STLP_DEFAULT_CONSTRUCTED(_Tp))
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
#define NT_SUCCESS(StatCode)
void error_message(HWND hwnd, const char *msg)
void wstring_sprintf(wstring &s, wstring fmt,...)
void format_size(uint64_t size, wstring &s, bool show_bytes)
#define IDS_STANDALONE_PROPSHEET_TITLE
#define IDC_FRAGMENTATION
#define IDS_PROP_SHEET_TITLE
#define IDS_INODE_SYMLINK
#define IDS_INODE_UNKNOWN
#define IDC_SIZE_UNCOMPRESSED
#define IDS_COMPRESS_ZSTD
#define IDS_INODE_CHAR_SIMPLE
#define IDS_INITCOMMONCONTROLSEX_FAILED
#define IDC_COMPRESSION_RATIO
#define IDS_COMPRESS_ZLIB
#define IDS_INODE_BLOCK_SIMPLE
#define IDC_COMPRESS_TYPE
HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage)
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
#define INVALID_HANDLE_VALUE
BOOL WINAPI GetFileInformationByHandle(HANDLE hFile, LPBY_HANDLE_FILE_INFORMATION lpFileInformation)
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
GLuint GLuint GLsizei GLenum type
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
HRESULT GetData([in, unique] FORMATETC *pformatetcIn, [out] STGMEDIUM *pmedium)
#define FILE_FLAG_OPEN_REPARSE_POINT
#define FILE_FLAG_BACKUP_SEMANTICS
static PIO_STATUS_BLOCK iosb
static float(__cdecl *square_half_float)(float x
struct _PSP * HPROPSHEETPAGE
static int load_string(HINSTANCE hModule, UINT resId, LPWSTR pwszBuffer, INT cMaxChars)
#define FILE_ATTRIBUTE_READONLY
#define FILE_READ_ATTRIBUTES
NTSYSAPI NTSTATUS NTAPI NtSetInformationFile(IN HANDLE hFile, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN PVOID FileInformationBuffer, IN ULONG FileInformationBufferLength, IN FILE_INFORMATION_CLASS FileInfoClass)
NTSYSAPI NTSTATUS NTAPI NtQueryInformationFile(IN HANDLE hFile, OUT PIO_STATUS_BLOCK pIoStatusBlock, OUT PVOID FileInformationBuffer, IN ULONG FileInformationBufferLength, IN FILE_INFORMATION_CLASS FileInfoClass)
#define FILE_SHARE_DELETE
#define FILE_WRITE_ATTRIBUTES
#define FILE_ATTRIBUTE_DIRECTORY
NTSYSAPI NTSTATUS NTAPI NtFsControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
static INT_PTR CALLBACK PropSheetDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
void CALLBACK ShowPropSheetW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow)
static ULONG inode_type_to_string_ref(uint8_t type)
struct _FILE_STANDARD_INFORMATION * PFILE_STANDARD_INFORMATION
#define SUBVOL_ROOT_INODE
static INT_PTR CALLBACK SizeDetailsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static DWORD WINAPI global_search_list_thread(LPVOID lpParameter)
struct _FILE_ACCESS_INFORMATION FILE_ACCESS_INFORMATION
#define FileAccessInformation
struct _FILE_ACCESS_INFORMATION * PFILE_ACCESS_INFORMATION
#define FileStandardInformation
struct _FILE_STANDARD_INFORMATION FILE_STANDARD_INFORMATION
struct _FILE_FS_SIZE_INFORMATION FILE_FS_SIZE_INFORMATION
static void set_check_box(HWND hwndDlg, ULONG id, uint64_t min, uint64_t max)
struct _FILE_FS_SIZE_INFORMATION * PFILE_FS_SIZE_INFORMATION
#define BTRFS_INODE_COMPRESS
#define BTRFS_INODE_NODATASUM
#define BTRFS_INODE_NODATACOW
#define PSH_PROPSHEETPAGE
BOOL(CALLBACK * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM)
struct _PROPSHEETHEADERW PROPSHEETHEADERW
struct tagNMLINK * PNMLINK
#define SEE_MASK_NOCLOSEPROCESS
NTSTATUS NTAPI NtQueryVolumeInformationFile(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FsInformation, ULONG Length, FS_INFORMATION_CLASS FsInformationClass)
#define BTRFS_TYPE_DIRECTORY
#define BTRFS_TYPE_SOCKET
#define BTRFS_TYPE_SYMLINK
#define BTRFS_TYPE_CHARDEV
#define BTRFS_TYPE_BLOCKDEV
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
struct _PROPSHEETPAGEW *UINT * pcRefParent
uint64_t disk_size_uncompressed
BOOL compression_type_changed
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
#define RtlZeroMemory(Destination, Length)
HRESULT WINAPI EnableThemeDialogTexture(_In_ HWND hwnd, _In_ DWORD dwFlags)
static GLenum _GLUfuncptr fn
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
DWORD WINAPI GetLastError(void)
#define BST_INDETERMINATE
#define GetWindowLongPtrW
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HWND WINAPI GetParent(_In_ HWND)
#define MAKEINTRESOURCEW(i)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SetWindowLongPtrW
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)