Example #1
0
void CuDlgIpmDetailLockList::InitClassMembers (BOOL bUndefined, LPCTSTR lpszNA)
{
	if (bUndefined)
	{
		m_strSession = lpszNA;
		m_strStatus = lpszNA;
		m_strTransID = lpszNA;
		m_strTotal = lpszNA;
		m_strLogical = lpszNA;
		m_strMaxLogical = lpszNA;
		m_strRelatedLockListID = lpszNA;
		m_strCurrent = lpszNA;
		m_strWaitingResourceListID = lpszNA;
	}
	else
	{
		TCHAR tchszBuffer [34];

		m_strSession = FormatHexa64 (m_llStruct.locklistdatamin.locklist_session_id, tchszBuffer);
		m_strStatus = m_llStruct.locklistdatamin.locklist_status;
		m_strTransID = m_llStruct.locklistdatamin.locklist_transaction_id;
		m_strTotal.Format (_T("%ld"), m_llStruct.locklistdatamin.locklist_lock_count);
		m_strLogical.Format(_T("%ld"), m_llStruct.locklistdatamin.locklist_logical_count);
		m_strMaxLogical.Format(_T("%ld"), m_llStruct.locklistdatamin.locklist_max_locks);
		m_strRelatedLockListID = FormatHexaL (m_llStruct.locklist_related_llb_id_id, tchszBuffer);
		m_strCurrent.Format (_T("%ld"), m_llStruct.locklist_related_count);  
		m_strWaitingResourceListID = m_llStruct.WaitingResource;
	}
}
Example #2
0
static void GetDisplayInfo (
	LPLOCKLISTDATAMIN pData,
	CString& strID,
	CString& strSession,
	CString& strCount,
	CString& strLogical,
	CString& strMaxL,
	CString& strStatus)
{
	TCHAR tchszBuffer[32];

	strID = FormatHexaL (pData->locklist_id, tchszBuffer); 
	strSession = FormatHexa64 (pData->locklist_session_id, tchszBuffer);
	strCount.Format(_T("%d"), pData->locklist_lock_count);
	strLogical.Format(_T("%d"), pData->locklist_logical_count);
	strMaxL.Format(_T("%d"), pData->locklist_max_locks);
	strStatus = pData->locklist_status;
}
Example #3
0
void CuDlgIpmIceDetailHttpServerConnection::InitClassMembers (BOOL bUndefined, LPCTSTR lpszNA)
{
	if (bUndefined)
	{
		m_strRealUser = lpszNA;
		m_strID = lpszNA;
		m_strState = lpszNA;
		m_strWaitReason = lpszNA;
	}
	else
	{
		TCHAR tchszBuffer[32];
		m_strRealUser    = m_Struct.real_user;
		m_strID = (LPCTSTR)FormatHexa64 (m_Struct.session_id, tchszBuffer);
		m_strState   = (LPCTSTR)m_Struct.session_state;
		m_strWaitReason = (LPCTSTR)m_Struct.session_wait_reason;
	}
}
Example #4
0
static BOOL MatchedStruct (int nObjectType, LPCTSTR lpItem, void* lpStruct)
{
	ASSERT (lpStruct);
	if (!lpStruct)
		return FALSE;
	switch (nObjectType)
	{
	case OT_MON_SERVER:
		{
			LPSERVERDATAMIN lpsvrdata = (LPSERVERDATAMIN)lpStruct;
			if (_tcsicmp (lpItem, lpsvrdata->listen_address) == 0)
				return TRUE;
		}
		break;

	case OT_MON_SESSION:
		{
			LPSESSIONDATAMIN lpsessiondata = (LPSESSIONDATAMIN)lpStruct;
			//DWORD dwObjVal = 0;
			//_stscanf(lpItem, _T("%lx"), &dwObjVal);
			//DWORD dwSessVal = 0;
			//_stscanf((LPCTSTR)lpsessiondata->session_id, _T("%lu"), &dwSessVal);
			//ASSERT (dwObjVal);
			//ASSERT (dwSessVal);
			//if (dwObjVal == dwSessVal)
			//	return TRUE;
			TCHAR tchszCh[32];
			FormatHexa64 (lpsessiondata->session_id, tchszCh);
			if (_tcsicmp(lpItem, tchszCh) == 0)
				return TRUE;
		}
		break;
	case OT_DATABASE:
		{
			LPRESOURCEDATAMIN lpData = (LPRESOURCEDATAMIN)lpStruct;
			if (_tcsicmp (lpItem, lpData->res_database_name) == 0)
				return TRUE;
			return FALSE;
		}
		break;

	case OT_MON_REPLIC_SERVER:
		{
			LPREPLICSERVERDATAMIN lpSvr = (LPREPLICSERVERDATAMIN)lpStruct;
			int nInputSvrNo = 0;
			_stscanf(lpItem, _T("%d"), &nInputSvrNo);
			if (lpSvr->serverno == nInputSvrNo)
				return TRUE;
		}
		break;

	case OT_MON_LOGINFO:
		return TRUE;
		break;

	default:
		//
		// Not implemented
		ASSERT(FALSE);
		break;
	}

	return FALSE;
}