当前位置: 首页>>代码示例>>C++>>正文


C++ CPARAM_THREADPROC::bTerminateThread方法代码示例

本文整理汇总了C++中CPARAM_THREADPROC::bTerminateThread方法的典型用法代码示例。如果您正苦于以下问题:C++ CPARAM_THREADPROC::bTerminateThread方法的具体用法?C++ CPARAM_THREADPROC::bTerminateThread怎么用?C++ CPARAM_THREADPROC::bTerminateThread使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CPARAM_THREADPROC的用法示例。


在下文中一共展示了CPARAM_THREADPROC::bTerminateThread方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CAN_PerformClosureOperations

HRESULT CDIL_CAN_STUB::CAN_PerformClosureOperations(void)
{
    //First remove all the client
    for (UINT nCount = 0; nCount < sg_unClientCnt; nCount++)
    {
        CAN_RegisterClient(FALSE, sg_asClientToBufMap[nCount].dwClientID, "");
    }
    // First disconnect from the simulation engine
    CAN_DeselectHwInterface();
    // Then terminate the broker thread
    sg_sBrokerObjBusEmulation.bTerminateThread();
    // Close the notification event
    if (NULL != sg_hNotifyFinish)
    {
        CloseHandle(sg_hNotifyFinish);
        sg_hNotifyFinish = NULL;
    }
    // Delete the critical section
    DeleteCriticalSection(&sg_CSBroker);

    sg_pIlog = NULL;         // Log interface pointer

    SetCurrState(STATE_PRIMORDIAL);

    return S_OK;
}
开发者ID:Mariale13,项目名称:UDS_Protocol,代码行数:26,代码来源:CAN_STUB.cpp

示例2: Worker_Disconnect

HRESULT Worker_Disconnect(ISimENG* /*pISimENGLoc*/, Base_WrapperErrorLogger* pIlogLoc)
{
    if (GetCurrState() == STATE_PRIMORDIAL)
    {
        sg_acErrStr = _("CAN_STUB_DeselectHwInterface called at STATE_PRIMORDIAL");
        return S_FALSE;
    }
    else if (GetCurrState() == STATE_RESET)
    {
        pIlogLoc->vLogAMessage(__FILE__, __LINE__,
                               (_("CAN_STUB_DeselectHwInterface called at improper state")));
        return S_FALSE;
    }

    // Close the message reading thread
    if(sg_unClientCnt <= 0 )
    {
        //Some Error Happened But Thread close is required.
        //sg_unClientCnt = 0 means there is no data flow and thread
        //force termination is safe.
        sg_sParmRThreadStub.bForceTerminateThread();
    }
    else
    {
        sg_sParmRThreadStub.bTerminateThread();
    }

    return S_OK;
}
开发者ID:Mariale13,项目名称:UDS_Protocol,代码行数:29,代码来源:CAN_STUB.cpp

示例3: bStopGraphReadThread

/* Function to stop msg read thread*/
BOOL bStopGraphReadThread()
{
    BOOL bReturn = FALSE;
    bReturn = m_ouGraphReadThread.bTerminateThread();
    m_ouGraphReadThread.m_hActionEvent = NULL;
    m_ouGraphReadThread.m_unActionCode = IDLE;
    return bReturn;
}
开发者ID:Mariale13,项目名称:UDS_Protocol,代码行数:9,代码来源:SigGrphWnd.cpp

示例4: Worker_Disconnect

HRESULT Worker_Disconnect(ISimENG* /*pISimENGLoc*/, Base_WrapperErrorLogger* pIlogLoc)
{
    if (GetCurrState() == STATE_PRIMORDIAL)
    {
        sg_acErrStr = "CAN_STUB_DeselectHwInterface called at STATE_PRIMORDIAL";
        return S_FALSE;
    }
    else if (GetCurrState() == STATE_RESET)
    {
        pIlogLoc->vLogAMessage(__FILE__, __LINE__,
                               ("CAN_STUB_DeselectHwInterface called at improper state"));
        return S_FALSE;
    }

    // Close the message reading thread
    sg_sParmRThreadStub.bTerminateThread();
    return S_OK;
}
开发者ID:Ferrere,项目名称:busmaster,代码行数:18,代码来源:CAN_STUB.cpp

示例5: FinalRelease

void CSimENG::FinalRelease()
{
    // Close the message relay worker thread
    sg_sThreadCtrlObj.bTerminateThread();

    DeleteCriticalSection(&sg_CriticalSection);
    DeleteCriticalSection(&sg_CSMsgEntry);

    if (NULL != sg_pbEntry)
    {
        delete[] sg_pbEntry;
        sg_pbEntry = NULL;
        sg_nEntryLen = 0;
    }

    if (NULL != sg_pbEntry2)
    {
        delete[] sg_pbEntry2;
        sg_pbEntry2 = NULL;
        sg_nEntryLen2 = 0;
    }
}
开发者ID:ArunMaiya,项目名称:busmaster,代码行数:22,代码来源:SimENG.cpp


注:本文中的CPARAM_THREADPROC::bTerminateThread方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。