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

Method OnClickedMount

cppcryptfs/ui/MountPropertyPage.cpp:720–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

718
719
720void CMountPropertyPage::OnClickedMount()
721{
722 // TODO: Add your control notification handler code here
723
724 bool save_passwords_enabled = false;
725 CryptSettings::getInstance().GetSettingCurrent(ENABLE_SAVING_PASSWORDS, save_passwords_enabled);
726
727 CSecureEdit *pEd = (CSecureEdit*)GetDlgItem(IDC_PASSWORD);
728 if (pEd && save_passwords_enabled) {
729 if (IsDlgButtonChecked(IDC_SAVE_PASSWORD)) {
730 if (pEd->m_strRealText == NULL || wcslen(pEd->m_strRealText) < 1) {
731 CWnd *pPath = GetDlgItem(IDC_PATH);
732 if (pPath) {
733 LockZeroBuffer<WCHAR> password(MAX_PASSWORD_LEN + 1, true);
734 CString cpath;
735 pPath->GetWindowTextW(cpath);
736 if (cpath.GetLength() > 0 && SavedPasswords::RetrievePassword(cpath, password.m_buf, password.m_len)) {
737 pEd->SetRealText(password.m_buf);
738 }
739 }
740 }
741 }
742 }
743
744 CString mes = Mount();
745 if (mes.GetLength() > 0)
746 MessageBox(mes, L"cppcryptfs", MB_OK | MB_ICONEXCLAMATION);
747}
748
749
750void CMountPropertyPage::OnClickedDismount()

Callers

nothing calls this directly

Calls 2

GetSettingCurrentMethod · 0.80
SetRealTextMethod · 0.80

Tested by

no test coverage detected