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.

90 lines
2.6 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993.
  5. //
  6. // File: bm_link.hxx
  7. //
  8. // Contents: test creation apis
  9. //
  10. // Classes: CCreateLinkApis
  11. //
  12. // Functions:
  13. //
  14. // History:
  15. //
  16. //--------------------------------------------------------------------------
  17. #ifndef _BM_LINK_HXX_
  18. #define _BM_LINK_HXX_
  19. #include <bm_base.hxx>
  20. typedef struct _tagLinkTimes {
  21. ULONG ulBindToSourceNull;
  22. ULONG ulBindToSourceBindCtx;
  23. ULONG ulBindIfRunning;
  24. ULONG ulBindIfRunning2;
  25. ULONG ulUnbindSource;
  26. ULONG ulUnbindSource2;
  27. ULONG ulUnbindSource3;
  28. ULONG ulUpdateNull;
  29. ULONG ulUpdateBindCtx;
  30. } LinkTimes;
  31. #define INIT_LINKRESULTS(array) {\
  32. for (int xx = 0; xx < TEST_MAX_ITERATIONS; xx++)\
  33. {\
  34. array[xx].ulBindToSourceNull = NOTAVAIL;\
  35. array[xx].ulBindToSourceBindCtx = NOTAVAIL;\
  36. array[xx].ulBindIfRunning = NOTAVAIL;\
  37. array[xx].ulBindIfRunning2 = NOTAVAIL;\
  38. array[xx].ulUnbindSource = NOTAVAIL;\
  39. array[xx].ulUnbindSource2 = NOTAVAIL;\
  40. array[xx].ulUnbindSource3 = NOTAVAIL;\
  41. array[xx].ulUpdateNull = NOTAVAIL;\
  42. array[xx].ulUpdateBindCtx = NOTAVAIL;\
  43. }\
  44. }
  45. class CIOLTest : public CTestBase
  46. {
  47. public:
  48. virtual TCHAR *Name ();
  49. virtual SCODE Setup (CTestInput *input);
  50. virtual SCODE Run ();
  51. virtual SCODE Report (CTestOutput &OutputFile);
  52. virtual SCODE Cleanup ();
  53. private:
  54. ULONG m_ulIterations;
  55. #ifdef STRESS
  56. CSimpleSite* m_pSite[STRESSCOUNT];
  57. #else
  58. CSimpleSite* m_pSite[TEST_MAX_ITERATIONS];
  59. #endif
  60. CSimpleDoc* m_lpDoc;
  61. CLSID m_clsidSr32;
  62. CLSID m_clsidOutl;
  63. LinkTimes m_ulOleLinkSr32[TEST_MAX_ITERATIONS];
  64. LinkTimes m_ulOleLinkOutl[TEST_MAX_ITERATIONS];
  65. };
  66. BOOL CallOleLinkMethods(LPCOLESTR lpFileName, CSimpleSite * pSite[], ULONG ulIterations, LinkTimes IOLTime[],
  67. LPCOLESTR lpNm1, LPCOLESTR lpNm2);
  68. BOOL CallOleLinkRunMethods(LinkTimes IOLTime[], LPOLELINK pLink[], ULONG ulIterations);
  69. BOOL CallOleLinkDisplayName( LinkTimes IOLTime[], LPOLELINK pLink[],
  70. LPCOLESTR lpFileName, LPCOLESTR lpNm1,
  71. LPCOLESTR lpNm2, ULONG ulIterations);
  72. HRESULT GetLinkCompositeName(LPOLELINK lpLink, LPCOLESTR lpItem, LPOLESTR FAR* lpComposeName);
  73. void WriteLinkOutput(CTestOutput &output, LPTSTR lpstr, LinkTimes *lnkTimes, ULONG ulIterations);
  74. #endif //LINK