/** * @file XTPWinThread.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ /** @cond */ #if !defined(__XTPWINTHREAD_H__) # define __XTPWINTHREAD_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPComInitializer; /** * @brief * All XTP threads should derive from CXTPWinThread instead of * CWinThread in order to ensure compatibility with the main process * thread that is derived from CXTPWinApp. */ class _XTP_EXT_CLASS CXTPWinThread : public CWinThread { DECLARE_DYNAMIC(CXTPWinThread); public: /** * @brief * Default constructor. * @param xtpComInit Global COM/OLE initialization method. * @details * The default xtpComInitAppDefault makes a thread to use the same COM/OLE model that is * used by the main application thread derived from CXTPWinApp. * If extended COM initialization flags are being used bu CoInitializeEx function is not * available then xtpComInitSTA is assumed, all other flags get ignored and the legacy * CoInitialize gets called. * @see * XTPComInit */ CXTPWinThread(int xtpComInit = xtpComInitAppDefault); /** * @brief * Default destructor, handles cleanup / deallocation. */ virtual ~CXTPWinThread(); private: CXTPComInitializer* m_pComInit; }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPWINTHREAD_H__) /** @endcond */