| 79 | } |
| 80 | |
| 81 | BOOL CCryptPropertySheet::CanClose() |
| 82 | { |
| 83 | if (!MountPointManager::getInstance().empty()) { |
| 84 | |
| 85 | if (MessageBox(LocUtils::GetStringFromResources(IDS_DISMOUNT_ALL_ON_EXIT).c_str(), L"cppcryptfs", |
| 86 | MB_YESNO | MB_ICONEXCLAMATION) == IDYES) { |
| 87 | |
| 88 | CString open_handles_mes = CheckOpenHandles(m_hWnd, nullptr, true, false).c_str(); |
| 89 | |
| 90 | if (open_handles_mes.GetLength() > 0) |
| 91 | return FALSE; |
| 92 | |
| 93 | int i; |
| 94 | for (i = 0; i < 26; i++) { |
| 95 | if (theApp.m_mountedLetters & (1<<i)) { |
| 96 | wstring mes; |
| 97 | write_volume_name_if_changed(i + 'A', mes); |
| 98 | } |
| 99 | } |
| 100 | unmount_all(false); |
| 101 | theApp.DoWaitCursor(1); |
| 102 | wait_for_all_unmounted(); |
| 103 | theApp.DoWaitCursor(-1); |
| 104 | |
| 105 | return TRUE; |
| 106 | } else { |
| 107 | return FALSE; |
| 108 | } |
| 109 | } else { |
| 110 | return TRUE; |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | UINT CCryptPropertySheet::WM_TASKBARCREATED = ::RegisterWindowMessage(_T("TaskbarCreated")); |
| 115 |
nothing calls this directly
no test coverage detected