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


C++ KG_PROCESS_ERROR函数代码示例

本文整理汇总了C++中KG_PROCESS_ERROR函数的典型用法代码示例。如果您正苦于以下问题:C++ KG_PROCESS_ERROR函数的具体用法?C++ KG_PROCESS_ERROR怎么用?C++ KG_PROCESS_ERROR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: _IsParentVersionExist

int _IsParentVersionExist(const TCHAR cszParentPath[])
{
	int nResult  = false;
	int nRetCode = false;
    tstring strPakFileName;

    ASSERT(cszParentPath);
    ASSERT(cszParentPath[0]);

    strPakFileName = tstring(cszParentPath) + _T("pak\\Data_1.pak");
    nRetCode = _taccess(strPakFileName.c_str(), 0);
    KG_PROCESS_ERROR(nRetCode == 0);

	nResult = true;
Exit0:
	return nResult;
}
开发者ID:viticm,项目名称:pap2,代码行数:17,代码来源:main.cpp

示例2: KG_PROCESS_ERROR

void KDlgNPCBindInfo::OnBnClickedButtonClear()
{
	KG_PROCESS_ERROR(m_pScene);

	for (int i = 0; i < 6; i++)
	{
		if (static_cast<CButton*>(GetDlgItem(IDC_RADIO_LEFTHAND + i))->GetCheck() == BST_CHECKED)
		{
			m_BindInfo.strNames[i + 1] = "";
			UpdateData(FALSE);
			m_pScene->UnBind(i + 1);
			break;
		}
	}
Exit0:
	return;
}
开发者ID:viticm,项目名称:pap2,代码行数:17,代码来源:KDlgNPCBindInfo.cpp

示例3: assert

BOOL KLogClient::LogPlayerLeaveTeam(KPlayer* pPlayer)
{
    BOOL    bResult         = false;
    BOOL    bRetCode        = false;

    assert(pPlayer);

    bRetCode = LogPlayerAction(
        PLAYER_ACTION_LEAVE_TEAM, 100, "LEAVE_TEAM",
        pPlayer->m_szAccount, pPlayer->m_szName, 0, NULL
    );
    KG_PROCESS_ERROR(bRetCode);

    bResult = true;
Exit0:
    return bResult;
}
开发者ID:1suming,项目名称:pap2,代码行数:17,代码来源:KLogClient.cpp

示例4: KG_PROCESS_ERROR

 int KTestCommon::RestoreRegData()
 {
 	int nResult  = false;
 	int nRetCode = false;
 	HKEY hKey = NULL;
 
 	//打开注册表键
 	nRetCode = ::RegOpenKeyEx(REG_ROOT_KEY, REG_SUB_KEY, 0, KEY_SET_VALUE, &hKey);
 	KG_PROCESS_ERROR(nRetCode == ERROR_SUCCESS);
 
	//恢复安装目录注册表数据
 	nRetCode = ::RegSetValueEx(
					hKey,
					REG_INSTALL_PATH_NAME,
					0,
					REG_SZ,
					(LPBYTE)g_szRegInstallPath, 
					MAX_PATH
				 );
 	if(nRetCode != ERROR_SUCCESS)
	{
		KGLogPrintf(KGLOG_ERR, "Restore Reg Install Path Failed");
	}
	//恢复版本信息注册表数据
	nRetCode = ::RegSetValueEx(
					hKey,
					REG_CURRENT_VERSION_NAME,
					0,
					REG_SZ,
					(LPBYTE)g_szRegVersion, 
					MAX_VERSION_LENGTH
				 );
	if(nRetCode != ERROR_SUCCESS)
	{
		KGLogPrintf(KGLOG_ERR, "Restore Reg Version Failed");
	}
 
 	nResult = true;
 Exit0:
 	if (hKey)
 	{
 		::RegCloseKey(hKey);
 		hKey = NULL;
 	}
 	return nResult;
}
开发者ID:viticm,项目名称:pap2,代码行数:46,代码来源:KTestCommon.cpp

示例5: ASSERT

int KSystemScriptTable::LuaSwapMouseButton(Lua_State* L)
{
    ASSERT(L);
    int nSwap = FALSE;

    KG_PROCESS_ERROR(lua_gettop(L) == 1);

    if (lua_isboolean(L, 1))
        nSwap = (int)Lua_ValueToBoolean(L, 1);
    else
        nSwap = (int)Lua_ValueToNumber(L, 1);

    ::SwapMouseButton(nSwap);

Exit0:
    return 0;
}
开发者ID:viticm,项目名称:pap2,代码行数:17,代码来源:ksystemscripttable.cpp

示例6: KG_PROCESS_ERROR

BOOL KApexProxy::Send(IKG_Buffer* piBuffer)
{
    BOOL bResult    = false;
    int  nRetCode   = 0;

    KG_PROCESS_ERROR(m_piSocketStream);

    nRetCode = m_piSocketStream->Send(piBuffer);
    KGLOG_PROCESS_ERROR(nRetCode == 1);

    bResult = true;
Exit0:
    if (!bResult)
        m_bSendErrorFlag = true;

    return bResult;
}
开发者ID:viticm,项目名称:pap2,代码行数:17,代码来源:KApexProxy.cpp

示例7: KG_PROCESS_ERROR

HTREEITEM KGTreeCtrl::GetLastSibingItem(HTREEITEM hTreeItem)
{
	HTREEITEM hResultItem = NULL;
	HTREEITEM hNextItem   = NULL;

	KG_PROCESS_ERROR(hTreeItem);

	hNextItem = hTreeItem;
	while (hNextItem)
	{
		hResultItem = hNextItem;
		hNextItem = GetNextSiblingItem(hNextItem);
	}

Exit0:
	return hResultItem;
}
开发者ID:viticm,项目名称:pap2,代码行数:17,代码来源:KGTreeCtrl.cpp

示例8: InitProtocolStruct

int InitProtocolStruct(KG_AGENT_PROTOCOL *AgentProtocol)
{
    int nResult = false;

    KG_PROCESS_ERROR(AgentProtocol);

    AgentProtocol->pszCommand    = NULL;
    AgentProtocol->nProtocolType = KG_AGENT_PROTOCOL_TYPE_INVALID;
    AgentProtocol->nSequenceID   = KG_AGENT_SEQUENCE_ID_INVALID;
    AgentProtocol->nResult       = 0;
    AgentProtocol->pszContext    = NULL;
    AgentProtocol->CommandParameterMap.clear();

    nResult = true;
Exit0:
    return nResult;
}
开发者ID:viticm,项目名称:pap2,代码行数:17,代码来源:KG_AgentUtil.cpp

示例9: g_GetFullPath

int KGSFXModelViewPage::FillComb()
{
    int nResult  = false;

    TCHAR  szFilePath[MAX_PATH];
    TCHAR  szFullPath[MAX_PATH];
    TCHAR* pExt = NULL;
    CFileFind fileFind;

    g_GetFullPath(szFullPath, m_strSelPath.GetBuffer());
    pExt = strrchr(szFullPath, '\\');
    KG_PROCESS_ERROR(pExt);
    *pExt = '\0';

    m_comb.ResetContent();
    sprintf(szFilePath, "%s%s", szFullPath, TEXT("\\*.*"));
    BOOL bWorking = fileFind.FindFile(szFilePath);
    while (bWorking)
    {
        bWorking = fileFind.FindNextFile();
        if (fileFind.IsDots())
            continue;
        CString strPath = fileFind.GetFilePath();
        CString strName = fileFind.GetFileName();
        if (fileFind.IsDirectory())
            continue;

        TCHAR  szName[MAX_PATH];
        strncpy(szName, strName.GetBuffer(), sizeof(szName));
        TCHAR* pszExt = strrchr(szName, '.');
        if (!pszExt)
            continue;
        if (!stricmp(pszExt, TEXT(".ani")))
            m_comb.AddString(szName);
        else
            continue;

    }
    m_comb.AddString(TEXT("浏览......"));
    fileFind.Close();

    nResult = true;
Exit0:
    return nResult;
}
开发者ID:viticm,项目名称:pap2,代码行数:45,代码来源:KGSFXModelViewPage.cpp

示例10: KG_PROCESS_SUCCESS

HRESULT KG3DMesh::RefreshOption(unsigned uOption)
{
	HRESULT hrResult = E_FAIL;
	HRESULT hrRetCode  = E_FAIL;

	KG_PROCESS_SUCCESS(m_eDynamicLoadState == STATE_VIDEOMEM);
	KG_PROCESS_SUCCESS(uOption == m_uOption);

	//在加载为立即加载的时候
	if ((uOption & MLO_MULTI) == 0)
	{
		switch (m_eDynamicLoadState)
		{
		//什么都还没有做
		case STATE_NONE:
            hrRetCode = LoadFromFile(m_scName.c_str(), 0, uOption);
            KGLOG_COM_PROCESS_ERROR(hrRetCode);
            break;

		case STATE_LOADFAILED:
            KG_PROCESS_ERROR(false);
			break;
		//正在动态加载
		case STATE_MULTITHREAD_PREPEAR:
			{
				while (m_eDynamicLoadState == STATE_MULTITHREAD_PREPEAR)
                {
                    Sleep(1); // wait
                    hrRetCode = CheckLoadingState();
                    //KGLOG_COM_PROCESS_ERROR(hrRetCode);
                }
                KGLOG_PROCESS_ERROR(m_eDynamicLoadState == STATE_VIDEOMEM);
				goto Exit1;
				break;
			}
		default:
			assert(0);
		}
	}
	m_uOption = uOption;
Exit1:
	hrResult = S_OK;
Exit0:
	return hrResult;
}
开发者ID:1suming,项目名称:pap2,代码行数:45,代码来源:KG3DMeshLoader.cpp

示例11: KG_PROCESS_ERROR

void KStatDataManager::UpdateMoneyStat(KRole* pRole, int nMoney, const char cszMethod[])
{
    const char* pszGain = (nMoney >= 0 ? "GAIN" : "COST");
    char szVarName[STAT_DATA_NAME_LEN];

    KG_PROCESS_ERROR(nMoney != 0);

    snprintf(szVarName, sizeof(szVarName), "MONEY|%s|%lu|%d|%s", pszGain, pRole->m_dwMapID, pRole->m_byLevel, cszMethod);
    szVarName[sizeof(szVarName) - 1] = '\0';

    if (nMoney < 0)
        nMoney = -nMoney;

    Update(szVarName, nMoney);

Exit0:
    return;
}
开发者ID:viticm,项目名称:pap2,代码行数:18,代码来源:KStatDataManager.cpp

示例12: _T

int KDumpFile::InitMiniDumpType()
{
    int nResult = FALSE;
    int nValue  = 0;

    nValue = (int)GetPrivateProfileInt(
        _T("MiniDumpType"), 
        _T("EnableFullMemory"), 
        0, 
        MINIDUMP_CONFIG
    );   
    KG_PROCESS_ERROR(nValue == 0 || nValue == 1);
    m_nFullMemoryFlag = nValue;

    nResult = TRUE;
Exit0:
    return nResult;
}
开发者ID:viticm,项目名称:pap2,代码行数:18,代码来源:KDumpFile.cpp

示例13: KGLOG_PROCESS_ERROR

BOOL KGFellowshipMgr::RefreshDailyCount(DWORD dwPlayerID)
{
    BOOL                    bResult     = false;
    BOOL                    bRetCode    = false;
    _RefreshDailyCountFunc  RefreshDailyCountFunc;

    KGLOG_PROCESS_ERROR(dwPlayerID != ERROR_ID);

    RefreshDailyCountFunc.m_pConstList = &(g_pSO3World->m_Settings.m_ConstList);
    RefreshDailyCountFunc.m_pFellowshipMgr = this;

    bRetCode = TraverseFellowshipID(dwPlayerID, RefreshDailyCountFunc);
    KG_PROCESS_ERROR(bRetCode);

    bResult = true;
Exit0:
    return bResult;
}
开发者ID:viticm,项目名称:pap2,代码行数:18,代码来源:KFellowship.cpp

示例14: KG_PROCESS_ERROR

int KUiShowWndTree::Expand(HWND hTree, KSHOWWNDNODE *pNode)
{
    int nResult = false;
    KSHOWWNDNODE *pParent = NULL;
    KG_PROCESS_ERROR(pNode);
    
    TreeView_Expand(hTree, pNode->hItem, TVM_EXPAND);
    pParent = pNode->pParentNode;
    while (pParent)
    {
        TreeView_Expand(hTree, pParent->hItem, TVM_EXPAND);
        pParent = pParent->pParentNode;
    }

    nResult = true;
Exit0:
    return nResult;
}
开发者ID:viticm,项目名称:pap2,代码行数:18,代码来源:UiShowWndTree.cpp

示例15: IsBipFileExist

int IsBipFileExist(const char cszBipName[])
{
    int nResult  = false;
    int nRetCode = false;

    ASSERT(cszBipName);

    nRetCode = g_IsFileExist(cszBipName);
    KG_PROCESS_ERROR(nRetCode);

    nResult = true;
Exit0:
    if (!nResult)
    {
        KGLogPrintf(KGLOG_INFO, "can't find bip file!! \"%s\"", cszBipName);
    }
    return nResult;
}
开发者ID:viticm,项目名称:pap2,代码行数:18,代码来源:main.cpp


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