MCPcopy Create free account
hub / github.com/clechasseur/pathcopycopy / Load

Method Load

PathCopyCopy/src/PathCopyCopyDataHandler.cpp:65–78  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

63// @return S_OK if successful, otherwise an error code.
64//
65[[gsl::suppress(c.128)]]
66STDMETHODIMP 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected