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.

87 lines
1.5 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993.
  5. //
  6. // File: bm_base.cxx
  7. //
  8. // Contents: output class for benchmark results
  9. //
  10. // Classes: CTestBase
  11. //
  12. // Functions:
  13. //
  14. // History: 30-June-93 t-martig Created
  15. //
  16. //--------------------------------------------------------------------------
  17. #include <benchmrk.hxx>
  18. #include <bm_base.hxx>
  19. SCODE CTestBase::Setup (CTestInput *pInput)
  20. {
  21. m_pInput = pInput;
  22. // get the OleInitialize flag.
  23. m_dwInitFlag = m_pInput->GetOleInitFlag();
  24. return S_OK;
  25. }
  26. SCODE CTestBase::Cleanup ()
  27. {
  28. return S_OK;
  29. }
  30. SCODE CTestBase::InitOLE()
  31. {
  32. SCODE sc;
  33. #ifdef OLE_THREADING_SUPPORT
  34. if (m_dwInitFlag == COINIT_MULTITHREADED)
  35. {
  36. // we are Cairo and want MULTI_THREADING, call OleInitEx
  37. sc = OleInitializeEx(NULL, m_dwInitFlag);
  38. }
  39. else
  40. #endif // OLE_THREADING_SUPPORT
  41. {
  42. sc = OleInitialize(NULL);
  43. }
  44. return sc;
  45. }
  46. void CTestBase::UninitOLE()
  47. {
  48. OleUninitialize();
  49. }
  50. SCODE CTestBase::InitCOM()
  51. {
  52. SCODE sc;
  53. #ifdef COM_THREADING_SUPPORT
  54. if (m_dwInitFlag == COINIT_MULTITHREADED)
  55. {
  56. // we are Cairo and want MULTI_THREADING, call OleInitEx
  57. sc = CoInitializeEx(NULL, m_dwInitFlag);
  58. }
  59. else
  60. #endif // COM_THREADING_SUPPORT
  61. {
  62. sc = CoInitialize(NULL);
  63. }
  64. return sc;
  65. }
  66. void CTestBase::UninitCOM()
  67. {
  68. CoUninitialize();
  69. }