18#define ISOLATION_AWARE_ENABLED 1
19#define STRSAFE_NO_DEPRECATE
27#define WIN32_NO_STATUS
35#define NO_SHLWAPI_STRFCNS
56 }
else if (
riid == IID_IShellExtInit) {
68 FORMATETC
format = {
CF_HDROP,
nullptr, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
78 stgm.tymed = TYMED_HGLOBAL;
167 uint64_t num_devs, dev_size, dev_alloc, data_size, data_alloc, metadata_size, metadata_alloc;
226 dev_size += bd->
size;
235 data_size = data_alloc = 0;
236 metadata_size = metadata_alloc = 0;
253 data_size += bue->
size;
256 metadata_size += bue->
size;
307 if (data_alloc > 0) {
327 s +=
t +
L"\r\n\r\n";
330 for (
j = 0;
j <
sizeof(duptypes) /
sizeof(duptypes[0]);
j++) {
335 wstring sizestring, usedstring, typestring, dupstring;
349 wstring_sprintf(
t, typestring, dupstring.c_str(), sizestring.c_str(), usedstring.c_str());
360 s += devs[
l].name +
L"\t" + sizestring +
L"\r\n";
376 s +=
t +
L"\t"s + sizestring +
L"\r\n"s;
378 s +=
t +
L"\t" + sizestring +
L"\r\n";
410 s += devs[
k].name +
L"\t" + sizestring +
L"\r\n";
424 ULONG devsize, usagesize,
i;
600 if (lParam1 < lParam2)
602 else if (lParam1 > lParam2)
635 ULONG usagesize, devsize;
812 t =
L"\""s + modfn +
L"\",ResetStats " +
fn +
L"|" + sel;
814 t = wstring(
L"\"") + modfn + wstring(
L"\",ResetStats ") +
fn + wstring(
L"|") + sel;
904 for (
i = 0;
i < 5;
i++) {
1015 t =
L"\""s + modfn +
L"\",AddDevice "s +
fn;
1017 t = wstring(
L"\"") + modfn + wstring(
L"\",AddDevice ") +
fn;
1022 sei.
cbSize =
sizeof(sei);
1072 wstring
t, mess, mess2,
title;
1112 t =
L"\""s + modfn +
L"\",RemoveDevice "s +
fn +
L"|"s + sel;
1114 t = wstring(
L"\"") + modfn + wstring(
L"\",RemoveDevice ") +
fn + wstring(
L"|") + sel;
1119 sei.
cbSize =
sizeof(sei);
1164 t =
L"\""s + modfn +
L"\",ResizeDevice "s +
fn +
L"|"s + sel;
1166 t = wstring(
L"\"") + modfn + wstring(
L"\",ResizeDevice ") +
fn + wstring(
L"|") + sel;
1171 sei.
cbSize =
sizeof(sei);
1203 bool device_readonly =
false;
1222 if (bd->
dev_id == devid) {
1277 t =
L"\""s + modfn +
L"\",ShowScrub "s +
fn;
1279 t = wstring(
L"\"") + modfn + wstring(
L"\",ShowScrub ") +
fn;
1284 sei.
cbSize =
sizeof(sei);
1307 t =
L"\""s + modfn +
L"\",ShowChangeDriveLetter "s +
fn;
1309 t = wstring(
L"\"") + modfn + wstring(
L"\",ShowChangeDriveLetter ") +
fn;
1314 sei.
cbSize =
sizeof(sei);
1346 if (!bd->readonly) {
1351 if (bd->next_entry > 0)
1438 icex.
dwSize =
sizeof(icex);
1444 psp.
dwSize =
sizeof(psp);
1452 psp.pfnCallback =
nullptr;
1458 if (pfnAddPage(hPage,
lParam)) {
1482 if (
fn.length() == 3 &&
fn[1] ==
L':' &&
fn[2] ==
L'\\') {
1483 dd =
L"\\DosDevices\\?:";
1490 error_message(
nullptr,
"Volume path was not root of drive.");
1509 wstring new_dd =
L"\\DosDevices\\?:";
1538 drv =
L"\\DosDevices\\?:";
1540 for (
wchar_t l =
'A';
l <=
'Z';
l++) {
1558 wstring
str =
L"?:";
1634 tp.PrivilegeCount = 1;
1635 tp.Privileges[0].Luid = luid;
1643 if (pipe == string::npos)
1646 vol =
cmdline.substr(0, pipe);
#define FSCTL_BTRFS_GET_UUID
#define FSCTL_BTRFS_GET_USAGE
#define FSCTL_BTRFS_GET_DEVICES
#define FSCTL_BTRFS_RESET_STATS
void ShowBalance(HWND hwndDlg)
void do_change(HWND hwndDlg)
INT_PTR DlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
vector< wchar_t > letters
void ShowScrub(HWND hwndDlg)
virtual HRESULT __stdcall ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam)
INT_PTR CALLBACK DeviceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
INT_PTR CALLBACK UsageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
HRESULT __stdcall QueryInterface(REFIID riid, void **ppObj)
void FormatUsage(HWND hwndDlg, wstring &s, btrfs_usage *usage)
void ShowDevices(HWND hwndDlg)
void RefreshDevList(HWND devlist)
INT_PTR CALLBACK StatsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
void ShowStats(HWND hwndDlg, uint64_t devid)
void ShowUsage(HWND hwndDlg)
void ResetStats(HWND hwndDlg)
virtual HRESULT __stdcall AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam)
void ShowChangeDriveLetter(HWND hwndDlg)
virtual HRESULT __stdcall Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID)
void RefreshUsage(HWND hwndDlg)
void create_point(const std::wstring_view &symlink, const std::wstring_view &device) const
void delete_points(const std::wstring_view &symlink, const std::wstring_view &unique_id=L"", const std::wstring_view &device_name=L"") const
std::vector< mountmgr_point > query_points(const std::wstring_view &symlink=L"", const std::wstring_view &unique_id=L"", const std::wstring_view &device_name=L"") const
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
#define NT_SUCCESS(StatCode)
#define IDS_UNKNOWN_DEVICE
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_USAGE_UNALLOC
#define IDC_DEVICE_REFRESH
#define IDS_USAGE_DEV_SIZE
#define IDS_DEVLIST_READONLY_NO
#define IDS_USAGE_DATA_RATIO
#define IDS_VOL_PROP_SHEET_TITLE
#define IDS_REMOVE_DEVICE_CONFIRMATION
#define IDC_DEVICE_SHOW_STATS
#define IDS_DEVLIST_ALLOC_PC
#define IDC_DRIVE_LETTER_COMBO
#define IDS_DEVLIST_READONLY_YES
#define IDS_USAGE_METADATA
#define IDS_CANNOT_FIND_DEVICE
#define IDC_DEVICE_RESIZE
#define IDS_USAGE_DEV_ALLOC
#define IDS_DEVLIST_ALLOC
#define IDC_USAGE_REFRESH
#define IDS_DEVLIST_READONLY
#define IDS_CONFIRMATION_TITLE
#define IDS_INITCOMMONCONTROLSEX_FAILED
#define IDS_USAGE_DEV_UNALLOC
#define IDC_GENERATION_ERRS
#define IDS_USAGE_METADATA_RATIO
#define IDC_VOL_CHANGE_DRIVE_LETTER
#define IDC_VOL_SHOW_USAGE
#define IDS_DISK_PART_NUM
#define IDC_DEVICE_REMOVE
#define IDD_VOL_PROP_SHEET
#define IDC_CORRUPTION_ERRS
BOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName, LPCWSTR lpPrivilegeName, PLUID lpLuid)
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage)
BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
#define INVALID_HANDLE_VALUE
#define GetCurrentProcess()
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
#define BLOCK_FLAG_RAID1C4
#define BLOCK_FLAG_RAID1C3
GLubyte GLubyte GLubyte GLubyte w
GLsizeiptr const GLvoid GLenum usage
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 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
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 * u
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 token
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 GLint GLint j
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 HMODULE MODULEINFO DWORD cb
static PIO_STATUS_BLOCK iosb
const char * dev_name(int device)
struct _PSP * HPROPSHEETPAGE
static int load_string(HINSTANCE hModule, UINT resId, LPWSTR pwszBuffer, INT cMaxChars)
#define FILE_READ_ATTRIBUTES
#define FILE_SHARE_DELETE
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)
BOOL(CALLBACK * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM)
#define LVM_DELETEALLITEMS
#define LVM_INSERTCOLUMNW
#define SEE_MASK_NOCLOSEPROCESS
#define BLOCK_FLAG_DUPLICATE
#define BLOCK_FLAG_SYSTEM
#define BLOCK_FLAG_RAID10
#define STATUS_BUFFER_OVERFLOW
#define BLOCK_FLAG_METADATA
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
struct _PROPSHEETPAGEW *UINT * pcRefParent
btrfs_usage_device devices[1]
void push_back(const _Tp &__x=_STLP_DEFAULT_CONSTRUCTED(_Tp))
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
#define RtlZeroMemory(Destination, Length)
#define STATUS_OBJECT_NAME_NOT_FOUND
HRESULT WINAPI EnableThemeDialogTexture(_In_ HWND hwnd, _In_ DWORD dwFlags)
void CALLBACK ResetStatsW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow)
static INT_PTR CALLBACK stub_DeviceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static INT_PTR CALLBACK PropSheetDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
void CALLBACK ShowChangeDriveLetterW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow)
static INT_PTR CALLBACK stub_UsageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static INT_PTR CALLBACK stub_StatsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static int CALLBACK lv_sort(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
static const NTSTATUS STATUS_OBJECT_NAME_NOT_FOUND
static INT_PTR __stdcall dlg_proc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static void add_lv_column(HWND list, int string, int cx)
static uint64_t find_dev_alloc(uint64_t dev_id, btrfs_usage *usage)
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
DWORD WINAPI GetLastError(void)
#define GetWindowLongPtrW
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
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)
#define TOKEN_ADJUST_PRIVILEGES
#define SE_PRIVILEGE_ENABLED