• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ KG_PROCESS_ERROR函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: KG_PROCESS_ERROR

BOOL KLogClient::LogTrainvalueChange(int nAddValue, const char* pszAccount, const char* pszRoleName)
{
    BOOL bResult  = false;
    int  nRetCode = 0;
    char szAddValue[10];

    KG_PROCESS_ERROR(nAddValue != 0);

    nRetCode = snprintf(szAddValue, sizeof(szAddValue), "%d", nAddValue);
    KGLOG_PROCESS_ERROR(nRetCode >= 0 && nRetCode < (int)sizeof(szAddValue));

    bResult = LogPlayerAction(
        PLAYER_ACTION_TRAINVALUE_CHANGE, 50, szAddValue,
        pszAccount, pszRoleName, 0, NULL
    );
Exit0:
    return bResult;
}
开发者ID:1suming,项目名称:pap2,代码行数:18,代码来源:KLogClient.cpp


示例17: Lua_GetTopIndex

int KHero::LuaLoseStamina(Lua_State* L)
{
    BOOL bResult  = false;
    int nTopIndex = 0;
    int nLoseStamina = 0;

    nTopIndex = Lua_GetTopIndex(L);
    KG_PROCESS_ERROR(nTopIndex == 1);

    nLoseStamina = (int)Lua_ValueToNumber(L, 1);

    LoseStamina(nLoseStamina);

    bResult = true;
Exit0:
    Lua_PushNumber(L, bResult);
    return 1;
}
开发者ID:zhengguo85938406,项目名称:GameWorld,代码行数:18,代码来源:KLuaHero.cpp


示例18: KG_PROCESS_ERROR

int KCoolDownList::GetCoolDownValue(DWORD dwCoolDownID)
{
    int                      nResult = 0;
    KCOOL_DOWN_MAP::iterator it;

    KG_PROCESS_ERROR(dwCoolDownID != 0);

    it = m_CoolDownTable.find(dwCoolDownID);
    if (it == m_CoolDownTable.end())
    {
        KGLogPrintf(KGLOG_DEBUG, "GetCoolDownValue %u Faild!", dwCoolDownID);
        goto Exit0;
    }

    nResult = it->second.nDuration;
Exit0:
    return nResult;
}
开发者ID:zhengguo85938406,项目名称:GameWorld,代码行数:18,代码来源:KCoolDownList.cpp


示例19: assert

BOOL KScriptManager::Call(const char* pszScriptName, const char* pszFuncName, int nResults)
{
    BOOL    bResult     = false;
	BOOL    bRetCode    = false;
	DWORD   dwScriptID  = 0;
	
	assert(pszScriptName);
    assert(nResults >= 0);

	dwScriptID = g_FileNameHash(pszScriptName);

	bRetCode = Call(dwScriptID, pszFuncName, nResults);
	KG_PROCESS_ERROR(bRetCode);

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


示例20: assert

void KCollisionMgr::OnHeroCollisionBananaPeel(KSceneObject* pSource, KSceneObject* pDest)
{
    BOOL            bRetCode    = false;
    KHero*          pHero       = NULL;
    KBananaPeel*    pBananaPeel = NULL;

    assert(pSource->Is(sotHero));
    pHero       = (KHero*)pSource;

    assert(pDest->Is(sotBananaPeel));
    pBananaPeel = (KBananaPeel*)pDest;

    bRetCode = pBananaPeel->CollidedByHero(pHero);
    KG_PROCESS_ERROR(bRetCode);

Exit0:
    return;
}
开发者ID:zhengguo85938406,项目名称:GameWorld,代码行数:18,代码来源:KCollisionMgr.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ KG_PROCESS_SUCCESS函数代码示例发布时间:2022-05-30
下一篇:
C++ KG_COM_RELEASE函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap