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

Function unmount_crypt_fs

cppcryptfs/dokan/cryptdokan.cpp:2374–2399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2372}
2373
2374BOOL unmount_crypt_fs(const WCHAR* mountpoint, bool wait, wstring& mes) {
2375
2376
2377 wstring mpstr;
2378 if (!MountPointManager::getInstance().find(mountpoint, mpstr)) {
2379 mes += LocUtils::GetStringFromResources(IDS_UNABLE_FIND_MPOINT);
2380 return FALSE;
2381 }
2382 if (!DokanRemoveMountPoint(mpstr.c_str())) {
2383 mes += GetWindowsErrorString(GetLastError());
2384 return FALSE;
2385 }
2386
2387 if (wait) {
2388 bool res = MountPointManager::getInstance().wait_and_destroy(mpstr.c_str());
2389 if (!res) {
2390 CString strMsg;
2391 strMsg.Format(LocUtils::GetStringFromResources(IDS_WAIT_UNMOUNT_ERROR).c_str(), GetWindowsErrorString(GetLastError()));
2392 mes += strMsg;
2393 }
2394 return res;
2395 } else {
2396 return TRUE;
2397 }
2398
2399}
2400
2401bool unmount_all(bool wait)
2402{

Callers 3

unmount_allMethod · 0.85
DismountMethod · 0.85
DismountAllMethod · 0.85

Calls 3

GetWindowsErrorStringFunction · 0.85
findMethod · 0.80
wait_and_destroyMethod · 0.80

Tested by

no test coverage detected