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.

69 lines
2.0 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993.
  5. //
  6. // File: bm_cache.hxx
  7. // It contains the definition for COleCacheTest class.
  8. //
  9. //
  10. // History: SanjayK Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #ifndef _BM_CACHE_HXX_
  14. #define _BM_CACHE_HXX_
  15. #include <bm_base.hxx>
  16. typedef struct _tagCacheTimes {
  17. ULONG ulCreateCache;
  18. ULONG ulCache;
  19. ULONG ulInitCache;
  20. ULONG ulLoadCache;
  21. ULONG ulSaveCache;
  22. ULONG ulUncache;
  23. ULONG ulUpdateCache;
  24. ULONG ulDiscardCache;
  25. } CacheTimes;
  26. class COleCacheTest : public CTestBase
  27. {
  28. public:
  29. virtual TCHAR *Name ();
  30. virtual SCODE Setup (CTestInput *input);
  31. virtual SCODE Run ();
  32. virtual SCODE Report (CTestOutput &OutputFile);
  33. virtual SCODE Cleanup ();
  34. private:
  35. ULONG m_ulIterations;
  36. #ifdef STRESS
  37. LPOLECACHE2 m_pOleCache2[STRESSCOUNT];
  38. CSimpleSite* m_pSite[STRESSCOUNT];
  39. #else
  40. LPOLECACHE2 m_pOleCache2[TEST_MAX_ITERATIONS];
  41. CSimpleSite* m_pSite[TEST_MAX_ITERATIONS];
  42. #endif
  43. CSimpleDoc* m_lpDoc;
  44. CLSID m_clsidOutl;
  45. CacheTimes m_CacheTimesOutl[TEST_MAX_ITERATIONS];
  46. };
  47. BOOL CallRunCache(REFCLSID rclsid, CSimpleSite *pSite[], LPOLECACHE2 pOleCache2[], ULONG ulIterations, CacheTimes Cachetimes[]);
  48. HRESULT CreateCacheObjects(CSimpleSite *pSite[], LPOLECACHE2 pOleCache2[],
  49. ULONG ulIterations, CacheTimes Cachetimes[]) ;
  50. VOID FillCache(LPDATAOBJECT pDO, LPOLECACHE2 pOleCache2[], ULONG ulIterations,
  51. CacheTimes Cachetimes[]);
  52. VOID SaveAndLoadCache(CSimpleSite *pSite[], LPOLECACHE2 pOleCache2[],
  53. ULONG ulIterations, CacheTimes Cachetimes[]);
  54. void WriteCacheOutput(CTestOutput &output, LPTSTR lpstr, CacheTimes *CTimes, ULONG ulIterations);
  55. #endif