Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.6 KiB

  1. #include "privcpp.h"
  2. //////////////////////////////////
  3. //
  4. // IPersistFile Methods...
  5. //
  6. HRESULT CPackage::GetClassID(LPCLSID pClassID)
  7. {
  8. HRESULT hr = S_OK;
  9. DebugMsg(DM_TRACE, "pack ps - GetClassID() called.");
  10. if (NULL == pClassID)
  11. hr = E_INVALIDARG;
  12. else
  13. *pClassID = CLSID_CPackage; // CLSID_OldPackage;
  14. return hr;
  15. }
  16. HRESULT CPackage::IsDirty(void)
  17. {
  18. DebugMsg(DM_TRACE, "pack ps - IsDirty() called.");
  19. return _fIsDirty ? S_OK : S_FALSE;
  20. }
  21. HRESULT CPackage::Load(LPCOLESTR pszFileName, DWORD dwMode)
  22. {
  23. HRESULT hr;
  24. DebugMsg(DM_TRACE, "pack pf - Load() called.");
  25. if (!pszFileName)
  26. {
  27. DebugMsg(DM_TRACE," bad pointer!!");
  28. hr = E_POINTER;
  29. }
  30. else
  31. {
  32. // We blow off the mode flags
  33. hr = EmbedInitFromFile(pszFileName, TRUE);
  34. }
  35. DebugMsg(DM_TRACE, " leaving Load()");
  36. return hr;
  37. }
  38. HRESULT CPackage::Save(LPCOLESTR pszFileName, BOOL fRemember)
  39. {
  40. DebugMsg(DM_TRACE, "pack pf - Save() called.");
  41. return E_NOTIMPL;
  42. }
  43. HRESULT CPackage::SaveCompleted(LPCOLESTR pszFileName)
  44. {
  45. DebugMsg(DM_TRACE, "pack pf - SaveCompleted() called.");
  46. return E_NOTIMPL;
  47. }
  48. HRESULT CPackage::GetCurFile(LPOLESTR *ppszFileName)
  49. {
  50. HRESULT hr = E_NOTIMPL;
  51. DebugMsg(DM_TRACE, "pack pf - GetCurFile() called.");
  52. if (!ppszFileName)
  53. hr = E_POINTER;
  54. else
  55. *ppszFileName = NULL; // null the out param
  56. return hr;
  57. }