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

C++ CHECK_POINTER函数代码示例

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

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



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

示例1: CHECK_POINTER

// 获取排序的枚举型
IVS_BOOL CDevEnum::GetOrderTypeBool( const IVS_CHAR* pLoginType )
{

    CHECK_POINTER(pLoginType, IVS_OPERATE_MEMORY_ERROR);

    if (0 == strcmp(pLoginType, "DOWN"))
    {
        return TRUE;
    }

    return  FALSE;
}
开发者ID:my76128,项目名称:esdk_ivs_sdk_linux,代码行数:13,代码来源:devEnum.cpp


示例2: CHECK_POINTER

CString CWebPage::GetHTMLContent()
{
    CHECK_POINTER(m_spDoc);

    CComPtr<IHTMLElement> pBody;
    VERIFY(SUCCEEDED(m_spDoc->get_body(&pBody)));

    CComBSTR  content;
    VERIFY(SUCCEEDED(pBody->get_innerHTML(&content)));

    return CString(content);
}
开发者ID:nk39,项目名称:mototool,代码行数:12,代码来源:WebPage.cpp


示例3: CHECK_POINTER

// 直接解析NSS头,返回一个结果码
int CNSSOperator::ParseCmd2NSS(CCmd* pCmd)
{
    CHECK_POINTER(pCmd, IVS_FAIL);     //add by xiongfeng00192614    
	CNssMsgBase nssMsg;
	uint32_t iRet = nssMsg.decode(pCmd->GetMsgBlock());
	if(NssRet_Succeed != iRet)
	{
        BP_RUN_LOG_ERR(IVS_FAIL,"decode cmd failed", "iRet = %d", iRet);
		return IVS_FAIL;       //modify by xiongfeng00192614    错误返回NULL (0)会被误认为成功
	}
	return nssMsg.GetHeader().uiRspCode; //lint !e10 !e713 无此问题
}//lint !e1762
开发者ID:rgmabs19357,项目名称:esdk_ivs_sdk_windows,代码行数:13,代码来源:NSSOperator.cpp


示例4: BP_RUN_LOG_INF

// 推送发现到的前端设备
int CSDKMainctrl::OnDisCoveredDevNotify(CCmd* pCmd)const
{
	BP_RUN_LOG_INF("OnDisCoveredDevNotify", "Begin");
	CHECK_POINTER(pCmd, IVS_OPERATE_MEMORY_ERROR);
	
	IVS_CHAR* pData = CSDKMainService::ProcessDevNotify(pCmd);
	CHECK_POINTER(pData, IVS_OPERATE_MEMORY_ERROR);

	int iSessionID = CLinkRouteMgr::instance().FindSessionIDByLinkID(pCmd->GetNetLinkID());  //lint !e1013 !e1055 !e746 !e64
	if (SDK_SESSIONID_INIT == iSessionID)
	{
		BP_RUN_LOG_ERR(IVS_SDK_RET_INVALID_SESSION_ID, "linkage action", "iSessionID is -1");
		IVS_DELETE(pData, MUILI);
		return IVS_FAIL;
	}
	CEventCallBackJob::instance().PostEvent(iSessionID, IVS_EVENT_FIND_DEVICE, pData, static_cast<IVS_INT32>(strlen(pData)) + 1);
    IVS_DELETE(pData, MUILI);
	BP_RUN_LOG_INF("OnDisCoveredDevNotify", "End");
	return IVS_SUCCEED;

}
开发者ID:rgmabs19357,项目名称:esdk_ivs_sdk_windows,代码行数:22,代码来源:SDKMainCtrl.cpp


示例5: CHECK_POINTER

IVS_ULONG CWindowSkinXML::TitleBarGetBackGround(std::string &strBGPtth)
{
    strBGPtth.clear();

    TiXmlElement * pChildElement = nullptr;
    CHECK_POINTER(m_pTitleBarRootElement,IVS_FAIL);
    pChildElement =	m_pTitleBarRootElement->FirstChildElement("BackGround");
    CHECK_POINTER(pChildElement,IVS_FAIL);

    pChildElement = pChildElement->FirstChildElement("Picture");
    CHECK_POINTER(pChildElement,IVS_FAIL);

    TiXmlNode *pChildNode = nullptr;
    pChildNode = pChildElement->FirstChild();
    CHECK_POINTER(pChildNode,IVS_FAIL);

    const TCHAR * pc = pChildNode->Value();
    (void)strBGPtth.append(pc);

    return IVS_SUCCEED;
}
开发者ID:rgmabs19357,项目名称:esdk_ivs_sdk_windows,代码行数:21,代码来源:WindowSkinXML.cpp


