ReactOS  0.4.14-dev-583-g2a1ba2c
drive.cpp File Reference
#include "precomp.h"
#include <process.h>
Include dependency graph for drive.cpp:

Go to the source code of this file.

Classes

struct  FORMAT_DRIVE_CONTEXT
 
struct  _DRIVE_PROP_PAGE
 
struct  FORMAT_DRIVE_PARAMS
 

Typedefs

typedef struct FORMAT_DRIVE_CONTEXTPFORMAT_DRIVE_CONTEXT
 
typedef struct _DRIVE_PROP_PAGE DRIVE_PROP_PAGE
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shell)
 
EXTERN_C HPSXA WINAPI SHCreatePropSheetExtArrayEx (HKEY hKey, LPCWSTR pszSubKey, UINT max_iface, IDataObject *pDataObj)
 
HPROPSHEETPAGE SH_CreatePropertySheetPage (LPCSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle)
 
static BOOL GetDefaultClusterSize (LPWSTR szFs, PDWORD pClusterSize, PULARGE_INTEGER TotalNumberOfBytes)
 
HRESULT SH_ShowDriveProperties (WCHAR *pwszDrive, LPCITEMIDLIST pidlFolder, PCUITEMID_CHILD_ARRAY apidl)
 
static VOID InsertDefaultClusterSizeForFs (HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext)
 
static VOID InitializeFormatDriveDlg (HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext)
 
static BOOLEAN NTAPI FormatExCB (IN CALLBACKCOMMAND Command, IN ULONG SubAction, IN PVOID ActionInfo)
 
VOID FormatDrive (HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext)
 
static unsigned __stdcall DoFormatDrive (void *args)
 
