ReactOS 0.4.15-dev-8100-g1887773
BtrfsDeviceAdd Class Reference

#include <devices.h>

Collaboration diagram for BtrfsDeviceAdd:

Public Member Functions

INT_PTR CALLBACK DeviceAddDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void ShowDialog ()
 
void AddDevice (HWND hwndDlg)
 
 BtrfsDeviceAdd (HINSTANCE hinst, HWND hwnd, WCHAR *cmdline)
 

Private Member Functions

void populate_device_tree (HWND tree)
 

Private Attributes

HINSTANCE hinst
 
HWND hwnd
 
WCHARcmdline
 
devicesel
 
vector< devicedevice_list
 

Detailed Description

Definition at line 139 of file devices.h.

Constructor & Destructor Documentation

◆ BtrfsDeviceAdd()

BtrfsDeviceAdd::BtrfsDeviceAdd ( HINSTANCE  hinst,
HWND  hwnd,
WCHAR cmdline 
)

Definition at line 648 of file devices.cpp.

648 {
649 this->hinst = hinst;
650 this->hwnd = hwnd;
651 this->cmdline = cmdline;
652
653 sel = nullptr;
654}
HINSTANCE hinst
Definition: devices.h:149
WCHAR * cmdline
Definition: devices.h:151
device * sel
Definition: devices.h:152

Member Function Documentation

◆ AddDevice()

void BtrfsDeviceAdd::AddDevice ( HWND  hwndDlg)

Definition at line 496 of file devices.cpp.

496 {
497 wstring mess, title;
502
503 if (!sel) {
504 EndDialog(hwndDlg, 0);
505 return;
506 }
507
508 if (sel->fstype != L"") {
509 wstring s;
510
512 throw last_error(GetLastError());
513
514 wstring_sprintf(mess, s, sel->fstype.c_str());
515 } else {
517 throw last_error(GetLastError());
518 }
519
521 throw last_error(GetLastError());
522
523 if (MessageBoxW(hwndDlg, mess.c_str(), title.c_str(), MB_YESNO) != IDYES)
524 return;
525
528
529 if (h == INVALID_HANDLE_VALUE)
530 throw last_error(GetLastError());
531
532 {
533 nt_handle h2;
534
535 vn.Length = vn.MaximumLength = (uint16_t)(sel->pnp_name.length() * sizeof(WCHAR));
536 vn.Buffer = (WCHAR*)sel->pnp_name.c_str();
537
539
541 if (!NT_SUCCESS(Status))
542 throw ntstatus_error(Status);
543
544 if (!sel->is_disk) {
545 Status = NtFsControlFile(h2, nullptr, nullptr, nullptr, &iosb, FSCTL_LOCK_VOLUME, nullptr, 0, nullptr, 0);
546 if (!NT_SUCCESS(Status))
548 }
549
550 Status = NtFsControlFile(h, nullptr, nullptr, nullptr, &iosb, FSCTL_BTRFS_ADD_DEVICE, &h2, sizeof(HANDLE), nullptr, 0);
551 if (!NT_SUCCESS(Status))
552 throw ntstatus_error(Status);
553
554 if (!sel->is_disk) {
555 Status = NtFsControlFile(h2, nullptr, nullptr, nullptr, &iosb, FSCTL_DISMOUNT_VOLUME, nullptr, 0, nullptr, 0);
556 if (!NT_SUCCESS(Status))
557 throw ntstatus_error(Status);
558
559 Status = NtFsControlFile(h2, nullptr, nullptr, nullptr, &iosb, FSCTL_UNLOCK_VOLUME, nullptr, 0, nullptr, 0);
560 if (!NT_SUCCESS(Status))
561 throw ntstatus_error(Status);
562 }
563 }
564
565 EndDialog(hwndDlg, 0);
566}
LONG NTSTATUS
Definition: precomp.h:26
#define FSCTL_BTRFS_ADD_DEVICE
Definition: btrfsioctl.h:19
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
void wstring_sprintf(wstring &s, wstring fmt,...)
Definition: main.cpp:225
#define IDS_ADD_DEVICE_CONFIRMATION_FS
Definition: resource.h:99
#define IDS_ADD_DEVICE_CONFIRMATION
Definition: resource.h:98
#define IDS_LOCK_FAILED
Definition: resource.h:122
#define IDS_CONFIRMATION_TITLE
Definition: resource.h:97
#define OPEN_EXISTING
Definition: compat.h:775
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileW
Definition: compat.h:741
#define FILE_SHARE_READ
Definition: compat.h:136
#define FILE_SYNCHRONOUS_IO_ALERT
Definition: from_kernel.h:30
Status
Definition: gdiplustypes.h:25
GLdouble s
Definition: gl.h:2039
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
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 vn
Definition: glfuncs.h:238
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define FILE_FLAG_OPEN_REPARSE_POINT
Definition: disk.h:39
#define FILE_FLAG_BACKUP_SEMANTICS
Definition: disk.h:41
static PIO_STATUS_BLOCK iosb
Definition: file.c:98
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
static int load_string(HINSTANCE hModule, UINT resId, LPWSTR pwszBuffer, INT cMaxChars)
Definition: muireg.c:10
#define uint16_t
Definition: nsiface.idl:60
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
Definition: file.c:3952
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FSCTL_LOCK_VOLUME
Definition: nt_native.h:832
#define FILE_READ_ATTRIBUTES
Definition: nt_native.h:647
#define FILE_SHARE_DELETE
Definition: nt_native.h:682
#define FILE_TRAVERSE
Definition: nt_native.h:643
#define FSCTL_UNLOCK_VOLUME
Definition: nt_native.h:833
#define FSCTL_DISMOUNT_VOLUME
Definition: nt_native.h:834
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)
#define FILE_GENERIC_READ
Definition: nt_native.h:653
#define FILE_GENERIC_WRITE
Definition: nt_native.h:660
#define L(x)
Definition: ntvdm.h:50
static char title[]
Definition: ps.c:92
Definition: cookie.c:202
wstring fstype
Definition: devices.h:41
wstring pnp_name
Definition: devices.h:38
bool is_disk
Definition: devices.h:50
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define MB_YESNO
Definition: winuser.h:817
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define IDYES
Definition: winuser.h:835
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ DeviceAddDlgProc()

INT_PTR CALLBACK BtrfsDeviceAdd::DeviceAddDlgProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 568 of file devices.cpp.

568 {
569 try {
570 switch (uMsg) {
571 case WM_INITDIALOG:
572 {
575 EnableWindow(GetDlgItem(hwndDlg, IDOK), false);
576 break;
577 }
578
579 case WM_COMMAND:
580 switch (HIWORD(wParam)) {
581 case BN_CLICKED:
582 switch (LOWORD(wParam)) {
583 case IDOK:
584 AddDevice(hwndDlg);
585 return true;
586
587 case IDCANCEL:
588 EndDialog(hwndDlg, 0);
589 return true;
590 }
591 break;
592 }
593 break;
594
595 case WM_NOTIFY:
596 switch (((LPNMHDR)lParam)->code) {
597 case TVN_SELCHANGEDW:
598 {
600 TVITEMW tvi;
601 bool enable = false;
602
603 RtlZeroMemory(&tvi, sizeof(TVITEMW));
604 tvi.hItem = nmtv->itemNew.hItem;
606
608 sel = tvi.lParam == 0 ? nullptr : (device*)tvi.lParam;
609 else
610 sel = nullptr;
611
612 if (sel)
614
616 break;
617 }
618 }
619 break;
620 }
621 } catch (const exception& e) {
622 error_message(hwndDlg, e.what());
623 }
624
625 return false;
626}
void populate_device_tree(HWND tree)
Definition: devices.cpp:331
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
void error_message(HWND hwnd, const char *msg)
Definition: main.cpp:783
#define IDC_DEVICE_TREE
Definition: resource.h:304
#define ETDT_ENABLETAB
Definition: dxdiag.c:30
GLboolean enable
Definition: glext.h:11120
#define e
Definition: ke_i.h:82
if(dx< 0)
Definition: linetemp.h:194
DRIVER_ADD_DEVICE AddDevice
Definition: parport.h:72
#define LOWORD(l)
Definition: pedump.c:82
#define TVM_GETITEMW
Definition: commctrl.h:3486
#define TVN_SELCHANGEDW
Definition: commctrl.h:3648
#define TVIF_HANDLE
Definition: commctrl.h:3270
#define TVIF_PARAM
Definition: commctrl.h:3268
#define WM_NOTIFY
Definition: richedit.h:61
Definition: inflate.c:139
Definition: devices.h:37
bool multi_device
Definition: devices.h:49
bool has_parts
Definition: devices.h:45
TVITEMW itemNew
Definition: commctrl.h:3638
HTREEITEM hItem
Definition: commctrl.h:3317
UINT mask
Definition: commctrl.h:3316
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define HIWORD(l)
Definition: typedefs.h:247
HRESULT WINAPI EnableThemeDialogTexture(_In_ HWND hwnd, _In_ DWORD dwFlags)
Definition: uxthemesupp.c:55
LONG_PTR LPARAM
Definition: windef.h:208
#define IDCANCEL
Definition: winuser.h:831
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_INITDIALOG
Definition: winuser.h:1739
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:830
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define BN_CLICKED
Definition: winuser.h:1925
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by stub_DeviceAddDlgProc().

◆ populate_device_tree()

void BtrfsDeviceAdd::populate_device_tree ( HWND  tree)
private

Definition at line 331 of file devices.cpp.

331 {
333 unsigned int i;
334 ULONG last_disk_num = 0xffffffff;
335 HTREEITEM diskitem;
340 btrfs_filesystem* bfs = nullptr;
341
342 static WCHAR btrfs[] = L"\\Btrfs";
343
345
346 {
347 mountmgr mm;
348
349 {
350 nt_handle btrfsh;
351
352 us.Length = us.MaximumLength = (uint16_t)(wcslen(btrfs) * sizeof(WCHAR));
353 us.Buffer = btrfs;
354
355 InitializeObjectAttributes(&attr, &us, 0, nullptr, nullptr);
356
359 if (NT_SUCCESS(Status)) {
360 ULONG bfssize = 0;
361
362 do {
363 bfssize += 1024;
364
365 if (bfs) free(bfs);
366 bfs = (btrfs_filesystem*)malloc(bfssize);
367
368 Status = NtDeviceIoControlFile(btrfsh, nullptr, nullptr, nullptr, &iosb, IOCTL_BTRFS_QUERY_FILESYSTEMS, nullptr, 0, bfs, bfssize);
370 free(bfs);
371 bfs = nullptr;
372 break;
373 }
374 } while (Status == STATUS_BUFFER_OVERFLOW);
375
376 if (bfs && bfs->num_devices == 0) { // no mounted filesystems found
377 free(bfs);
378 bfs = nullptr;
379 }
380 }
381 }
382
383 find_devices(hwnd, &GUID_DEVINTERFACE_DISK, mm, device_list);
384 find_devices(hwnd, &GUID_DEVINTERFACE_VOLUME, mm, device_list);
385 find_devices(hwnd, &GUID_DEVINTERFACE_HIDDEN_VOLUME, mm, device_list);
386 }
387
388#ifndef __REACTOS__ // Disabled because building with our <algorithm> seems complex right now...
390#endif
391
392 for (i = 0; i < device_list.size(); i++) {
393 if (!device_list[i].ignore) {
394 TVINSERTSTRUCTW tis;
396 wstring name, size;
397
398 if (device_list[i].disk_num != 0xffffffff && device_list[i].disk_num == last_disk_num)
399 tis.hParent = diskitem;
400 else
401 tis.hParent = TVI_ROOT;
402
407
408 if (device_list[i].disk_num != 0xffffffff) {
409 wstring t;
410
411 if (!load_string(module, device_list[i].part_num != 0 ? IDS_PARTITION : IDS_DISK_NUM, t))
412 throw last_error(GetLastError());
413
414 wstring_sprintf(name, t, device_list[i].part_num != 0 ? device_list[i].part_num : device_list[i].disk_num);
415 } else
416 name = device_list[i].pnp_name;
417
418 // match child Btrfs devices to their parent
419 if (bfs && device_list[i].drive == L"" && device_list[i].fstype == L"Btrfs") {
420 btrfs_filesystem* bfs2 = bfs;
421
422 while (true) {
423 if (RtlCompareMemory(&bfs2->uuid, &device_list[i].fs_uuid, sizeof(BTRFS_UUID)) == sizeof(BTRFS_UUID)) {
424 ULONG j, k;
426
427 for (j = 0; j < bfs2->num_devices; j++) {
428 if (j == 0)
429 dev = &bfs2->device;
430 else
432
433 if (RtlCompareMemory(&device_list[i].dev_uuid, &device_list[i].dev_uuid, sizeof(BTRFS_UUID)) == sizeof(BTRFS_UUID)) {
434 for (k = 0; k < device_list.size(); k++) {
435 if (k != i && device_list[k].fstype == L"Btrfs" && device_list[k].drive != L"" &&
436 RtlCompareMemory(&device_list[k].fs_uuid, &device_list[i].fs_uuid, sizeof(BTRFS_UUID)) == sizeof(BTRFS_UUID)) {
437 device_list[i].drive = device_list[k].drive;
438 break;
439 }
440 }
441
442 device_list[i].multi_device = bfs2->num_devices > 1;
443
444 break;
445 }
446 }
447
448 break;
449 }
450
451 if (bfs2->next_entry != 0)
452 bfs2 = (btrfs_filesystem*)((uint8_t*)bfs2 + bfs2->next_entry);
453 else
454 break;
455 }
456 }
457
458 name += L" (";
459
460 if (device_list[i].friendly_name != L"") {
461 name += device_list[i].friendly_name;
462 name += L", ";
463 }
464
465 if (device_list[i].drive != L"") {
466 name += device_list[i].drive;
467 name += L", ";
468 }
469
470 if (device_list[i].fstype != L"") {
471 name += device_list[i].fstype;
472 name += L", ";
473 }
474
476 name += size;
477
478 name += L")";
479
480 tis.itemex.pszText = (WCHAR*)name.c_str();
481 tis.itemex.cchTextMax = (int)name.length();
483
485 if (!item)
487
488 if (device_list[i].part_num == 0) {
489 diskitem = item;
490 last_disk_num = device_list[i].disk_num;
491 }
492 }
493 }
494}
_STLP_MOVE_TO_STD_NAMESPACE void sort(_RandomAccessIter __first, _RandomAccessIter __last)
Definition: _algo.c:993
#define IOCTL_BTRFS_QUERY_FILESYSTEMS
Definition: btrfsioctl.h:21
vector< device > device_list
Definition: devices.h:153
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
static void find_devices(HWND hwnd, const GUID *guid, const mountmgr &mm, vector< device > &device_list)
Definition: devices.cpp:73
static bool sort_devices(device i, device j)
Definition: devices.cpp:320
void format_size(uint64_t size, wstring &s, bool show_bytes)
Definition: main.cpp:65
#define IDS_DISK_NUM
Definition: resource.h:102
#define IDS_TVM_INSERTITEM_FAILED
Definition: resource.h:207
#define IDS_PARTITION
Definition: resource.h:92
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465
GLdouble GLdouble t
Definition: gl.h:2047
GLsizeiptr size
Definition: glext.h:5919
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
Definition: glfuncs.h:248
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
Definition: glfuncs.h:250
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static const BYTE us[]
Definition: encode.c:689
static const WCHAR friendly_name[]
Definition: devenum.c:40
static ATOM item
Definition: dde.c:856
int k
Definition: mpi.c:3369
BYTE uint8_t
Definition: msvideo1.c:66
#define SYNCHRONIZE
Definition: nt_native.h:61
NTSYSAPI NTSTATUS NTAPI NtDeviceIoControlFile(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)
#define TVI_LAST
Definition: commctrl.h:3370
#define TVIF_TEXT
Definition: commctrl.h:3266
struct _TREEITEM * HTREEITEM
Definition: commctrl.h:3264
#define TVI_ROOT
Definition: commctrl.h:3368
#define TVM_INSERTITEMW
Definition: commctrl.h:3408
#define TVIS_EXPANDED
Definition: commctrl.h:3284
#define TVIF_STATE
Definition: commctrl.h:3269
#define offsetof(TYPE, MEMBER)
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
uint8_t uuid[16]
Definition: btrfsioctl.h:190
uint32_t next_entry
Definition: btrfsioctl.h:189
uint32_t num_devices
Definition: btrfsioctl.h:191
btrfs_filesystem_device device
Definition: btrfsioctl.h:192
Definition: name.c:39
TVITEMEXW itemex
Definition: commctrl.h:3396
HTREEITEM hParent
Definition: commctrl.h:3393
HTREEITEM hInsertAfter
Definition: commctrl.h:3394
LPARAM lParam
Definition: commctrl.h:3355
LPWSTR pszText
Definition: commctrl.h:3350
UINT stateMask
Definition: commctrl.h:3349
int cchTextMax
Definition: commctrl.h:3351
iterator end()
Definition: _vector.h:184
iterator begin()
Definition: _vector.h:182
size_type size() const
Definition: _vector.h:192
void clear()
Definition: _vector.h:653
uint32_t ULONG
Definition: typedefs.h:59
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
HWND WINAPI GetParent(_In_ HWND)

