本文整理汇总了C++中CPARAM_THREADPROC::bStartThread方法的典型用法代码示例。如果您正苦于以下问题:C++ CPARAM_THREADPROC::bStartThread方法的具体用法?C++ CPARAM_THREADPROC::bStartThread怎么用?C++ CPARAM_THREADPROC::bStartThread使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPARAM_THREADPROC
的用法示例。
在下文中一共展示了CPARAM_THREADPROC::bStartThread方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CAN_PerformInitOperations
HRESULT CDIL_CAN_STUB::CAN_PerformInitOperations(void)
{
HRESULT hResult = S_FALSE;
// Initialize the critical section
InitializeCriticalSection(&sg_CSBroker);
// Create the notification event
sg_hNotifyFinish = CreateEvent(NULL, false, false, NULL);
if (NULL != sg_hNotifyFinish)
{
// Then create the broker worker thread
sg_sBrokerObjBusEmulation.m_hActionEvent = CreateEvent(NULL, false,
false, NULL);
ResetEvent(sg_sBrokerObjBusEmulation.m_hActionEvent);
sg_sBrokerObjBusEmulation.m_unActionCode = INACTION;
if (sg_sBrokerObjBusEmulation.bStartThread(BrokerThreadBusEmulation))
{
hResult = S_OK;
}
else
{
CloseHandle(sg_hNotifyFinish);
sg_hNotifyFinish = NULL;
}
}
return hResult;
}
示例2: bStartGraphReadThread
/* Function to start Msg read thread*/
BOOL bStartGraphReadThread()
{
BOOL bReturn = FALSE;
//First stop the thread if running
bStopGraphReadThread();
m_ouGraphReadThread.m_hActionEvent = NULL;
m_ouGraphReadThread.m_unActionCode = IDLE;
m_ouGraphReadThread.m_pBuffer = NULL;
m_ouGraphReadThread.m_hActionEvent = m_ouMsgInterpretBuffer.hGetNotifyingEvent();
bReturn = m_ouGraphReadThread.bStartThread(SignalDataPlotterThread);
return bReturn;
}
示例3: FinalConstruct
HRESULT CSimENG::FinalConstruct()
{
// Initialise the random number generator
srand((unsigned) time(NULL));
// To create the worker thread that relays messages to other nodes
// First initialise the parameters
sg_sThreadCtrlObj.m_hActionEvent = sg_MessageBuf.hGetNotifyingEvent();
sg_sThreadCtrlObj.m_pBuffer = &sg_MessageBuf;
sg_sThreadCtrlObj.m_unActionCode = INVOKE_FUNCTION;
// Now start the thread
sg_sThreadCtrlObj.bStartThread(MsgDelegatingThread);
//MessageBox(NULL, "in FinalConstruct()", "Member function", MB_OK);
return S_OK;
}
示例4: Worker_Connect
HRESULT Worker_Connect(ISimENG* pISimENGLoc, Base_WrapperErrorLogger* pIlogLoc)
{
if (GetCurrState() == STATE_PRIMORDIAL)
{
sg_acErrStr = "CAN_STUB_Connect called at STATE_PRIMORDIAL";
return S_FALSE;
}
else if (GetCurrState() != STATE_INITIALISED)
{
sg_pIlog->vLogAMessage(__FILE__, __LINE__,
("CAN_STUB_Connect called at improper state"));
return S_FALSE;
}
sg_sParmRThreadStub.m_unActionCode = INVOKE_FUNCTION;
if (sg_sParmRThreadStub.bStartThread(FlexMsgReadThreadProc_Stub) == FALSE)
{
sg_sParmRThreadStub.m_hActionEvent = NULL;
// Unregister from the simulation engine
for (UINT i = 0; i < sg_unClientCnt; i++)
{
sg_ushTempClientID = (USHORT)sg_asClientToBufMap[i].dwClientID;
sg_hTmpClientHandle = sg_asClientToBufMap[i].hClientHandle;
sg_hTmpPipeHandle = sg_asClientToBufMap[i].hPipeFileHandle;
Worker_UnregisterClient(pISimENGLoc, pIlogLoc);
sg_asClientToBufMap[i].dwClientID = 0;
sg_asClientToBufMap[i].hClientHandle = NULL;
sg_asClientToBufMap[i].hPipeFileHandle = NULL;
}
sg_pIlog->vLogAMessage(__FILE__, __LINE__,
("Unable to start the reading thread"));
return S_FALSE;
}
// Reaching upto this point means all the necessary activities are over
SetCurrState(STATE_REGISTERED);
return S_OK;
}