Source code of Windows XP (NT5)
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.

69 lines
1.4 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999
  5. //
  6. // File: backup.h
  7. //
  8. // Contents: Cert Server Database interface implementation
  9. //
  10. //---------------------------------------------------------------------------
  11. #include "resource.h" // main symbols
  12. class CCertDBBackup: public ICertDBBackup
  13. {
  14. public:
  15. CCertDBBackup();
  16. ~CCertDBBackup();
  17. public:
  18. // IUnknown
  19. STDMETHODIMP QueryInterface(const IID& iid, void **ppv);
  20. ULONG STDMETHODCALLTYPE AddRef();
  21. ULONG STDMETHODCALLTYPE Release();
  22. // ICertDBBackup
  23. STDMETHOD(GetDBFileList)(
  24. IN OUT DWORD *pcwcList,
  25. OUT WCHAR *pwszzList); // OPTIONAL
  26. STDMETHOD(GetLogFileList)(
  27. IN OUT DWORD *pcwcList,
  28. OUT WCHAR *pwszzList); // OPTIONAL
  29. STDMETHOD(OpenFile)(
  30. IN WCHAR const *pwszFile,
  31. OPTIONAL OUT ULARGE_INTEGER *pliSize);
  32. STDMETHOD(ReadFile)(
  33. IN OUT DWORD *pcb,
  34. OUT BYTE *pb);
  35. STDMETHOD(CloseFile)();
  36. STDMETHOD(TruncateLog)();
  37. // CCertDBBackup
  38. HRESULT Open(
  39. IN LONG grbitJet,
  40. IN CERTSESSION *pcs,
  41. IN ICertDB *pdb);
  42. private:
  43. VOID _Cleanup();
  44. ICertDB *m_pdb;
  45. CERTSESSION *m_pcs;
  46. LONG m_grbitJet;
  47. BOOL m_fBegin;
  48. BOOL m_fFileOpen;
  49. BOOL m_fTruncated;
  50. JET_HANDLE m_hFileDB;
  51. // Reference count
  52. long m_cRef;
  53. };