newntui/discovermdi/src/disgraphnode.cpp
//-----------------------------------------------------------------------------------
// This method evaluates the string passed as "cmd" parameter on the 
// server and returns evaluation results as a string. Will do nothing
// if no data source assigned to the graph.
//-----------------------------------------------------------------------------------
This method evaluates the string passed as "cmd" parameter on the
server and returns evaluation results as a string. Will do nothing
if no data source assigned to the graph.
This method evaluates the string passed as " cmd " parameter on the server and returns evaluation results as a string . Will do nothing if no data source assigned to the graph .
CString CDisGraph::Evaluate(CString& cmd) {
BSTR sysStr;
CString results;
static BOOL bCommDlgShown = FALSE;
	sysStr=cmd.AllocSysString();
	results=m_DataSource->AccessSync(&sysStr);
    ::SysFreeString(sysStr);
	if (m_DataSource->IsConnectionLost() == TRUE &&
		bCommDlgShown != TRUE ) {
	  ::MessageBox(m_hWnd, 
			   _T("Connection with server is lost."
			   " Make sure the server is running."),
			   _T("Server Communication Error."), 
			   MB_OK | MB_ICONINFORMATION);
		bCommDlgShown = TRUE;
	} else if (m_DataSource->IsConnectionLost() != TRUE) {
		bCommDlgShown = FALSE;
	}	
	return results;
}
CString CDisGraph :: Evaluate ( CString & cmd ) { BSTR sysStr ; CString results ; static BOOL bCommDlgShown = FALSE ; sysStr = cmd . AllocSysString ( ) ; results = m_DataSource -> AccessSync ( & sysStr ) ; :: SysFreeString ( sysStr ) ; if ( m_DataSource -> IsConnectionLost ( ) == TRUE && bCommDlgShown != TRUE ) { :: MessageBox ( m_hWnd , _T ( " " " " ) , _T ( " " ) , MB_OK | MB_ICONINFORMATION ) ; bCommDlgShown = TRUE ; } else if ( m_DataSource -> IsConnectionLost ( ) != TRUE ) { bCommDlgShown = FALSE ; } return results ; }
This method evaluates the string passed as "cmd" parameter on the
server and returns evaluation results as a string.
This method evaluates the string passed as " cmd " parameter on the server and returns evaluation results as a string .