示例6: CHECK_POINTER

 // 通用请求XML增加QueryField字段
 IVS_INT32 CXmlProcess::AddQueryFieldForUnifiedFormatQueryXML(const IVS_CHAR* pField,const IVS_CHAR* pValue, CXml& xmlReq)
 {
	 CHECK_POINTER(pField, IVS_OPERATE_MEMORY_ERROR);
	 CHECK_POINTER(pValue, IVS_OPERATE_MEMORY_ERROR);

	 std::string sQueryType = "EXACT";
	 if (xmlReq.FindElemEx("Content/PageInfo/QueryCond/QueryField"))
	 {
		 xmlReq.OutOfElem();
		 (void)xmlReq.AddElem("QueryField");
		 (void)xmlReq.AddChildElem("Field");
		 (void)xmlReq.IntoElem();
		 (void)xmlReq.SetElemValue(pField);
		 (void)xmlReq.AddElem("Value");
		 (void)xmlReq.SetElemValue(pValue); 
		 (void)xmlReq.AddElem("QueryType");
		 (void)xmlReq.SetElemValue(sQueryType.c_str());
		 xmlReq.OutOfElem();
	 }
	 return IVS_SUCCEED;
 }
开发者ID:rgmabs19357,项目名称:esdk_ivs_sdk_windows,代码行数:22,代码来源:XmlProcess.cpp


示例7: CHECK_POINTER

/**************************************************************************
* name       : Parse
* description: 解析一个xml流到xml文件
* input      : pszStream xml流
* output     : NA
* return     : true - 成功,false - 失败
* remark     : NA
**************************************************************************/
bool CXml::Parse(const char *pszStream, TiXmlEncoding encode)
{
    CHECK_POINTER(pszStream, false);

    //songyiqun
	SAFE_DELETE(m_pXMlDoc);
    SAFE_NEW(m_pXMlDoc, TiXmlDocument);//lint !e774

    CHECK_POINTER(m_pXMlDoc, false);//lint !e774

    //TIXML_ENCODING_LEGACY为Tinyxml使用的编码方式
    (void)(m_pXMlDoc->Parse(pszStream, NULL, encode));
    if (0 != m_pXMlDoc->Error())
    {
        return false;
    }

    GetRootPos();

    return true;
}
开发者ID:eSDK,项目名称:esdk_elte,代码行数:29,代码来源:eLTE_Xml.cpp


示例8: SearchContact

int UCSDK_CALL SearchContact(const char* condition, const char* deptid,
							 int querysubdept, int offset, int count, int ordertype, 
							 int* recamount, UCContactList* memberList)
{
	DEBUG_LOG() << "--- ENTER";
	CHECK_POINTER(memberList, UC_InvalidParam);
	CHECK_POINTER(condition, UC_InvalidParam);
	CHECK_POINTER(deptid, UC_InvalidParam);
	CHECK_POINTER(recamount, UC_InvalidParam);

	UCContactMgrAbsProxy* pUCContactMgrAbsProxy = UCContactMgrAbsProxy::GetInstance();
	CHECK_POINTER(pUCContactMgrAbsProxy, UC_NullPoint);

	bool querysub = true;
	if (0 == querysubdept)
	{
		querysub = false;
	}
	UCSDKContactList contactlist;
	int iRet = pUCContactMgrAbsProxy->SearchContact(contactlist, condition, deptid, querysub, offset, count, ordertype, *recamount);
	CHECK_RETURN(iRet, UC_Succ, "SearchContact");

	int iFoundCount = (int)contactlist.size();
	int iEnd = iFoundCount;
	if (iFoundCount > count)
	{
		WARN_LOG() << "contactlist's size is large than count.";
		iEnd = count;
	}
	for (int i=0; i<iEnd; i++)
	{
		UCStructCopy::Copy_UCContact(memberList->contact[i], contactlist[(unsigned int)i]);
	}
	memberList->iFrom = 0;
	memberList->iTo = iEnd-1;
	memberList->iTotal = iFoundCount;

	DEBUG_LOG() << "--- LEAVE";
	return UC_Succ;
}
开发者ID:eSDK,项目名称:eSDKClient_Soultion,代码行数:40,代码来源:UCContactMgr.cpp


示例9: CHECK_POINTER

// 删除角色
IVS_INT32 CRoleMgr::DeleteRole(const IVS_CHAR* pDomainCode, IVS_UINT32 uiRoleID)
{
    CHECK_POINTER(m_UserMgr, IVS_OPERATE_MEMORY_ERROR);
    IVS_DEBUG_TRACE("");

    std::string strDomainCode;
    if(NULL == pDomainCode || '\0' == pDomainCode[0])
    {
        m_UserMgr->GetDomainCode(strDomainCode);
    }
    else
    {
        strDomainCode = pDomainCode;
    }

    IVS_ROLE_INFO pRoleInfo;
    memset(&pRoleInfo, 0, sizeof(IVS_ROLE_INFO));
    pRoleInfo.uiRoleID = uiRoleID;

    //拼接请求信息
    IVS_INT32 iRet = IVS_FAIL;
    CXml xmlReq;
    CUserInfoMgrXMLProcess::GetRoleXML(strDomainCode.c_str(), &pRoleInfo, xmlReq);
    unsigned int xmlLen = 0;
    const IVS_CHAR* pReq = xmlReq.GetXMLStream(xmlLen);
    CHECK_POINTER(pReq, IVS_OPERATE_MEMORY_ERROR);

    // 构造带域的请求消息,并发送
    CSendNssMsgInfo sendNssMsgInfo;
    sendNssMsgInfo.SetNeedXml(TYPE_NSS_NOXML);
    sendNssMsgInfo.SetNetElemType(NET_ELE_SMU_NSS);
    sendNssMsgInfo.SetReqID(NSS_DEL_ROLE_REQ);
    sendNssMsgInfo.SetReqData(pReq);
    sendNssMsgInfo.SetDomainCode(strDomainCode);
    std::string strpRsp;
    IVS_INT32 iNeedRedirect = IVS_FAIL;
    iRet = m_UserMgr->SendCmd(sendNssMsgInfo,strpRsp,iNeedRedirect);

    return iRet;
}
开发者ID:my76128,项目名称:esdk_ivs_sdk_linux,代码行数:41,代码来源:RoleMgr.cpp


示例10: IVS_DEBUG_TRACE

IVS_INT32 CReportMgr::SendQueryCmd(const IVS_CHAR* pReqXml, IVS_CHAR** pRspXml, IVS_INT32 iMsgType,  IVS_INT32 iTimeOut)
{
	IVS_DEBUG_TRACE("");
    CHECK_POINTER(pReqXml, IVS_OPERATE_MEMORY_ERROR);
    CHECK_POINTER(m_UserMgr, IVS_OPERATE_MEMORY_ERROR);

    IVS_INT32 iRet = IVS_FAIL;
	std::string strLocalDomainLink;

	iRet = m_UserMgr->GetLocalDomainLinkID(NET_ELE_OMU_NSS, strLocalDomainLink);
	if (IVS_SUCCEED != iRet)
	{
		BP_RUN_LOG_ERR(iRet, "Send Query Cmd", "Get Local Domain OMU Link Failed");
		return iRet;
	}
	CCmd *pCmd = CNSSOperator::instance().BuildOMUCmd(iMsgType, pReqXml, strLocalDomainLink);
    CHECK_POINTER(pCmd, IVS_OPERATE_MEMORY_ERROR);

    CCmd* pRspCmd =NULL;
    if (0 < iTimeOut)
    {
        // 1表示不采用默认的超时时间,即用iTimeOut
        pRspCmd = CNSSOperator::instance().SendSyncCmd(pCmd, (IVS_UINT32)iTimeOut, 1);
    }
    else
    {
        pRspCmd = CNSSOperator::instance().SendSyncCmd(pCmd);
    }
	if (NULL == pRspCmd)
	{
		BP_RUN_LOG_ERR(IVS_NET_RECV_TIMEOUT, "Send Query Cmd", "pRspCmd is NULL");
		return IVS_NET_RECV_TIMEOUT;
	}

    iRet = IVS_SUCCEED;
    *pRspXml = CNSSOperator::instance().ParseCmd2XML(pRspCmd, iRet);
    HW_DELETE(pRspCmd);

    return iRet;
}//lint !e1762
开发者ID:my76128,项目名称:esdk_ivs_sdk_linux,代码行数:40,代码来源:ReportMgr.cpp


