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


C++ CObArray::GetCount方法代码示例

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


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

示例1:

CGameBoard::~CGameBoard()
{
	for( int i=0; i<this->GetCount(); i++ )
	{
		CObArray* row = (CObArray*)CObArray::GetAt(i);
		for( int j=0; j<row->GetCount(); j++ )
		{
			delete this->GetAt(i,j);
		}
	}
}
开发者ID:Flip535,项目名称:ScrabbleSolver,代码行数:11,代码来源:GameBoard.cpp

示例2: GetContacts


//.........这里部分代码省略.........
								mapiContact.GetName(strText,PR_MIDDLE_NAME);
								pContact->SetMiddleName(strText);

								mapiContact.GetName(strText,PR_SURNAME);
								pContact->SetLastName(strText);

								mapiContact.GetEmail(strText);
								pContact->SetEmail(strText);	

								mapiContact.GetEmail(strText,2);//Email 2
								pContact->SetEmail2(strText);

								mapiContact.GetEmail(strText,3);//Email 3
								pContact->SetEmail3(strText);

								mapiContact.GetPhoneNumber(strText,PR_BUSINESS_TELEPHONE_NUMBER);
								pContact->SetBusinessPhone(strText);

								mapiContact.GetPhoneNumber(strText,PR_COMPANY_MAIN_PHONE_NUMBER);
								pContact->SetCompanyPhone(strText);

								mapiContact.GetPhoneNumber(strText,PR_BUSINESS_FAX_NUMBER);
								pContact->SetFax(strText);

								mapiContact.GetPhoneNumber(strText,PR_MOBILE_TELEPHONE_NUMBER);
								pContact->SetMobilePhone(strText);

								mapiContact.GetPhoneNumber(strText,PR_HOME_TELEPHONE_NUMBER);
								pContact->SetHomePhone(strText);

								if(m_pCtrl->FetchUnique())
								{
									BOOL isContactExist = FALSE;
									for(int i=0;i<contactArray.GetCount();i++)
									{
										CContact* pTemp = (CContact*)contactArray.GetAt(i);

										if(pContact->GetEmail() != "" && pTemp->GetEmail() == pContact->GetEmail())
										{
											isContactExist = TRUE;
											break;																	
										}
										else if(pContact->GetFullName() != "" && pTemp->GetFullName() == pContact->GetFullName())
										{
											isContactExist = TRUE;
											break;
										}
										else if(pContact->GetMobilePhone() != "" && pTemp->GetMobilePhone() == pContact->GetMobilePhone())
										{
											isContactExist = TRUE;
											break;
										}
										else if(pContact->GetHomePhone() != "" && pTemp->GetHomePhone() == pContact->GetHomePhone())
										{
											isContactExist = TRUE;
											break;
										}
										else if(pContact->GetBusinessPhone() != "" && pTemp->GetBusinessPhone() == pContact->GetBusinessPhone())
										{
											isContactExist = TRUE;
											break;
										}
									}

									if(isContactExist)
									{
开发者ID:whyzgeek,项目名称:MS-OutLook-ContactsImporter,代码行数:67,代码来源:ExMapi.cpp

示例3: execWaitForAllChilds

int CExecCommand::execWaitForAllChilds( LPCTSTR lpstrCommand, LPCTSTR lpstrPath)
{
	CObArray		myProcessList;
	CProcessProps	*pProcess;
	DWORD			dwExitCode,
					dwProcessID,
					dwTime = 0;

	try
	{
		ASSERT( lpstrCommand);

		// Start process
		initialize();
		if ((dwProcessID = realCreateProcess( lpstrCommand, lpstrPath)) == 0) 
		{
			closeHandles();
			return EXEC_ERROR_START_COMMAND;
		}
		// We need high priority on OS to follow thread/process created by main command
		SetPriorityClass( GetCurrentProcess(), HIGH_PRIORITY_CLASS);
		// Store first process
		pProcess = new CProcessProps();
		pProcess->set( dwProcessID, GetCurrentProcessId(), lpstrCommand);
		myProcessList.Add( pProcess);
		// While there is running processes or timeout not reached
		while ((myProcessList.GetCount() > 0) && (dwTime < m_dwTimeout))
		{
			// Parse memory processes for new childs process or terminated processes
			if (!parseRunningProcesses( &myProcessList))
			{
				SetPriorityClass( GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
				m_csOutput.Format( "Parse running processes Error: %s", GetAnsiFromUnicode( LookupError( GetLastError())));
				freeProcessList( &myProcessList);
				closeHandles();
				return EXEC_ERROR_WAIT_COMMAND;
			}
			Sleep( EXEC_WAIT_CHECK_LATENCY);
			dwTime += EXEC_WAIT_CHECK_LATENCY;
		}
		freeProcessList( &myProcessList);
		// Now return to normal prioity
		SetPriorityClass( GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
		// Get exit code
		if (GetExitCodeProcess( m_hProcessHandle, &dwExitCode)) 
		{
			m_nExitValue = dwExitCode;
		}
		else
		{
			m_nExitValue = -1;
			m_csOutput.Format( "GetExitCode Error: %s", GetAnsiFromUnicode( LookupError( GetLastError())));
			closeHandles();
			return EXEC_ERROR_WAIT_COMMAND;
		}
		closeHandles();
		return EXEC_SUCCESSFULL;
	}
	catch (CException *pEx)
	{
		pEx->Delete();
		closeHandles();
		m_csOutput = "Unhandled exception Error";
		return EXEC_ERROR_START_COMMAND;
	}
}
开发者ID:OCSInventory-NG,项目名称:Agent-Deployment-Tool,代码行数:66,代码来源:ExecCommand.cpp


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