//+------------------------------------------------------------------------ // // Microsoft Windows // Copyright (C) Microsoft Corporation, 1993. // // File: bm_init.cxx // // Contents: OleInitialize/OleUninitialize tests // // Classes: COleInitializeTest // // History: 1-July-93 t-martig Created // //-------------------------------------------------------------------------- #include #pragma hdrstop #include #include DWORD dwInitFlag = 0; TCHAR *COleInitializeTest::Name () { return TEXT("OleInitialize"); } SCODE COleInitializeTest::Setup (CTestInput *pInput) { CTestBase::Setup(pInput); // get iteration count m_ulIterations = pInput->GetIterations(Name()); // initialize state INIT_RESULTS(m_ulOleInitializeTime); INIT_RESULTS(m_ulOleUninitializeTime); INIT_RESULTS(m_ulRepOleInitializeTime); INIT_RESULTS(m_ulRepOleUninitializeTime); INIT_RESULTS(m_ulCoInitializeTime); INIT_RESULTS(m_ulCoUninitializeTime); INIT_RESULTS(m_ulRepCoInitializeTime); INIT_RESULTS(m_ulRepCoUninitializeTime); return S_OK; } SCODE COleInitializeTest::Cleanup () { return S_OK; } SCODE COleInitializeTest::Run () { CStopWatch sw; SCODE sc; // compute times for OleInit, OleUninit. for (ULONG iIter=0; iIter