示例11: CHECK_POINTER

IVS_INT32 CDomainRouteMgr::SendCmdAndGetInfo(CXml& xmlRsp) const
{
    IVS_INT32 iRet = IVS_FAIL;
    CHECK_POINTER(m_pUserMgr,IVS_OPERATE_MEMORY_ERROR);
    // 获取本域SMU连接
    std::string strSMULinkID;
    IVS_INT32 iGetLinkRet = m_pUserMgr->GetLocalDomainLinkID(NET_ELE_SMU_NSS, strSMULinkID);
    if (IVS_SUCCEED != iGetLinkRet)
    {
        BP_RUN_LOG_ERR(iGetLinkRet, "Get LocalDomainLinkID failed", "NA");
        return iGetLinkRet;
    }
    //创建要发送的CMD,拼装了NSS消息头
    CCmd* pCmd = CNSSOperator::instance().BuildSMUCmd(NSS_GET_DOMAIN_ROUTE_REQ, NULL, strSMULinkID);

    CHECK_POINTER(pCmd, IVS_OPERATE_MEMORY_ERROR);

    //发送消息
    CCmd *pCmdRsp = CNSSOperator::instance().SendSyncCmd(pCmd);
    CHECK_POINTER(pCmdRsp, IVS_NET_RECV_TIMEOUT);

    const IVS_CHAR* pRsp = CNSSOperator::instance().ParseCmd2XML(pCmdRsp, iRet);
    HW_DELETE(pCmdRsp);
    CHECK_POINTER(pRsp, iRet);
    if (IVS_SUCCEED != iRet)
    {
		 BP_RUN_LOG_INF("Send Command get return value", " Error");
		 IVS_DELETE(pRsp, MUILI); //lint !e605
		 return IVS_FAIL;
	}
	iRet = IVS_XML_INVALID;
    BP_RUN_LOG_INF("Get domain route ", "pRsp:%s", pRsp);
    if (xmlRsp.Parse(pRsp))
    {
		iRet = IVS_SUCCEED;
    }
    IVS_DELETE(pRsp, MUILI); //lint !e605
    return iRet;
}
开发者ID:my76128,项目名称:esdk_ivs_sdk_linux,代码行数:39,代码来源:DomainRouteMgr.cpp


示例12: CHECK_POINTER

// add by zwx211831, Date:20140605 处理客户端关闭视频业务通知
int CSDKMainctrl::OnShutdownStreamNotify(CCmd* pCmd) const
{
	CHECK_POINTER(pCmd, IVS_OPERATE_MEMORY_ERROR);

	IVS_INT32 iRet = IVS_FAIL;
	IVS_CHAR *pInfo = CNSSOperator::instance().ParseCmd2XML(pCmd, iRet);
	CHECK_POINTER(pInfo, IVS_OPERATE_MEMORY_ERROR);

	IVS_SHUTDOWN_NOTIFY_INFO stShutdownNotifyInfo = {0};
	if (IVS_SUCCEED == iRet)
	{
		CXml xmlRsp;
		if (!xmlRsp.Parse(pInfo))
		{
			BP_RUN_LOG_ERR(IVS_XML_INVALID, "OnShutdownStreamNotify", "XML parse failed");
			HW_DELETE_A(pInfo);
			return IVS_XML_INVALID;
		}
		iRet = CRealXMLProcess::ParseShutdownNotifyXML(xmlRsp, &stShutdownNotifyInfo);
	}
	if (IVS_SUCCEED != iRet)
	{
		BP_RUN_LOG_ERR(IVS_XML_INVALID, "OnShutdownStreamNotify", "XML parse failed");
		HW_DELETE_A(pInfo);
		return IVS_XML_INVALID;
	}

	IVS_INT32 iSessionID = CLinkRouteMgr::instance().FindSessionIDByLinkID(pCmd->GetNetLinkID());
	if (SDK_SESSIONID_INIT == iSessionID)
	{
		BP_RUN_LOG_ERR(IVS_SDK_RET_INVALID_SESSION_ID, "OnShutdownStreamNotify", "iSessionID is -1");
		HW_DELETE_A(pInfo);
		return IVS_SDK_RET_INVALID_SESSION_ID;
	}
	(void)CEventCallBackJob::instance().PostEvent(iSessionID, IVS_EVENT_SHUTDOWN_STREAM, &stShutdownNotifyInfo, sizeof(stShutdownNotifyInfo));
	HW_DELETE_A(pInfo);

	return IVS_SUCCEED;
}
开发者ID:rgmabs19357,项目名称:esdk_ivs_sdk_windows,代码行数:40,代码来源:SDKMainCtrl.cpp


示例13: CHECK_POINTER

// 修改设备组名称
IVS_INT32 CDeviceGroupMgr::ModifyDeviceGroupName(const IVS_CHAR* pDomainCode,
                                             IVS_UINT32 uiDevGroupID,
                                             const IVS_CHAR* pNewDevGroupName)const
{
    CHECK_POINTER(pDomainCode, IVS_OPERATE_MEMORY_ERROR);
    CHECK_POINTER(pNewDevGroupName, IVS_OPERATE_MEMORY_ERROR);
	IVS_DEBUG_TRACE("");

    CXml xmlReq;
    // 组装xml,准备发送给smu
    IVS_INT32 iRet = CDeviceMgrXMLProcess::ModifyDeviceGroupGetXML(pDomainCode, uiDevGroupID, pNewDevGroupName, xmlReq);     
	IVS_CHAR cDomainCode[IVS_DOMAIN_CODE_LEN + 1] = {0};
	if (!CToolsHelp::Memcpy(cDomainCode, IVS_DOMAIN_CODE_LEN, pDomainCode, IVS_DOMAIN_CODE_LEN))
	{
		BP_RUN_LOG_ERR(IVS_ALLOC_MEMORY_ERROR, "Memcpy(cDomainCode, IVS_DOMAIN_CODE_LEN, pDomainCode, IVS_DOMAIN_CODE_LEN) fail", "NA");
		return IVS_ALLOC_MEMORY_ERROR;
	}

	iRet = CXmlProcess::GetCommSendMgr(xmlReq, m_pUserMgr, NSS_MOD_DEV_GROUP_REQ, BUILDRET, cDomainCode);

    return iRet;
}
开发者ID:my76128,项目名称:esdk_ivs_sdk_linux,代码行数:23,代码来源:DeviceGroupMgr.cpp


示例14: realloc

void TextProperty::addElement(IsoString elementName, IsoString value) {
	IText* tp = ((ITextVectorProperty*) m_property->getProperty())->tp;
	int ntp = ((ITextVectorProperty*) m_property->getProperty())->ntp;
	tp = (IText*) realloc(tp, (ntp + 1) * sizeof(IText));
	CHECK_POINTER(tp);
	strcpy(tp->name, elementName.c_str());
	//FIXME Leaks memory?
	tp->text = (char*) malloc(sizeof(value.c_str()));
	strcpy(tp->text, value.c_str());
	tp->tvp = (ITextVectorProperty*) m_property->getProperty();
	((ITextVectorProperty*) m_property->getProperty())->ntp++;
	((ITextVectorProperty*) m_property->getProperty())->tp = tp;
 }
开发者ID:SunGong1993,项目名称:PCL,代码行数:13,代码来源:IINDIProperty.cpp


示例15: switch

 IProperty* PropertyFactory::create(INDI::Property* property,INDI_TYPE type){
	 	property->setType(type);
 		switch(type){
 		case INDI_NUMBER:
 		{
 			INumberVectorProperty* nProperty = new INumberVectorProperty();
 			CHECK_POINTER(nProperty);
 			property->setProperty(nProperty);
 			return new NumberProperty(property);
 			break;
 		}
 		case INDI_TEXT:
 		{
 			ITextVectorProperty* tProperty = new ITextVectorProperty();
 			CHECK_POINTER(tProperty);
 		 	property->setProperty(tProperty);
 			return new TextProperty(property);
 			break;
 		}
 		case INDI_SWITCH:
 		{
 			ISwitchVectorProperty* sProperty = new ISwitchVectorProperty();
 			CHECK_POINTER(sProperty);
 			property->setProperty(sProperty);
 			return new SwitchProperty(property);
 			break;
 		}
 		case INDI_LIGHT:
 		{
 			ILightVectorProperty* lProperty = new ILightVectorProperty();
 			CHECK_POINTER(lProperty);
			property->setProperty(lProperty);
 			return new LightProperty(property);
 			break;
 		}
 		default:
 			throw FatalError(ERR_MSG("Unknown property."));
 		}
 	}
开发者ID:SunGong1993,项目名称:PCL,代码行数:39,代码来源:IINDIProperty.cpp


示例16: CXDException

/*++

Routine Name:

    CNUpSaxHandler::CNUpSaxHandler

Routine Description:

    Contructor for the nup filters SAX handler which registers
    internally the writer for sending new markup out to and a
    resource copier which copies markup between pages

Arguments:

    pWriter    - Pointer to a write stream which receives markup
    pResCopier - Pointer to a resource markup copier object which
                 copies markup between pages

Return Value:

    None
    Throws CXDException(HRESULT) on an error

--*/
CNUpSaxHandler::CNUpSaxHandler(
    _In_ IPrintWriteStream* pWriter,
    _In_ CResourceCopier*   pResCopier,
    _In_ CNUpTransform*     pNUpTransform
    ) :
    m_pWriter(pWriter),
    m_bOpenTag(FALSE),
    m_pResCopier(pResCopier),
    m_pNUpTransform(pNUpTransform)
{
    ASSERTMSG(m_pWriter != NULL, "NULL writer passed to NUp SAX handler.\n");
    ASSERTMSG(m_pResCopier != NULL, "NULL resource copier passed to NUp SAX handler.\n");
    ASSERTMSG(m_pNUpTransform != NULL, "NULL NUp Transform object passed to NUp SAX handler.\n");

    HRESULT hr = S_OK;
    if (FAILED(hr = CHECK_POINTER(m_pWriter, E_PENDING)) ||
        FAILED(hr = CHECK_POINTER(m_pResCopier, E_PENDING)) ||
        FAILED(hr = CHECK_POINTER(m_pNUpTransform, E_PENDING)))
    {
        throw CXDException(hr);
    }
}
开发者ID:Wesley-Lin,项目名称:Windows-driver-samples,代码行数:46,代码来源:nupsax.cpp


示例17: CHECK_POINTER

