| 41 | return true; |
| 42 | } |
| 43 | bool LocalSdCard::OpenForReading() |
| 44 | { |
| 45 | m_h= CreateFile(m_di->physical.c_str(), GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,0,NULL); |
| 46 | if (m_h==INVALID_HANDLE_VALUE) |
| 47 | { |
| 48 | g_err.Set(stringformat("error opening device %s for reading: %s", m_di->physical.c_str(), LastError().c_str())); |
| 49 | return false; |
| 50 | } |
| 51 | |
| 52 | m_bWriting= false; |
| 53 | m_bReading= true; |
| 54 | |
| 55 | return true; |
| 56 | } |
| 57 | bool LocalSdCard::Close() |
| 58 | { |
| 59 | if (!m_bReading&&!m_bWriting) |
no test coverage detected