static INT_PTR CALLBACK FormatDriveDlg (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
DWORD WINAPI SHFormatDrive (HWND hwnd, UINT drive, UINT fmtID, UINT options)
 

Variables

static HWND FormatDrvDialog = NULL
 
static BOOLEAN bSuccess = FALSE
 

Typedef Documentation

◆ DRIVE_PROP_PAGE

◆ PFORMAT_DRIVE_CONTEXT

Function Documentation

◆ DoFormatDrive()

static unsigned __stdcall DoFormatDrive ( void args)
static

Definition at line 588 of file drive.cpp.

589 {
590  FORMAT_DRIVE_PARAMS *pParams = reinterpret_cast<FORMAT_DRIVE_PARAMS *>(args);
591  HWND hwndDlg = pParams->hwndDlg;
592  PFORMAT_DRIVE_CONTEXT pContext = pParams->pContext;
593 
594  /* Disable controls during format */
595  HMENU hSysMenu = GetSystemMenu(hwndDlg, FALSE);
597  EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
599  EnableWindow(GetDlgItem(hwndDlg, 28673), FALSE);
600  EnableWindow(GetDlgItem(hwndDlg, 28677), FALSE);
601  EnableWindow(GetDlgItem(hwndDlg, 28680), FALSE);
602  EnableWindow(GetDlgItem(hwndDlg, 28679), FALSE);
603  EnableWindow(GetDlgItem(hwndDlg, 28674), FALSE);
604 
605  FormatDrive(hwndDlg, pContext);
606 
607  /* Re-enable controls after format */
608  EnableWindow(GetDlgItem(hwndDlg, IDOK), TRUE);
609  EnableWindow(GetDlgItem(hwndDlg, IDCANCEL), TRUE);
610  EnableWindow(GetDlgItem(hwndDlg, 28673), TRUE);
611  EnableWindow(GetDlgItem(hwndDlg, 28677), TRUE);
612  EnableWindow(GetDlgItem(hwndDlg, 28680), TRUE);
613  EnableWindow(GetDlgItem(hwndDlg, 28679), TRUE);
614  EnableWindow(GetDlgItem(hwndDlg, 28674), TRUE);
616  pContext->bFormattingNow = FALSE;
617 
618  delete pParams;
619  return 0;
620 }
#define TRUE
Definition: types.h:120
#define IDOK
Definition: winuser.h:824
#define MF_BYCOMMAND
Definition: winuser.h:202
Definition: match.c:390
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
HMENU WINAPI GetSystemMenu(_In_ HWND, _In_ BOOL)
VOID FormatDrive(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext)
Definition: drive.cpp:458
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define MF_ENABLED
Definition: winuser.h:128
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
PFORMAT_DRIVE_CONTEXT pContext
Definition: drive.cpp:585
#define SC_CLOSE
Definition: winuser.h:2567
#define MF_GRAYED
Definition: winuser.h:129
#define IDCANCEL
Definition: winuser.h:825
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

Referenced by FormatDriveDlg().

◆ FormatDrive()

VOID FormatDrive ( HWND  hwndDlg,
PFORMAT_DRIVE_CONTEXT  pContext 
)

Definition at line 458 of file drive.cpp.

459 {
460  WCHAR szDrive[4] = { L'C', ':', '\\', 0 };
461  WCHAR szFileSys[40] = {0};
462  WCHAR szLabel[40] = {0};
463  INT iSelIndex;
464  UINT Length;
465  HWND hDlgCtrl;
469  FMIFS_MEDIA_FLAG MediaFlag = FMIFS_HARDDISK;
470 
471  /* set volume path */
472  szDrive[0] = pContext->Drive + L'A';
473 
474  /* get filesystem */
475  hDlgCtrl = GetDlgItem(hwndDlg, 28677);
476  iSelIndex = SendMessageW(hDlgCtrl, CB_GETCURSEL, 0, 0);
477  if (iSelIndex == CB_ERR)
478  {
479  FIXME("\n");
480  return;
481  }
482  Length = SendMessageW(hDlgCtrl, CB_GETLBTEXTLEN, iSelIndex, 0);
483  if ((int)Length == CB_ERR || Length + 1 > _countof(szFileSys))
484  {
485  FIXME("\n");
486  return;
487  }
488 
489  /* retrieve the file system */
490  SendMessageW(hDlgCtrl, CB_GETLBTEXT, iSelIndex, (LPARAM)szFileSys);
491  szFileSys[_countof(szFileSys)-1] = L'\0';
492 
493  /* retrieve the volume label */
494  hDlgCtrl = GetWindow(hwndDlg, 28679);
495  Length = SendMessageW(hDlgCtrl, WM_GETTEXTLENGTH, 0, 0);
496  if (Length + 1 > _countof(szLabel))
497  {
498  FIXME("\n");
499  return;
500  }
501  SendMessageW(hDlgCtrl, WM_GETTEXT, _countof(szLabel), (LPARAM)szLabel);
502  szLabel[(sizeof(szLabel)/sizeof(WCHAR))-1] = L'\0';
503 
504  /* check for quickformat */
505  if (SendDlgItemMessageW(hwndDlg, 28674, BM_GETCHECK, 0, 0) == BST_CHECKED)
506  QuickFormat = TRUE;
507  else
508  QuickFormat = FALSE;
509 
510  /* get the cluster size */
511  hDlgCtrl = GetDlgItem(hwndDlg, 28680);
512  iSelIndex = SendMessageW(hDlgCtrl, CB_GETCURSEL, 0, 0);
513  if (iSelIndex == CB_ERR)
514  {
515  FIXME("\n");
516  return;
517  }
518  ClusterSize = SendMessageW(hDlgCtrl, CB_GETITEMDATA, iSelIndex, 0);
519  if ((int)ClusterSize == CB_ERR)
520  {
521  FIXME("\n");
522  return;
523  }
524 
525  hDlgCtrl = GetDlgItem(hwndDlg, 28680);
526  SendMessageW(hDlgCtrl, PBM_SETRANGE, 0, MAKELPARAM(0, 100));
527  bSuccess = FALSE;
528 
529  /* FIXME
530  * will cause display problems
531  * when performing more than one format
532  */
533  FormatDrvDialog = hwndDlg;
534 
535  /* See if the drive is removable or not */
536  DriveType = GetDriveTypeW(szDrive);
537  switch (DriveType)
538  {
539  case DRIVE_UNKNOWN:
540  case DRIVE_REMOTE:
541  case DRIVE_CDROM:
542  case DRIVE_NO_ROOT_DIR:
543  {
544  FIXME("\n");
545  return;
546  }
547 
548  case DRIVE_REMOVABLE:
549  MediaFlag = FMIFS_FLOPPY;
550  break;
551 
552  case DRIVE_FIXED:
553  case DRIVE_RAMDISK:
554  MediaFlag = FMIFS_HARDDISK;
555  break;
556  }
557 
558  /* Format the drive */
559  FormatEx(szDrive,
560  MediaFlag,
561  szFileSys,
562  szLabel,
563  QuickFormat,
564  ClusterSize,
565  FormatExCB);
566 
568  if (!bSuccess)
569  {
570  pContext->Result = SHFMT_ERROR;
571  }
572  else if (QuickFormat)
573  {
574  pContext->Result = SHFMT_OPT_FULL;
575  }
576  else
577  {
578  pContext->Result = FALSE;
579  }
580 }
#define WM_GETTEXTLENGTH
Definition: winuser.h:1601
#define CB_GETLBTEXTLEN
Definition: winuser.h:1935
#define TRUE
Definition: types.h:120
#define CB_GETLBTEXT
Definition: winuser.h:1934
#define SHFMT_ERROR
Definition: shlobj.h:292
#define _countof(array)
Definition: fontsub.cpp:30
#define CB_GETITEMDATA
Definition: winuser.h:1932
#define WM_GETTEXT
Definition: winuser.h:1600
#define MAKELPARAM(l, h)
Definition: winuser.h:3983
#define DRIVE_RAMDISK
Definition: winbase.h:252
UINT DriveType
int32_t INT
Definition: typedefs.h:56
static BOOLEAN bSuccess
Definition: drive.cpp:419
#define CB_GETCURSEL
Definition: winuser.h:1925
#define DRIVE_REMOVABLE
Definition: winbase.h:248
static HWND FormatDrvDialog
Definition: drive.cpp:418
#define PBM_SETRANGE
Definition: commctrl.h:2179
#define DRIVE_REMOTE
Definition: winbase.h:250
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define BM_GETCHECK
Definition: winuser.h:1900
BOOL QuickFormat
Definition: format.c:66
#define DRIVE_UNKNOWN
Definition: winbase.h:253
#define CB_ERR
Definition: winuser.h:2410
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
VOID NTAPI FormatEx(IN PWCHAR DriveRoot, IN FMIFS_MEDIA_FLAG MediaFlag, IN PWCHAR Format, IN PWCHAR Label, IN BOOLEAN QuickFormat, IN ULONG ClusterSize, IN PFMIFSCALLBACK Callback)
Definition: format.c:38
static BOOLEAN NTAPI FormatExCB(IN CALLBACKCOMMAND Command, IN ULONG SubAction, IN PVOID ActionInfo)
Definition: drive.cpp:422
DWORD ClusterSize
Definition: format.c:67
unsigned long DWORD
Definition: ntddk_ex.h:95
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
static const WCHAR L[]
Definition: oid.c:1250
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
Definition: disk.c:497
#define DRIVE_NO_ROOT_DIR
Definition: winbase.h:254
#define DRIVE_FIXED
Definition: winbase.h:249
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define DRIVE_CDROM
Definition: winbase.h:251
unsigned int UINT
Definition: ndis.h:50
#define BST_CHECKED
Definition: winuser.h:197
#define SHFMT_OPT_FULL
Definition: shlobj.h:298
FMIFS_MEDIA_FLAG
Definition: fmifs.h:37

Referenced by DoFormatDrive().

◆ FormatDriveDlg()

static INT_PTR CALLBACK FormatDriveDlg ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 623 of file drive.cpp.

624 {
625  PFORMAT_DRIVE_CONTEXT pContext;
626 
627  switch(uMsg)
628  {
629  case WM_INITDIALOG:
632  return TRUE;
633  case WM_COMMAND:
634  switch(LOWORD(wParam))
635  {
636  case IDOK:
637  pContext = (PFORMAT_DRIVE_CONTEXT)GetWindowLongPtr(hwndDlg, DWLP_USER);
638  if (pContext->bFormattingNow)
639  break;
640 
641  if (ShellMessageBoxW(shell32_hInstance, hwndDlg,
645  {
646  pContext->bFormattingNow = TRUE;
647 
649  pParams->hwndDlg = hwndDlg;
650  pParams->pContext = pContext;
651 
652  unsigned tid;
653  HANDLE hThread = (HANDLE)_beginthreadex(NULL, 0, DoFormatDrive, pParams, 0, &tid);
655  }
656  break;
657  case IDCANCEL:
658  pContext = (PFORMAT_DRIVE_CONTEXT)GetWindowLongPtr(hwndDlg, DWLP_USER);
659  if (pContext->bFormattingNow)
660  break;
661 
662  EndDialog(hwndDlg, pContext->Result);
663  break;
664  case 28677: // filesystem combo
665  if (HIWORD(wParam) == CBN_SELENDOK)
666  {
667  pContext = (PFORMAT_DRIVE_CONTEXT)GetWindowLongPtr(hwndDlg, DWLP_USER);
668  if (pContext->bFormattingNow)
669  break;
670 
671  InsertDefaultClusterSizeForFs(hwndDlg, pContext);
672  }
673  break;
674  }
675  }
676  return FALSE;
677 }
#define TRUE
Definition: types.h:120
#define IDOK
Definition: winuser.h:824
#define CloseHandle
Definition: compat.h:406
_CRTIMP uintptr_t __cdecl _beginthreadex(_In_opt_ void *_Security, _In_ unsigned _StackSize, _In_ unsigned(__stdcall *_StartAddress)(void *), _In_opt_ void *_ArgList, _In_ unsigned _InitFlag, _Out_opt_ unsigned *_ThrdAddr)
#define SetWindowLongPtr
Definition: treelist.c:70
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
#define MB_ICONWARNING
Definition: winuser.h:780
static VOID InsertDefaultClusterSizeForFs(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext)
Definition: drive.cpp:187
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
#define CBN_SELENDOK
Definition: winuser.h:1963
smooth NULL
Definition: ftsmooth.c:416
#define MB_OKCANCEL
Definition: winuser.h:798
#define IDS_FORMAT_WARNING
Definition: shresdef.h:191
int ShellMessageBoxW(HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType,...)
Definition: shellord.c:337
PVOID HANDLE
Definition: typedefs.h:71
static VOID InitializeFormatDriveDlg(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext)
Definition: drive.cpp:339
#define IDS_FORMAT_TITLE
Definition: shresdef.h:190
#define DWLP_USER
Definition: winuser.h:866
#define WM_COMMAND
Definition: winuser.h:1722
PFORMAT_DRIVE_CONTEXT pContext
Definition: drive.cpp:585
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
HANDLE hThread
Definition: wizard.c:27
struct FORMAT_DRIVE_CONTEXT * PFORMAT_DRIVE_CONTEXT
#define HIWORD(l)
Definition: typedefs.h:246
static unsigned __stdcall DoFormatDrive(void *args)
Definition: drive.cpp:588
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define GetWindowLongPtr
Definition: treelist.c:73
#define IDCANCEL
Definition: winuser.h:825
static TfClientId tid
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82

Referenced by SHFormatDrive().

◆ FormatExCB()

static BOOLEAN NTAPI FormatExCB ( IN CALLBACKCOMMAND  Command,
IN ULONG  SubAction,
IN PVOID  ActionInfo 
)
static

Definition at line 422 of file drive.cpp.

426 {
427  PDWORD Progress;
428  PBOOLEAN pSuccess;
429  switch(Command)
430  {
431  case PROGRESS:
432  Progress = (PDWORD)ActionInfo;
433  SendDlgItemMessageW(FormatDrvDialog, 28678, PBM_SETPOS, (WPARAM)*Progress, 0);
434  break;
435  case DONE:
436  pSuccess = (PBOOLEAN)ActionInfo;
437  bSuccess = (*pSuccess);
440  break;
441 
442  case VOLUMEINUSE:
443  case INSUFFICIENTRIGHTS:
444  case FSNOTSUPPORTED:
445  case CLUSTERSIZETOOSMALL:
446  bSuccess = FALSE;
447  FIXME("\n");
448  break;
449 
450  default:
451  break;
452  }
453 
454  return TRUE;
455 }
#define TRUE
Definition: types.h:120
Definition: fmifs.h:68
#define PBM_SETPOS
Definition: commctrl.h:2180
UINT_PTR WPARAM
Definition: windef.h:207
Definition: shell.h:41
static BOOLEAN bSuccess
Definition: drive.cpp:419
static HWND FormatDrvDialog
Definition: drive.cpp:418
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
#define FIXME(fmt,...)
Definition: debug.h:110
int ShellMessageBoxW(HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType,...)
Definition: shellord.c:337
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDS_FORMAT_TITLE
Definition: shresdef.h:190
#define MB_ICONINFORMATION
Definition: winuser.h:796
char * PBOOLEAN
Definition: retypes.h:11
#define IDS_FORMAT_COMPLETE
Definition: shresdef.h:192
#define MB_OK
Definition: winuser.h:784
DWORD * PDWORD
Definition: pedump.c:68
#define DONE
Definition: rnr20lib.h:14
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

Referenced by FormatDrive().

◆ GetDefaultClusterSize()

static BOOL GetDefaultClusterSize ( LPWSTR  szFs,
PDWORD  pClusterSize,
PULARGE_INTEGER  TotalNumberOfBytes 
)
static

Definition at line 39 of file drive.cpp.

40 {
42 
43  if (!wcsicmp(szFs, L"FAT16") ||
44  !wcsicmp(szFs, L"FAT")) //REACTOS HACK
45  {
46  if (TotalNumberOfBytes->QuadPart <= (16 * 1024 * 1024))
47  ClusterSize = 2048;
48  else if (TotalNumberOfBytes->QuadPart <= (32 * 1024 * 1024))
49  ClusterSize = 512;
50  else if (TotalNumberOfBytes->QuadPart <= (64 * 1024 * 1024))
51  ClusterSize = 1024;
52  else if (TotalNumberOfBytes->QuadPart <= (128 * 1024 * 1024))
53  ClusterSize = 2048;
54  else if (TotalNumberOfBytes->QuadPart <= (256 * 1024 * 1024))
55  ClusterSize = 4096;
56  else if (TotalNumberOfBytes->QuadPart <= (512 * 1024 * 1024))
57  ClusterSize = 8192;
58  else if (TotalNumberOfBytes->QuadPart <= (1024 * 1024 * 1024))
59  ClusterSize = 16384;
60  else if (TotalNumberOfBytes->QuadPart <= (2048LL * 1024LL * 1024LL))
61  ClusterSize = 32768;
62  else if (TotalNumberOfBytes->QuadPart <= (4096LL * 1024LL * 1024LL))
63  ClusterSize = 8192;
64  else
65  return FALSE;
66  }
67  else if (!wcsicmp(szFs, L"FAT32"))
68  {
69  if (TotalNumberOfBytes->QuadPart <= (64 * 1024 * 1024))
70  ClusterSize = 512;
71  else if (TotalNumberOfBytes->QuadPart <= (128 * 1024 * 1024))
72  ClusterSize = 1024;
73  else if (TotalNumberOfBytes->QuadPart <= (256 * 1024 * 1024))
74  ClusterSize = 2048;
75  else if (TotalNumberOfBytes->QuadPart <= (8192LL * 1024LL * 1024LL))
76  ClusterSize = 2048;
77  else if (TotalNumberOfBytes->QuadPart <= (16384LL * 1024LL * 1024LL))
78  ClusterSize = 8192;
79  else if (TotalNumberOfBytes->QuadPart <= (32768LL * 1024LL * 1024LL))
80  ClusterSize = 16384;
81  else
82  return FALSE;
83  }
84  else if (!wcsicmp(szFs, L"NTFS"))
85  {
86  if (TotalNumberOfBytes->QuadPart <= (512 * 1024 * 1024))
87  ClusterSize = 512;
88  else if (TotalNumberOfBytes->QuadPart <= (1024 * 1024 * 1024))
89  ClusterSize = 1024;
90  else if (TotalNumberOfBytes->QuadPart <= (2048LL * 1024LL * 1024LL))
91  ClusterSize = 2048;
92  else
93  ClusterSize = 2048;
94  }
95  else if (!wcsicmp(szFs, L"EXT2"))
96  {
97  // auto block size calculation
98  ClusterSize = 0;
99  }
100  else if (!wcsicmp(szFs, L"BtrFS"))
101  {
102  // auto block size calculation
103  ClusterSize = 0;
104  }
105  else
106  return FALSE;
107 
108  *pClusterSize = ClusterSize;
109  return TRUE;
110 }
#define TRUE
Definition: types.h:120
#define LL
Definition: tui.h:85
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
DWORD ClusterSize
Definition: format.c:67
unsigned long DWORD
Definition: ntddk_ex.h:95
static const WCHAR L[]
Definition: oid.c:1250
#define wcsicmp
Definition: string.h:1152

Referenced by InsertDefaultClusterSizeForFs().

◆ InitializeFormatDriveDlg()

static VOID InitializeFormatDriveDlg ( HWND  hwndDlg,
PFORMAT_DRIVE_CONTEXT  pContext 
)
static

Definition at line 339 of file drive.cpp.

340 {
341  WCHAR szText[120];
342  WCHAR szDrive[] = L"C:\\";
343  WCHAR szFs[30] = L"";
344  INT cchText;
345  ULARGE_INTEGER FreeBytesAvailableUser, TotalNumberOfBytes;
346  DWORD dwIndex, dwDefault;
347  UCHAR uMinor, uMajor;
348  BOOLEAN Latest;
349  HWND hwndFileSystems;
350 
351  cchText = GetWindowTextW(hwndDlg, szText, _countof(szText) - 1);
352  if (cchText < 0)
353  cchText = 0;
354  szText[cchText++] = L' ';
355  szDrive[0] = pContext->Drive + L'A';
356  if (GetVolumeInformationW(szDrive, &szText[cchText], _countof(szText) - cchText, NULL, NULL, NULL, szFs, _countof(szFs)))
357  {
358  if (szText[cchText] == UNICODE_NULL)
359  {
360  /* load default volume label */
362  }
363  else
364  {
365  /* set volume label */
366  SetDlgItemTextW(hwndDlg, 28679, &szText[cchText]);
368  }
369  }
370 
371  StringCchPrintfW(szText + cchText, _countof(szText) - cchText, L" (%c:)", szDrive[0]);
372 
373  /* set window text */
374  SetWindowTextW(hwndDlg, szText);
375 
376  if (GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailableUser, &TotalNumberOfBytes, NULL))
377  {
378  if (StrFormatByteSizeW(TotalNumberOfBytes.QuadPart, szText, _countof(szText)))
379  {
380  /* add drive capacity */
381  SendDlgItemMessageW(hwndDlg, 28673, CB_ADDSTRING, 0, (LPARAM)szText);
382  SendDlgItemMessageW(hwndDlg, 28673, CB_SETCURSEL, 0, (LPARAM)0);
383  }
384  }
385 
386  if (pContext->Options & SHFMT_OPT_FULL)
387  {
388  /* check quick format button */
389  SendDlgItemMessageW(hwndDlg, 28674, BM_SETCHECK, BST_CHECKED, 0);
390  }
391 
392  /* enumerate all available filesystems */
393  dwIndex = 0;
394  dwDefault = 0;
395  hwndFileSystems = GetDlgItem(hwndDlg, 28677);
396 
397  while(QueryAvailableFileSystemFormat(dwIndex, szText, &uMajor, &uMinor, &Latest))
398  {
399  if (!wcsicmp(szText, szFs))
400  dwDefault = dwIndex;
401 
402  SendMessageW(hwndFileSystems, CB_ADDSTRING, 0, (LPARAM)szText);
403  dwIndex++;
404  }
405 
406  if (!dwIndex)
407  {
408  ERR("no filesystem providers\n");
409  return;
410  }
411 
412  /* select default filesys */
413  SendMessageW(hwndFileSystems, CB_SETCURSEL, dwDefault, 0);
414  /* setup cluster combo */
415  InsertDefaultClusterSizeForFs(hwndDlg, pContext);
416 }
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
Definition: string.c:2376
#define _countof(array)
Definition: fontsub.cpp:30
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int32_t INT
Definition: typedefs.h:56
static VOID InsertDefaultClusterSizeForFs(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext)
Definition: drive.cpp:187
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define UNICODE_NULL
static const WCHAR szText[]
Definition: dialog.c:139
#define CB_ADDSTRING
Definition: winuser.h:1918
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
_In_ int cchText
Definition: winuser.h:4440
#define BM_SETCHECK
Definition: winuser.h:1903
#define IDS_DRIVE_FIXED
Definition: shresdef.h:105
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
unsigned char UCHAR
Definition: xmlstorage.h:181
static const WCHAR L[]
Definition: oid.c:1250
#define CB_SETCURSEL
Definition: winuser.h:1943
#define wcsicmp
Definition: string.h:1152
#define ERR(fmt,...)
Definition: debug.h:109
BOOL WINAPI GetVolumeInformationW(IN LPCWSTR lpRootPathName, IN LPWSTR lpVolumeNameBuffer, IN DWORD nVolumeNameSize, OUT LPDWORD lpVolumeSerialNumber OPTIONAL, OUT LPDWORD lpMaximumComponentLength OPTIONAL, OUT LPDWORD lpFileSystemFlags OPTIONAL, OUT LPWSTR lpFileSystemNameBuffer OPTIONAL, IN DWORD nFileSystemNameSize)
Definition: volume.c:226
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1408
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
#define BST_CHECKED
Definition: winuser.h:197
#define SHFMT_OPT_FULL
Definition: shlobj.h:298
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
BOOL WINAPI GetDiskFreeSpaceExW(IN LPCWSTR lpDirectoryName OPTIONAL, OUT PULARGE_INTEGER lpFreeBytesAvailableToCaller, OUT PULARGE_INTEGER lpTotalNumberOfBytes, OUT PULARGE_INTEGER lpTotalNumberOfFreeBytes)
Definition: disk.c:342
BOOLEAN NTAPI QueryAvailableFileSystemFormat(IN DWORD Index, IN OUT PWCHAR FileSystem, OUT UCHAR *Major, OUT UCHAR *Minor, OUT BOOLEAN *LatestVersion)
Definition: query.c:14

Referenced by FormatDriveDlg().

◆ InsertDefaultClusterSizeForFs()

static VOID InsertDefaultClusterSizeForFs ( HWND  hwndDlg,
PFORMAT_DRIVE_CONTEXT  pContext 
)
static

Definition at line 187 of file drive.cpp.

188 {
189  WCHAR wszBuf[100] = {0};
190  WCHAR szDrive[] = L"C:\\";
191  INT iSelIndex;
192  ULARGE_INTEGER FreeBytesAvailableUser, TotalNumberOfBytes;
194  LRESULT lIndex;
195  HWND hDlgCtrl;
196 
197  hDlgCtrl = GetDlgItem(hwndDlg, 28677);
198  iSelIndex = SendMessage(hDlgCtrl, CB_GETCURSEL, 0, 0);
199  if (iSelIndex == CB_ERR)
200  return;
201 
202  if (SendMessageW(hDlgCtrl, CB_GETLBTEXT, iSelIndex, (LPARAM)wszBuf) == CB_ERR)
203  return;
204 
205  szDrive[0] = pContext->Drive + L'A';
206 
207  if (!GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailableUser, &TotalNumberOfBytes, NULL))
208  return;
209 
210  if (!wcsicmp(wszBuf, L"FAT16") ||
211  !wcsicmp(wszBuf, L"FAT")) //REACTOS HACK
212  {
213  if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes))
214  {
215  TRACE("FAT16 is not supported on hdd larger than 4G current %lu\n", TotalNumberOfBytes.QuadPart);
216  SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0);
217  return;
218  }
219 
221  {
222  hDlgCtrl = GetDlgItem(hwndDlg, 28680);
223  SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0);
224  lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf);
225  if (lIndex != CB_ERR)
226  SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize);
227  SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0);
228  }
229 
230  SendMessageW(GetDlgItem(hwndDlg, 28675), BM_SETCHECK, BST_UNCHECKED, 0);
231  EnableWindow(GetDlgItem(hwndDlg, 28675), FALSE);
232  }
233  else if (!wcsicmp(wszBuf, L"FAT32"))
234  {
235  if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes))
236  {
237  TRACE("FAT32 is not supported on hdd larger than 32G current %lu\n", TotalNumberOfBytes.QuadPart);
238  SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0);
239  return;
240  }
241 
243  {
244  hDlgCtrl = GetDlgItem(hwndDlg, 28680);
245  SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0);
246  lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf);
247  if (lIndex != CB_ERR)
248  SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize);
249  SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0);
250  }
251 
252  SendMessageW(GetDlgItem(hwndDlg, 28675), BM_SETCHECK, BST_UNCHECKED, 0);
253  EnableWindow(GetDlgItem(hwndDlg, 28675), FALSE);
254  }
255  else if (!wcsicmp(wszBuf, L"NTFS"))
256  {
257  if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes))
258  {
259  TRACE("NTFS is not supported on hdd larger than 2TB current %lu\n", TotalNumberOfBytes.QuadPart);
260  SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0);
261  return;
262  }
263 
264  hDlgCtrl = GetDlgItem(hwndDlg, 28680);
266  {
267  SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0);
268  lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf);
269  if (lIndex != CB_ERR)
270  SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize);
271  SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0);
272  }
273  ClusterSize = 512;
274  for (lIndex = 0; lIndex < 4; lIndex++)
275  {
276  TotalNumberOfBytes.QuadPart = ClusterSize;
277  if (StrFormatByteSizeW(TotalNumberOfBytes.QuadPart, wszBuf, _countof(wszBuf)))
278  {
279  lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf);
280  if (lIndex != CB_ERR)
281  SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize);
282  }
283  ClusterSize *= 2;
284  }
285 
286  EnableWindow(GetDlgItem(hwndDlg, 28675), TRUE);
287  }
288  else if (!wcsicmp(wszBuf, L"EXT2"))
289  {
290  if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes))
291  {
292  TRACE("EXT2 is not supported on hdd larger than 32T current %lu\n", TotalNumberOfBytes.QuadPart);
293  SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0);
294  return;
295  }
296 
298  {
299  hDlgCtrl = GetDlgItem(hwndDlg, 28680);
300  SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0);
301  lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf);
302  if (lIndex != CB_ERR)
303  SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize);
304  SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0);
305  }
306 
307  EnableWindow(GetDlgItem(hwndDlg, 28675), TRUE);
308  }
309  else if (!wcsicmp(wszBuf, L"BtrFS"))
310  {
311  if (!GetDefaultClusterSize(wszBuf, &ClusterSize, &TotalNumberOfBytes))
312  {
313  TRACE("BtrFS is not supported on hdd larger than 16E current %lu\n", TotalNumberOfBytes.QuadPart);
314  SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0);
315  return;
316  }
317 
319  {
320  hDlgCtrl = GetDlgItem(hwndDlg, 28680);
321  SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0);
322  lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)wszBuf);
323  if (lIndex != CB_ERR)
324  SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize);
325  SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0);
326  }
327 
328  EnableWindow(GetDlgItem(hwndDlg, 28675), TRUE);
329  }
330  else
331  {
332  FIXME("unknown fs\n");
333  SendDlgItemMessageW(hwndDlg, 28680, CB_RESETCONTENT, iSelIndex, 0);
334  return;
335  }
336 }
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
Definition: string.c:2376
#define CB_SETITEMDATA
Definition: winuser.h:1948
#define TRUE
Definition: types.h:120
#define CB_GETLBTEXT
Definition: winuser.h:1934
#define _countof(array)
Definition: fontsub.cpp:30
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int32_t INT
Definition: typedefs.h:56
#define CB_GETCURSEL
Definition: winuser.h:1925
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define FIXME(fmt,...)
Definition: debug.h:110
#define CB_ADDSTRING
Definition: winuser.h:1918
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define CB_RESETCONTENT
Definition: winuser.h:1941
#define CB_ERR
Definition: winuser.h:2410
#define BM_SETCHECK
Definition: winuser.h:1903
#define TRACE(s)
Definition: solgame.cpp:4
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD ClusterSize
Definition: format.c:67
unsigned long DWORD
Definition: ntddk_ex.h:95
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static const WCHAR L[]
Definition: oid.c:1250
#define CB_SETCURSEL
Definition: winuser.h:1943
#define BST_UNCHECKED
Definition: winuser.h:199
#define wcsicmp
Definition: string.h:1152
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDS_DEFAULT_CLUSTER_SIZE
Definition: shresdef.h:213
#define SendMessage
Definition: winuser.h:5818
#define CB_DELETESTRING
Definition: winuser.h:1919
LONG_PTR LRESULT
Definition: windef.h:209
static BOOL GetDefaultClusterSize(LPWSTR szFs, PDWORD pClusterSize, PULARGE_INTEGER TotalNumberOfBytes)
Definition: drive.cpp:39
BOOL WINAPI GetDiskFreeSpaceExW(IN LPCWSTR lpDirectoryName OPTIONAL, OUT PULARGE_INTEGER lpFreeBytesAvailableToCaller, OUT PULARGE_INTEGER lpTotalNumberOfBytes, OUT PULARGE_INTEGER lpTotalNumberOfFreeBytes)
Definition: disk.c:342

Referenced by FormatDriveDlg(), and InitializeFormatDriveDlg().

◆ SH_CreatePropertySheetPage()

HPROPSHEETPAGE SH_CreatePropertySheetPage ( LPCSTR  resname,
DLGPROC  dlgproc,
LPARAM  lParam,
LPWSTR  szTitle 
)

◆ SH_ShowDriveProperties()

HRESULT SH_ShowDriveProperties ( WCHAR pwszDrive,
LPCITEMIDLIST  pidlFolder,
PCUITEMID_CHILD_ARRAY  apidl 
)

Definition at line 120 of file drive.cpp.

121 {
122  HPSXA hpsx = NULL;
124  PROPSHEETHEADERW psh;
125  CComObject<CDrvDefExt> *pDrvDefExt = NULL;
126  WCHAR wszName[256];
127 
128  ZeroMemory(&psh, sizeof(PROPSHEETHEADERW));
129  psh.dwSize = sizeof(PROPSHEETHEADERW);
130  psh.dwFlags = 0; // FIXME: make it modeless
131  psh.hwndParent = NULL;
132  psh.nStartPage = 0;
133  psh.phpage = hpsp;
134 
135  LPITEMIDLIST completePidl = ILCombine(pidlFolder, apidl[0]);
136  if (!completePidl)
137  return E_OUTOFMEMORY;
138 
139  if (ILGetDisplayNameExW(NULL, completePidl, wszName, ILGDN_NORMAL))
140  {
141  psh.pszCaption = wszName;
142  psh.dwFlags |= PSH_PROPTITLE;
143  }
144 
145  ILFree(completePidl);
146 
147  CComPtr<IDataObject> pDataObj;
148  HRESULT hr = SHCreateDataObject(pidlFolder, 1, apidl, NULL, IID_PPV_ARG(IDataObject, &pDataObj));
149 
150  if (SUCCEEDED(hr))
151  {
152  hr = CComObject<CDrvDefExt>::CreateInstance(&pDrvDefExt);
153  if (SUCCEEDED(hr))
154  {
155  pDrvDefExt->AddRef(); // CreateInstance returns object with 0 ref count
156  hr = pDrvDefExt->Initialize(pidlFolder, pDataObj, NULL);
157  if (SUCCEEDED(hr))
158  {
159  hr = pDrvDefExt->AddPages(AddPropSheetPageCallback, (LPARAM)&psh);
160  if (FAILED(hr))
161  ERR("AddPages failed\n");
162  } else
163  ERR("Initialize failed\n");
164  }
165 
167  if (hpsx)
169  }
170 
171  // NOTE: Currently property sheet is modal. If we make it modeless, then it returns HWND.
172  INT_PTR ret = PropertySheetW(&psh);
173 
174  if (hpsx)
176  if (pDrvDefExt)
177  pDrvDefExt->Release();
178 
179  if (ret > 0)
180  return S_OK;
181  if (ret == 0)
182  return S_FALSE;
183  return E_FAIL;
184 }
void WINAPI SHDestroyPropSheetExtArray(HPSXA hpsxa)
Definition: shellord.c:1755
HWND hwndParent
Definition: prsht.h:277
BOOL CALLBACK AddPropSheetPageCallback(HPROPSHEETPAGE hPage, LPARAM lParam)
Definition: precomp.h:113
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
HRESULT hr
Definition: shlfolder.c:183
HRESULT WINAPI SHCreateDataObject(PCIDLIST_ABSOLUTE pidlFolder, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, IDataObject *pdtInner, REFIID riid, void **ppv)
UINT WINAPI SHAddFromPropSheetExtArray(HPSXA hpsxa, LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam)
Definition: shellord.c:1577
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:699
#define ZeroMemory
Definition: winbase.h:1642
BOOL(CALLBACK * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM)
Definition: prsht.h:309
struct _PROPSHEETHEADERW PROPSHEETHEADERW
int32_t INT_PTR
Definition: typedefs.h:62
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
LPCWSTR pszCaption
Definition: prsht.h:283
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
#define ILGDN_NORMAL
Definition: undocshell.h:69
LONG_PTR LPARAM
Definition: windef.h:208
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2905
BOOL ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD type)
Definition: pidl.c:91
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define PSH_PROPTITLE
Definition: prsht.h:40
LONG HRESULT
Definition: typedefs.h:77
DWORD dwSize
Definition: prsht.h:275
DWORD dwFlags
Definition: prsht.h:276
int ret
static const WCHAR L[]
Definition: oid.c:1250
HPROPSHEETPAGE * phpage
Definition: prsht.h:291
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
EXTERN_C HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface, IDataObject *pDataObj)
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
#define MAX_PROPERTY_SHEET_PAGE
#define SUCCEEDED(hr)
Definition: intsafe.h:57
UINT nStartPage
Definition: prsht.h:286

Referenced by DrivesContextMenuCallback(), and SH_ShowPropertiesDialog().

◆ SHCreatePropSheetExtArrayEx()

EXTERN_C HPSXA WINAPI SHCreatePropSheetExtArrayEx ( HKEY  hKey,
LPCWSTR  pszSubKey,
UINT  max_iface,
IDataObject pDataObj 
)

Referenced by SH_ShowDriveProperties().

◆ SHFormatDrive()

DWORD WINAPI SHFormatDrive ( HWND  hwnd,
UINT  drive,
UINT  fmtID,
UINT  options 
)

Definition at line 685 of file drive.cpp.

686 {
688  int result;
689 
690  TRACE("%p, 0x%08x, 0x%08x, 0x%08x - stub\n", hwnd, drive, fmtID, options);
691 
692  Context.Drive = drive;
693  Context.Options = options;
694  Context.Result = FALSE;
695  Context.bFormattingNow = FALSE;
696 
698 
699  return result;
700 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
LONG_PTR LPARAM
Definition: windef.h:208
int options
Definition: main.c:106
#define TRACE(s)
Definition: solgame.cpp:4
#define IDD_FORMAT_DRIVE
Definition: shresdef.h:449
static char drive[2]
Definition: batch.c:28
static INT_PTR CALLBACK FormatDriveDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: drive.cpp:623
struct tagContext Context
Definition: acpixf.h:1030
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
GLuint64EXT * result
Definition: glext.h:11304

Referenced by format_drive_thread().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shell  )

Variable Documentation

◆ bSuccess

BOOLEAN bSuccess = FALSE
static

Definition at line 419 of file drive.cpp.

Referenced by AllowWinstaAccess(), CloseProcess(), CopyKeyName(), CreateClientProcess(), CreateNewKey(), DoExport(), DoImport(), DoWriteFile(), DPLAYX_ConstructData(), DPLAYX_DestructData(), DPLAYX_GetConnectionSettingsA(), DPLAYX_GetConnectionSettingsW(), EnablePrivilege(), EnablePrivilegeInCurrentProcess(), FormatDrive(), FormatExCB(), FTP_Connect(), FTP_ConnectToHost(), FTP_ConvertFileProp(), FTP_DoPassive(), FTP_FtpCreateDirectoryW(), FTP_FtpDeleteFileW(), FTP_FtpGetCurrentDirectoryW(), FTP_FtpGetFileW(), FTP_FtpOpenFileW(), FTP_FtpPutFileW(), FTP_FtpRemoveDirectoryW(), FTP_FtpRenameFileW(), FTP_FtpSetCurrentDirectoryW(), FTP_InitListenSocket(), FTP_ParseDirectory(), FTP_ParsePermission(), FTP_SendAccount(), FTP_SendPassword(), FTP_SendPort(), FTP_SendStore(), FTP_SendType(), GetName(), CDeviceView::Initialize(), INTERNET_AsyncCall(), IntGdiGetFontResourceInfo(), IsWlanAdapter(), LaunchProcess(), CDeviceView::ListDevicesByType(), LoadDIBImage(), LoadTextFileToEdit(), main(), CNewMenu::NewItemByNonCommand(), NOTEPAD_FindNext(), CGridView::OnPaint(), OpenAdapterHandle(), OpenDriverHandle(), PipeReadThread(), ReadText(), CDeviceView::RecurseChildDevices(), RecycleBinDlg(), RefreshTreeItem(), RenderFILENAMEA(), RenderFILENAMEW(), CShellLink::Resolve(), SaveServicesToFile(), SaveTextFileFromEdit(), SetDriverLoadPrivilege(), CShellLink::SetIconLocation(), SHGetPathFromIDListA(), WlanConnect(), WlanDisconnect(), WlanPrintCurrentStatus(), WlanScan(), wmain(), WriteEncodedText(), and WriteEvent().

◆ FormatDrvDialog

HWND FormatDrvDialog = NULL
static

Definition at line 418 of file drive.cpp.

Referenced by FormatDrive(), and FormatExCB().