IVS_INT32 CTPPlayChannel::GetRealPlayURL(const std::string& strCamera, const IVS_MEDIA_ADDR& stMediaAddrDst, ST_MEDIA_RSP& stMediaRsp)
{
	CHECK_POINTER(m_pTPMgr, IVS_OPERATE_MEMORY_ERROR);
	IVS_DEBUG_TRACE("");

	//解析摄像头Code
	std::string strCameraCode;
	std::string strDomainCode;
	IVS_INT32 iRet = CToolsHelp::SplitCameraDomainCode(strCamera.c_str(), strCameraCode, strDomainCode);
	if(IVS_SUCCEED!=iRet)
	{
		BP_RUN_LOG_ERR(iRet, "TP Get RealPlay URL", "SplitCameraCode failed, CameraCode=%s", strCamera.c_str()); 
		return iRet;
	}

	//TODO : szDstPort无实际作用,传一个固定值;打包协议类型szDstPP入参结构体未定义
	ST_URL_MEDIA_INFO stUrlMediaInfo;
	memset(&stUrlMediaInfo, 0, sizeof(ST_URL_MEDIA_INFO));
	bool bSucc = CToolsHelp::Strncpy(stUrlMediaInfo.szSrcCode, sizeof(stUrlMediaInfo.szSrcCode), strCameraCode.c_str(), strCameraCode.length());
	CHECK_SUCCESS_RET(bSucc, IVS_ALLOC_MEMORY_ERROR);

	bSucc = CToolsHelp::Strncpy(stUrlMediaInfo.cDomainCode, sizeof(stUrlMediaInfo.cDomainCode), strDomainCode.c_str(), strDomainCode.length());
	CHECK_SUCCESS_RET(bSucc, IVS_ALLOC_MEMORY_ERROR);

	bSucc = CToolsHelp::Strncpy(stUrlMediaInfo.szDstCode,sizeof(stUrlMediaInfo.szDstCode), "01",strlen("01"));
	CHECK_SUCCESS_RET(bSucc, IVS_ALLOC_MEMORY_ERROR);

	stUrlMediaInfo.ServiceType = SERVICE_TYPE_REALVIDEO;
	stUrlMediaInfo.MediaPara.StreamType = m_stuMediaParam.StreamType;
	stUrlMediaInfo.MediaPara.ProtocolType = m_stuMediaParam.ProtocolType;
	stUrlMediaInfo.MediaPara.TransMode = m_stuMediaParam.TransMode;
	stUrlMediaInfo.MediaPara.BroadCastType = m_stuMediaParam.BroadCastType;
	stUrlMediaInfo.MediaPara.VideoDecType = m_stuMediaParam.VideoDecType;
	stUrlMediaInfo.MediaPara.AudioDecType = m_stuMediaParam.AudioDecType;
	stUrlMediaInfo.PackProtocolType = PACK_PROTOCOL_ES;

	bSucc = CToolsHelp::Strncpy(stUrlMediaInfo.szDstIP,sizeof(stUrlMediaInfo.szDstIP), stMediaAddrDst.stIP.cIP, strnlen(stMediaAddrDst.stIP.cIP, IVS_IP_LEN));
	CHECK_SUCCESS_RET(bSucc, IVS_ALLOC_MEMORY_ERROR);

	std::string strPort = CToolsHelp::Int2Str(static_cast<int>(stMediaAddrDst.uiVideoPort));
	bSucc = CToolsHelp::Strncpy(stUrlMediaInfo.szDstPort,sizeof(stUrlMediaInfo.szDstPort),  strPort.c_str() ,strPort.length());
	CHECK_SUCCESS_RET(bSucc, IVS_ALLOC_MEMORY_ERROR);

	stUrlMediaInfo.iClientType = CLIENT_TYPE_PCG;

	bSucc = CToolsHelp::Strncpy(stUrlMediaInfo.szEncryAlgorithm,sizeof(stUrlMediaInfo.szEncryAlgorithm), "0000000000",strlen("0000000000"));
	CHECK_SUCCESS_RET(bSucc, IVS_ALLOC_MEMORY_ERROR);

	iRet = m_pTPMgr->GetURL(CToolsHelp::GetSCCHead().c_str(), stUrlMediaInfo, stMediaRsp);
	return iRet;
}
开发者ID:rgmabs19357,项目名称:esdk_ivs_sdk_windows,代码行数:51,代码来源:TPPlayChannel.cpp


示例18: CBmpConverter

/*++

Routine Name:

    CScanIterator::CScanIterator

Routine Description:

    CScanIterator constructor

Arguments:


    bmpConv - Bitmap converter class encapsulating the underlying WIC bitmap
    pRect   - The rectangular area of the bitmap over which we want to iterate scanlines

Return Value:

    None
    Throws an exception on error.

--*/
CScanIterator::CScanIterator(
    __in     CONST CBmpConverter& bmpConv,
    __in_opt WICRect*             pRect
    ) :
    CBmpConverter(bmpConv),
    m_bSrcLine(TRUE),
    m_cbWICStride(0),
    m_cWICWidth(0),
    m_cWICHeight(0),
    m_cbWICData(0),
    m_pbWICData(NULL)
{
    HRESULT hr = S_OK;

    UINT cWidth  = 0;
    UINT cHeight = 0;

    if (SUCCEEDED(hr = CHECK_POINTER(m_pBitmap, E_POINTER)) &&
        SUCCEEDED(hr = m_pBitmap->GetSize(&cWidth, &cHeight)))
    {
        if (pRect == NULL)
        {
            //
            // We want to iterate over the entire surface
            //
            m_rectTotal.X = 0;
            m_rectTotal.Y = 0;
            m_rectTotal.Width  = static_cast<INT>(cWidth);
            m_rectTotal.Height = static_cast<INT>(cHeight);
        }
        else
        {
            if (pRect->X >= 0 &&
                pRect->Y >= 0 &&
                pRect->Width  <= static_cast<INT>(cWidth) &&
                pRect->Height <= static_cast<INT>(cHeight))
            {
                m_rectTotal = *pRect;
            }
            else
            {
                hr = E_INVALIDARG;
            }
        }
    }

    if (FAILED(hr))
    {
        throw CXDException(hr);
    }
}
开发者ID:kcrazy,项目名称:winekit,代码行数:73,代码来源:scaniter.cpp


示例19: GetAllContactlist

int UCSDK_CALL GetAllContactlist(int iFrom, int iTo, UCContactList* memberList)
{
	DEBUG_LOG() << "--- ENTER";
	CHECK_POINTER(memberList, UC_InvalidParam);
	if (0 > iFrom || iFrom > iTo)
	{
		INFO_PARAM2(iFrom, iTo);
		ERROR_LOG() << "iFrom or iTo is Invaild praram";
		DEBUG_LOG() << "--- LEAVE";
		return UC_InvalidParam;
	}

	UCContactMgrAbsProxy* pUCContactMgrAbsProxy = UCContactMgrAbsProxy::GetInstance();
	CHECK_POINTER(pUCContactMgrAbsProxy, UC_NullPoint);

	UCSDKContactList contactlist;
	int iRet = pUCContactMgrAbsProxy->GetAllContactlist(contactlist);
	CHECK_RETURN(iRet, UC_Succ, "GetAllContactlist");

	int iTotalSize = (int)contactlist.size();
	if (iTotalSize > 0 && iFrom > iTotalSize - 1)
	{
		ERROR_LOG() << "iFrom is greater than the total size.";
		DEBUG_LOG() << "--- LEAVE";
		return UC_InvalidParam;
	}
	int iEnd = iTo < (iTotalSize - 1) ? iTo : (iTotalSize - 1);
	for (int i=iFrom; i<=iEnd; i++)
	{
		UCStructCopy::Copy_UCContact(memberList->contact[i-iFrom], contactlist[(unsigned int)i]);
	}
	memberList->iFrom = iFrom;
	memberList->iTo = iEnd;
	memberList->iTotal = iTotalSize;

	DEBUG_LOG() << "--- LEAVE";
	return UC_Succ;
}
开发者ID:eSDK,项目名称:eSDKClient_Soultion,代码行数:38,代码来源:UCContactMgr.cpp


示例20: CanStartSession

int UCSDK_CALL CanStartSession(const UCContact* member, int _type)
{
	DEBUG_LOG() << "--- ENTER";
	CHECK_POINTER(member, false);

	UCContactMgrAbsProxy* pUCContactMgrAbsProxy = UCContactMgrAbsProxy::GetInstance();
	CHECK_POINTER(pUCContactMgrAbsProxy, false);

	UCSDKContact contact;
	UCStructCopy::Copy_UCSDKContact(contact, *member);

	bool bRet = pUCContactMgrAbsProxy->CanStartSession(contact, (SESSION_TYPE_E)_type);
	INFO_PARAM1(bRet);

	int iRet = UC_Fail;
	if (bRet)
	{
		iRet = UC_Succ;
	}

	DEBUG_LOG() << "--- LEAVE";
	return iRet;
}
开发者ID:eSDK,项目名称:eSDKClient_Soultion,代码行数:23,代码来源:UCContactMgr.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ CHECK_PTR函数代码示例发布时间:2022-05-30
下一篇:
C++ CHECK_PDU_POINTER_AND_LENGTH_ENCODER函数代码示例发布时间: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