Referenced by DeviceAddDlgProc().

◆ ShowDialog()

void BtrfsDeviceAdd::ShowDialog ( )

Definition at line 644 of file devices.cpp.

644 {
646}
static INT_PTR CALLBACK stub_DeviceAddDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: devices.cpp:628
#define IDD_DEVICE_ADD
Definition: resource.h:80
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)

Referenced by AddDeviceW().

Member Data Documentation

◆ cmdline

WCHAR* BtrfsDeviceAdd::cmdline
private

Definition at line 151 of file devices.h.

Referenced by AddDevice(), and BtrfsDeviceAdd().

◆ device_list

vector<device> BtrfsDeviceAdd::device_list
private

Definition at line 153 of file devices.h.

Referenced by populate_device_tree().

◆ hinst

HINSTANCE BtrfsDeviceAdd::hinst
private

Definition at line 149 of file devices.h.

Referenced by BtrfsDeviceAdd().

◆ hwnd

HWND BtrfsDeviceAdd::hwnd
private

Definition at line 150 of file devices.h.

Referenced by BtrfsDeviceAdd().

◆ sel

device* BtrfsDeviceAdd::sel
private

Definition at line 152 of file devices.h.

Referenced by AddDevice(), BtrfsDeviceAdd(), and DeviceAddDlgProc().


The documentation for this class was generated from the following files: