| 2034 | } |
| 2035 | |
| 2036 | int 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 | |
| 2053 | bool CMountPropertyPage::IsPathMounted(LPCWSTR path) |
| 2054 | { |
nothing calls this directly
no outgoing calls
no test coverage detected