IPersistFile::Load This method is called by the Windows Shell to initialize the data handler for a particular file. We'll use this opportunity to note the file name for future use. @param pszFileName Name of the file to act upon. @param dwMode File open mode. We ignore this as we don't need to actually open the file. @return S_OK if successful, otherwise an error code.
| 63 | // @return S_OK if successful, otherwise an error code. |
| 64 | // |
| 65 | [[gsl::suppress(c.128)]] |
| 66 | STDMETHODIMP CPathCopyCopyDataHandler::Load( |
| 67 | LPCOLESTR pszFileName, |
| 68 | DWORD /*dwMode*/) |
| 69 | { |
| 70 | HRESULT hRes = S_OK; |
| 71 | try { |
| 72 | m_FileName = pszFileName; |
| 73 | } catch (...) { |
| 74 | hRes = E_UNEXPECTED; |
| 75 | m_FileName.clear(); |
| 76 | } |
| 77 | return hRes; |
| 78 | } |
| 79 | |
| 80 | // |
| 81 | // IPersistFile::Save |
nothing calls this directly
no outgoing calls
no test coverage detected