MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / CanClose

Method CanClose

cppcryptfs/ui/CryptPropertySheet.cpp:81–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81BOOL 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
114UINT CCryptPropertySheet::WM_TASKBARCREATED = ::RegisterWindowMessage(_T("TaskbarCreated"));
115

Callers

nothing calls this directly

Calls 5

CheckOpenHandlesFunction · 0.85
unmount_allFunction · 0.85
wait_for_all_unmountedFunction · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected