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

Method OpenFileManagementShell

cppcryptfs/ui/MountPropertyPage.cpp:2036–2051  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2034}
2035
2036int CMountPropertyPage::OpenFileManagementShell(const CString& mp)
2037{
2038 if (mp.GetLength() < 1)
2039 return ERROR_INVALID_PARAMETER;
2040
2041 if (!::PathIsDirectory(mp))
2042 return ERROR_PATH_NOT_FOUND;
2043
2044 int result = static_cast<int>(reinterpret_cast<INT_PTR>(::ShellExecute(NULL, L"open", mp, NULL, NULL, SW_SHOW)));
2045 if (result > 32) {
2046 return 0; // according to docs > 32 is success (appears to be 42 always)
2047 } else {
2048 // can also return 0 if out of memory or out of resources
2049 return result ? result : SE_ERR_OOM;
2050 }
2051}
2052
2053bool CMountPropertyPage::IsPathMounted(LPCWSTR path)
2054{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected