Example #1
0
/******************************************************************************
* GetDirectionOfTravel
*/
int GetDirectionOfTravel(CCEtoODBDoc *doc, BlockStruct *fileGeom)
{
   if (!fileGeom->getAttributesRef())
      return 0;
   
   WORD keyword = doc->IsKeyWord(ATT_DIRECTION_OF_TRAVEL, 0);

   Attrib* attrib;

   if (!fileGeom->getAttributesRef()->Lookup(keyword, attrib))
      return 0;

   CString direction = attrib->getStringValue();

   if (!direction.CompareNoCase("Up"))
      return 3;

   if (!direction.CompareNoCase("Down"))
      return 4;

   if (!direction.CompareNoCase("Left"))
      return 2;

   return 1; // default right
}
Example #2
0
void CInstallParam::SetBlasterType(LPCTSTR pstrType)
{
    CString strTemp = _T("SHOT PRO");
    if(!strTemp.CompareNoCase(pstrType))
    {
        m_nBlasterType= 0;
        return;
    }
    strTemp = _T("SGS");
    if(!strTemp.CompareNoCase(pstrType))
    {
        m_nBlasterType= 1;
        return;
    }
    strTemp = _T("BoomBox");
    if(!strTemp.CompareNoCase(pstrType))
    {
        m_nBlasterType= 2;
        return;
    }
    strTemp = _T("SHALLOW");
    if(!strTemp.CompareNoCase(pstrType))
    {
        m_nBlasterType= 3;
        return;
    }
    strTemp = _T("MACHA");
    if(!strTemp.CompareNoCase(pstrType))
    {
        m_nBlasterType= 4;
        return;
    }
    m_nBlasterType= 5;

}
Example #3
0
BOOL CVolume::ValidateLabel(const CString& strLabel)
{
	CString strTemp = strLabel;
	strTemp.Trim();

	// Check length.
	if (strTemp.IsEmpty() || strTemp.GetLength() >3) return FALSE;

	// Check label.
	strTemp.MakeUpper();
	TCHAR chLabel = strTemp.GetAt(0);
	if (chLabel < _T('A') || chLabel > _T('Z')) return FALSE;

	// Check whole string.
	switch (strTemp.GetLength())
	{
	case 1:
		return TRUE;
	case 2:
		{
			CString strCompare;
			strCompare.Format(_T("%c:"),chLabel);
			return strTemp.CompareNoCase(strCompare) ? FALSE : TRUE;
		}
	case 3:
		{
			CString strCompare;
			strCompare.Format(_T("%c:\\"),chLabel);
			return strTemp.CompareNoCase(strCompare) ? FALSE : TRUE;
		}
	default: 
		return FALSE;
	}
}
bool CFilterBlacklist::CFilterBlacklistEntry::Matches(const CLSID& clsid, const CString& filtername) const
{
    if(!IsEqualCLSID(m_clsid,CLSID_NULL))
        return IsEqualCLSID(m_clsid, clsid) != 0;

    if(filtername.IsEmpty() || m_wildcard.IsEmpty()) return false;

	int nLength = m_wildcard.GetLength();
	if (m_wildcard[nLength - 1] == _T('*')) // starts with
	{
        CString strPrefix, strName;

        if(m_wildcard[0] == _T('*'))    // contains
        {
            strPrefix = m_wildcard.Mid(1,nLength - 2);
            strPrefix.MakeLower();
            strName = filtername;
            strName.MakeLower();
            return strName.Find(strPrefix) >= 0;
        }

		strPrefix = m_wildcard.Left(nLength - 1);
		strName = filtername.Left(nLength - 1);
		return strName.CompareNoCase(strPrefix) == 0;
	}
    else if (m_wildcard[0] == _T('*'))  // ends with
    {
        CString strPrefix = m_wildcard.Right(nLength - 1);
		CString strName = filtername.Right(nLength - 1); // Praefix-Length
		return strName.CompareNoCase(strPrefix) == 0;
    }

	return filtername.CompareNoCase(m_wildcard) == 0;
}
Example #5
0
BOOL CGroupingDlg::ProcessMethod(CXMLElement*& pXML)
{
	for ( POSITION pos = pXML->GetElementIterator() ; pos ; )
	{
		CXMLElement* pSync = pXML->GetNextElement( pos );
		
		CString strValue = pSync->GetAttributeValue( _T("method") );
		
		if ( ! strValue.CompareNoCase( METHOD_INSERT ) )
		{
			ProcessInsert( pSync->GetFirstElement() );
		}
		else if ( ! strValue.CompareNoCase( METHOD_DELETE ) )
		{
			ProcessDelete( pSync->GetFirstElement() );
		}
		else if ( ! strValue.CompareNoCase( METHOD_UPDATE ) )
		{
			ProcessUpdate( pSync->GetFirstElement() );
		}
	}
	
	pXML->Delete();
	pXML	= NULL;
	
	return TRUE;
}
CString CChangeTypeAction::GetCommand(CEntity *pEntity, CString& newtype)
{
	CString selectTag = PrepareQuery(pEntity->GetEtag());
	CString kind = pEntity->GetKind();

	if(kind.CompareNoCase("field")==0) return "Impact:ChangeVariableType " + selectTag + " " + "{" + newtype + "}";
	else if(kind.CompareNoCase("funct")==0) return "Impact:ChangeFunctionType " + selectTag + " " + "{" + newtype + "}";
	else if(kind.CompareNoCase("var")==0) return "Impact:ChangeVariableType " + selectTag + " " + "{" + newtype + "}";
	return "";
}
Example #7
0
static BOOL SetupTable_1(const char*filename)
{
	if(!strLoadTable_1.CompareNoCase(filename))
	{
		return TRUE;
	}

	strLoadTable_1 = filename;
	memset(Table_1,0,sizeof(Table_1));
	FILE *fp;
	fp=fopen(filename,"r");
	if(fp)
	{
		while(!feof(fp))
		{
			int i;
			unsigned char c1,c2;
			fscanf(fp,"%04X=%c%c",&i,&c1,&c2);
			if(i<256*256)
			{
				Table_1[i/256][i%256] = c1<<8 | c2;
			}
		}	
		fclose(fp);
		return TRUE;
	}
	return FALSE;
}
Example #8
0
BOOL FileMisc::IsSameFile(const CString& sFilePath1, const CString& sFilePath2)
{
	CString sFullPath1 = GetFullPath(sFilePath1);
	CString sFullPath2 = GetFullPath(sFilePath2);

	return (sFilePath1.CompareNoCase(sFullPath2) == 0);
}
Example #9
0
void CDataEntryDlg::OnShow()
{
	CActionParser parser(m_pExpert->m_strActionScript);
	
	CString strRight;
	if (parser.HasAssignment(_T("DataEntry.var"), strRight))
	{
		if (strRight[0] == _T('"') && strRight[strRight.GetLength() - 1] == _T('"'))
			strRight = strRight.Mid(1, strRight.GetLength() - 2);

		SetDlgItemText(IDC_EXPRESSION, strRight);
	}

	if (parser.HasAssignment(_T("DataEntry.mode"), strRight))
	{
		for (int i = 0; i < 4; i++)
		{
			if (strRight.CompareNoCase(_gszModeString[i]) == 0)
			{
				ActiveEntryModePage(i);
				m_nMode = i;
				DoDataExchange();
				return;
			}
		}
	}

	ActiveEntryModePage(m_nMode);
}
Example #10
0
LRESULT CDlgQuery::OnSelectRecord(WPARAM wp, LPARAM lp)
{
	NET_TIME * ti = (NET_TIME*)lp;
	if (ti!=NULL)
	{
		CString strTimeStart;
		strTimeStart.Format("%04d-%02d-%02d %02d:%02d:%02d", 
			ti->dwYear, ti->dwMonth, ti->dwDay, ti->dwHour, ti->dwMinute, ti->dwSecond);

		m_listResult.SetFocus();
		int nCount = m_listResult.GetItemCount();
		for (int i = 0; i < nCount; ++i)
		{
			CString str = m_listResult.GetItemText(i, 2);
			if (str.CompareNoCase(strTimeStart) == 0)
			{
				m_listResult.EnsureVisible(i,FALSE);
				m_listResult.SetItemState(i,LVNI_SELECTED|LVIS_ACTIVATING,LVNI_SELECTED|LVIS_ACTIVATING);
			}
			else
			{
				m_listResult.SetItemState(i,0,LVNI_SELECTED|LVIS_ACTIVATING);
			}
		}
	}
	return S_OK;
};
Example #11
0
BOOL CAutoUpdate::getMD5(CString filepath, CString hashKey)
{
	CFile file;
	if( !file.Open(filepath,CFile::modeRead) )
	{
		return TRUE;
	}
	int nLen = file.GetLength();
	char *buf = NULL;
	buf = new char[nLen+1];
	memset(buf,0,nLen+1);
	file.Read(buf,nLen);
	file.Close();

	CStringA filePathMB = CMyUtility::GetCStringA(filepath);
	CStringA strHash = MD5Hash(filePathMB);
	
//	CMD5 md5;
//	md5.setPlainText(buf);
	delete [] buf;
	CString newHash;

	newHash = CMyUtility::GetCStringW(strHash);

//	newHash.Format(_T("%s"), md5.getMD5Digest());
	return (0 != newHash.CompareNoCase(hashKey));
}
Example #12
0
void RenOutFile::OnChangeRenFileName() 
{

	CString nfn;

	m_FileName.GetWindowText(nfn);

	if (FExist(*pathPointer + nfn))
	{
		m_OWrite.Enable();
		m_Rename.Disable();
		SetDefID(m_OWrite.GetDlgCtrlID());
	}
	else
	{
		m_OWrite.Disable();
		m_Rename.Enable();
		SetDefID(m_Rename.GetDlgCtrlID());
	}

	if (nfn.CompareNoCase(origValue) == 0)
		c_ResetButton.Disable();
	else
		c_ResetButton.Enable();
	
}
Example #13
0
void InformApp::FindExtensions(void)
{
  m_extensions.clear();
  for (int i = 0; i < 2; i++)
  {
    CString path;
    switch (i)
    {
    case 0:
      path.Format("%s\\Internal\\Extensions\\*.*",(LPCSTR)GetAppDir());
      break;
    case 1:
      path.Format("%s\\Inform\\Extensions\\*.*",(LPCSTR)GetHomeDir());
      break;
    default:
      ASSERT(FALSE);
      break;
    }

    CFileFind find;
    BOOL finding = find.FindFile(path);
    while (finding)
    {
      finding = find.FindNextFile();
      if (!find.IsDots() && find.IsDirectory())
      {
        CString author = find.GetFileName();
        if (author == "Reserved")
          continue;
        if ((author.GetLength() > 0) && (author.GetAt(0) == '.'))
          continue;

        path.Format("%s\\*.*",(LPCSTR)find.GetFilePath());
        CFileFind find;
        BOOL finding = find.FindFile(path);
        while (finding)
        {
          finding = find.FindNextFile();
          if (!find.IsDirectory())
          {
            CString ext = ::PathFindExtension(find.GetFilePath());
            if (ext.CompareNoCase(".i7x") == 0)
              m_extensions.push_back(ExtLocation(author,find.GetFileTitle(),(i == 0),find.GetFilePath()));
            else if (ext.IsEmpty() && (i == 1))
            {
              // Rename an old-style extension (with no file extension) to end with ".i7x"
              CString newPath = find.GetFilePath();
              newPath.Append(".i7x");
              if (::MoveFile(find.GetFilePath(),newPath))
                m_extensions.push_back(ExtLocation(author,find.GetFileTitle(),(i == 0),newPath));
            }
          }
        }
        find.Close();
      }
    }
    find.Close();
  }
  std::sort(m_extensions.begin(),m_extensions.end());
}
Example #14
0
void CXMLElement::AddRecursiveWords(CString& strWords) const
{
	for ( POSITION pos = GetAttributeIterator() ; pos ; )
	{
		CXMLAttribute* pAttribute = GetNextAttribute( pos );
		CString strText = pAttribute->GetName();

		if ( strText.Find( ':' ) >= 0 ) continue;
		if ( strText.CompareNoCase( _T("SHA1") ) == 0 ) continue;	// NOTE: PeerProject/Shareaza Specific

		if ( ! strWords.IsEmpty() ) strWords += ' ';
		strWords += pAttribute->GetValue();
	}

	for ( POSITION pos = GetElementIterator() ; pos ; )
	{
		GetNextElement( pos )->AddRecursiveWords( strWords );
	}

	if ( ! m_sValue.IsEmpty() )
	{
		if ( ! strWords.IsEmpty() )
			strWords += ' ';
		strWords += m_sValue;
	}
}
Example #15
0
void CuDlgReplicationServerPageStartupSetting::OnButtonRestoreAll()
{
	CString strMessage;
	int i,answ, nCount = m_cListCtrl.GetItemCount();
	if (nCount == 0)
		return;
	m_cListCtrl.HideProperty(TRUE);
	answ = AfxMessageBox(IDS_A_RESTORE_ALL , MB_ICONEXCLAMATION | MB_YESNO );
	if ( answ == IDYES ) {
		for (i=0; i<nCount; i++)
		{
			CaReplicationItem* pItem = (CaReplicationItem*)m_cListCtrl.GetItemData(i);
			if ( pItem != NULL)
			{
				BOOL bNotUsed;
				pItem->SetToDefault();
				pItem->SetValueModifyByUser(TRUE);
				if (pItem->GetType() == CaReplicationItem::REP_BOOLEAN)
				{
					CString strValue = pItem->GetFlagContent(bNotUsed);
					if (strValue.CompareNoCase (_T("TRUE")) == 0)
						m_cListCtrl.SetCheck (i, 1, TRUE);
					else
						m_cListCtrl.SetCheck (i, 1, FALSE);
				}
				else
					m_cListCtrl.SetItemText (i, 1, pItem->GetFlagContent(bNotUsed));
			}
		}
	}
	EnableButtons();
}
Example #16
0
void CuDlgReplicationServerPageStartupSetting::OnButtonRestore()
{
	UINT nState = 0;
	CString strMessage;
	int answ, nCount = m_cListCtrl.GetItemCount(),iIndex = -1;

	m_cListCtrl.HideProperty(TRUE);
	iIndex = m_cListCtrl.GetNextItem (-1, LVNI_SELECTED);

	if (iIndex == -1)
		return;
	CaReplicationItem* pItem = (CaReplicationItem*)m_cListCtrl.GetItemData(iIndex);
	if (!pItem)
		return;
	//"Do you want to restore '%s' "
	//"to its default setting ?"
	strMessage.Format(IDS_F_RESTORE_DEFAULT,(LPCTSTR)pItem->GetDescription());
	answ = AfxMessageBox(strMessage , MB_ICONEXCLAMATION | MB_YESNO);
	if ( answ == IDYES ){
		BOOL bNotUsed;
		pItem->SetToDefault();
		pItem->SetValueModifyByUser(TRUE);
		if (pItem->GetType() == CaReplicationItem::REP_BOOLEAN)
		{
			CString strValue = pItem->GetFlagContent(bNotUsed);
			if (strValue.CompareNoCase (_T("TRUE")) == 0)
				m_cListCtrl.SetCheck (iIndex, 1, TRUE);
			else
				m_cListCtrl.SetCheck (iIndex, 1, FALSE);
		}
		else
			m_cListCtrl.SetItemText (iIndex, 1, pItem->GetFlagContent(bNotUsed));
	}
	EnableButtons();
}
// Get a attribute value from an attribute name
bool CNetList::get_attr( int file_name_index, int sheet, CNetListSymbol &symbol, CString attr, CString &r )
{
	CDrawMethod* pMethod = symbol.m_pMethod;
	if (attr.CompareNoCase( _T("refnum") ) == 0)
	{
		// Use the reference number (minus the reference character)
		CString s = pMethod->GetRefSheet(m_prefix_references,m_prefix_import,file_name_index,sheet+1);
		int b = s.FindOneOf(_T("0123456789"));
		if (b != 1)
		{
			r = s;
			return true;
		}
		else
		{
			r = s.Mid(b);
			return true;
		}
	}
	else
	{
		for (int j = 0; j < pMethod->GetFieldCount(); j++)
		{
			if (pMethod->GetFieldName(j).CompareNoCase(attr) == 0)
			{
				r = pMethod->GetField(j);
				return true;
			}
		}
	}

	return false;
}
void CRichEditCtrlGS::SetRTF(const CByteArray& arrRTF)
{ SCookieByteArray CookieRTF;
  CookieRTF.lSize    = arrRTF.GetSize();
  CookieRTF.lStart   = 0;
  CookieRTF.pInText  = &arrRTF;
  CookieRTF.pOutText = NULL;
  
  CString strRTF = _T("");
  if( arrRTF.GetSize() > 5 )
    { strRTF  = TCHAR(arrRTF[0]);
      strRTF += TCHAR(arrRTF[1]);
  	  strRTF += TCHAR(arrRTF[2]);
	  strRTF += TCHAR(arrRTF[3]);
	  strRTF += TCHAR(arrRTF[4]);
	}

// Read the text in
  EDITSTREAM es;
  es.dwError = 0;
  es.pfnCallback = StreamInCByteArray; // Set the callback
  es.dwCookie = (DWORD)&CookieRTF;     // and the informations
  if( strRTF.CompareNoCase(_T("{\\rtf")) == 0 )
    { StreamIn(SF_RTF,es);
	}
  else
    { StreamIn(SF_TEXT,es);
	}
}
Example #19
0
BOOL CChatWnd::OnLocalText(const CString& sText)
{
    // Save history
    m_pHistory.Add( sText );
    if ( m_pHistory.GetSize() > EDIT_HISTORY ) m_pHistory.RemoveAt( 0 );
    m_nHistory = static_cast< int >( m_pHistory.GetSize() );

    if ( sText.GetAt( 0 ) == _T('/') )
    {
        CString strCommand = sText.SpanExcluding( _T(" \t") ).Trim();
        if ( strCommand.CompareNoCase( _T("/me") ) == 0 )
        {
            // Action text
            return OnLocalMessage( true, sText.Mid( 4 ) );
        }
        else if ( OnLocalCommand( strCommand, sText.Mid( strCommand.GetLength() + 1 ).Trim() ) )
        {
            // Handled command
            return TRUE;
        }
    }
    else if ( sText.GetAt( 0 ) == _T('*') &&
              ( sText.GetAt( 1 ) == _T(' ') || sText.GetAt( 1 ) == _T('\t') ) )
    {
        // Action text
        return OnLocalMessage( true, sText.Mid( 2 ) );
    }

    // Regular text
    return OnLocalMessage( false, sText );
}
Example #20
0
BOOL CAutoUpdate::CheckStatus(CString &latestVer)	//check whether current verson expired and get latest version.
{
	CString strUpdateVersion;
	GetUpdateVersion(strUpdateVersion);
	AddLog(_T("Version:")+strUpdateVersion);

	CString xmlin, xmlout;
	xmlin = _T("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>   <viewbarReq viewbarId=\"") + strUpdateVersion + _T("\" />");
	CXAutoUPdate xauUpdate;
	xauUpdate.fetchRequest(_T(CHECKSERVICE), xmlin, xmlout); //CHECKSERVICE,

	/* 
	*  <?xml version="1.0" encoding="UTF-8" ?> 
	*  <latestViewbar result="7836485" latestViewbarId="w98.1.1.0.1" forceUpdate="false" /> 
	*/

	CXmlDocumentWrapper docXml;
	docXml.LoadXML(xmlout);

	CXmlNodeWrapper node;
	node = docXml.AsNode();

	CString result = node.GetValue(_T("result"));
	latestVer = node.GetValue(_T("latestViewbarId"));
	CString forceUpdate = node.GetValue(_T("forceUpdate"));

	if (result != _VB_SUCCESS)
		return FALSE;
	if ( (forceUpdate.CompareNoCase(_T("false"))==0) && strUpdateVersion==latestVer)
		return FALSE;
	return TRUE;
}
CConfigurationDBI *CProjectDBI::LookupConfigurationByAddress (const CString &strAddress)
{
    HRESULT hr;
    int iIndex;
    CString str = strAddress;

    hr = Load ();
    if (FAILED (hr))
    {
        throw hr;
    };

    //it is possible that the address passed here contains {} encapsulation.
    str.TrimLeft();
    str.TrimRight();
    str.TrimLeft(_T('{'));
    str.TrimRight(_T('}'));

    for (iIndex = 0; iIndex < m_Configurations.GetSize (); ++iIndex)
    {
        CConfigurationDBI *pConfigurationDBI;

        pConfigurationDBI = m_Configurations[iIndex];
        ASSERT (pConfigurationDBI != NULL);
        if (pConfigurationDBI == NULL)
            continue;

        if (str.CompareNoCase (pConfigurationDBI->GetMachineAddress ()) == 0)
        {
            return (pConfigurationDBI);
        };
    };

    return (NULL);
}
Example #22
0
void CAirportsManager::GetAirportCoordinates(const CString strAirport, CLatitude& tlat, CLongitude& tlong )
{
	int iAirportIndex = FindOrAddEntry(strAirport);

	CString strCorrd;
	if(iAirportIndex >= 0 )
	{
		CAirport * pAirport =  GetAirportList()->at(iAirportIndex);
		ASSERT(pAirport);
		if(pAirport)
			strCorrd = pAirport->m_sARPCoordinates;
	}
	//get lat long form str;
	if( strCorrd.CompareNoCase("") !=0 )
	{
		CString strLongitude;
		CString strLatitude;
		int nIndex = strCorrd.Find("-");
		strLongitude = strCorrd.Left(nIndex);
		tlong.SetValue(strLongitude);
		strLatitude  = strCorrd.Right(strCorrd.GetLength() - nIndex-1);
		tlat.SetValue(strLatitude);
	}

}
void CKrb4RealmHostMaintenance::OnButtonRealmHostEdit()
{
	INT selItemIndex = m_RealmHostList.GetCurSel();
	LPSTR pSelItem = new char[m_RealmHostList.GetTextLen(selItemIndex) + 1];
	if (!pSelItem)
	  ASSERT(0);

	CString selItem;
	m_RealmHostList.GetText(selItemIndex, selItem);
	strcpy(pSelItem, selItem);

	CKrb4EditRealmHostList editRealmHostList(pSelItem);
	delete [] pSelItem;

	if (IDOK == editRealmHostList.DoModal())
	{
		CString editedItem = editRealmHostList.GetEditedItem();
		if (0 != selItem.CompareNoCase(editedItem) &&
			LB_ERR != m_RealmHostList.FindStringExact(-1, editedItem))
		{
			LeashErrorBox("OnButtonRealmHostEdit::Found a Duplicate!\nCan't add to List",
							  editedItem);

			return;
		}

		m_RealmHostList.DeleteString(selItemIndex);
		m_RealmHostList.InsertString(selItemIndex, editRealmHostList.GetEditedItem());
		m_RealmHostList.SetCurSel(selItemIndex);
		SetModified(TRUE);

		ResetDefaultRealmComboBox();
	}
}
Example #24
0
BOOL CUpdateDBThread::TableExists(LPCTSTR lpszTableName)
{
	BOOL bRet = FALSE; 

	CADORecordset Rs(m_pDbConnInfo->GetConn());

	//CString strSQL;

	//strSQL.Format(_T("select TABLE_NAME from `INFORMATION_SCHEMA`.`TABLES` where `TABLE_NAME`='%s'"), lpszTableName);

	if (Rs.Open(_T("SHOW TABLES FROM NETBAR")))
	{
		while (!Rs.IsEOF())
		{
			CString strTmp;

			if (Rs.GetFieldValue(0, strTmp))
			{
				if (0 == strTmp.CompareNoCase(lpszTableName))
				{
					bRet = TRUE;

					break;
				}
			}

			Rs.MoveNext();
		}

		Rs.Close();
	}

	return bRet;
}
Example #25
0
	static BOOL ScanDllInProcess(DWORD dwPID, CString strDllName)
	{
		BOOL bRet = FALSE;
		MODULEENTRY32 pe32;
		// 在使用这个结构之前,先设置它的大小
		pe32.dwSize = sizeof(pe32); 
		// 给进程内所有模块拍一个快照
		//276为某进程的ID
		HANDLE hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwPID);
		if(hProcessSnap == INVALID_HANDLE_VALUE)
		{       
			//建立快照失败
			return bRet;  
		}

		// 遍历进程快照,轮流显示每个进程的信息
		BOOL bMore = Module32First(hProcessSnap, &pe32);
		while(bMore)
		{       
			// 			printf("\n[DLL NAME]\t%s\n",pe32.szModule);
			// 			printf("[DLL PATH]\t%s\n",pe32.szExePath);
			if ( strDllName.CompareNoCase(pe32.szModule) == 0)
			{
				bRet = TRUE;
				break;
			}

			bMore = Module32Next(hProcessSnap, &pe32);
		}
		// 不要忘记清除掉snapshot对象
		CloseHandle(hProcessSnap);

		return bRet;
	}