Example #1
0
HRESULT CRunErr::OnDemandRuntimeError(ebWORD wLinNr)
{
// testen, ob im richtigen Kontext verwendet
	ASSERT (!m_fRunModal);

// evtl. Debuggerfenster erzeugen
	m_fRTError = true;

	if (NULL == m_pScriptDebugger) {
	HRESULT hr = CreateDebugger();

		if (FAILED(hr)) 
			return hr;
		ASSERT(NULL != m_pScriptDebugger);
	}

	ebDebugger_SelectLines(GetDebuggerWnd(), wLinNr-2, wLinNr-1, true);

// jetzt, wo alles fertig ist, anzeigen
	m_pScriptDebugger -> EditOnly();	// UI richten, kein GO etc. möglich
	m_pScriptDebugger -> ShowWindow (SW_SHOWNORMAL);
	m_pScriptDebugger -> UpdateWindow();

return NOERROR;
}
Example #2
0
HRESULT CRunBreakPoint::OnDemandBreakpoint(CebScript *pScript, CebThread *pThread, IObjectManagement *pIOM, IStreamInfo *pISI)
{
	ASSERT(NULL != pScript);
	ASSERT(NULL != pThread);
	if (pScript == NULL || pThread == NULL) return E_POINTER;
	ASSERT(NULL != pThread->GetHandle());
	ASSERT(NULL != pScript->GetHandle());
	if (NULL == pScript->GetHandle() || NULL == pThread->GetHandle()) return E_HANDLE;

	HRESULT hr = NOERROR;
	try
	{// evtl. Debuggerfenster erzeugen
		hr = CreateDebugger(WM_CLOSEBREAKPOINTDEBUGGERDIALOG, false, 0, pIOM, pISI);
		if (FAILED(hr)) _com_issue_error(hr);
		// Fertzigen Script und Thread unterschieben
		if (!ebDebugger_SetScript(GetDebuggerWnd(), pScript->GetHandle())) _com_issue_error(E_FAIL);
		if (!ebDebugger_SetThread(GetDebuggerWnd(), pThread->GetHandle())) _com_issue_error(E_FAIL);
		// jetzt Debugger anzeigen 
		hr = m_pScriptDebugger -> RunModal();	
		if (FAILED(hr)) _com_issue_error(hr);
	}
	catch(_com_error& e)
	{
		if (m_pScriptDebugger) 
			m_pScriptDebugger -> DestroyWindow(); 
		m_pScriptDebugger = NULL;
		return _COM_ERROR(e);
	}
	return S_OK;
}
Example #3
0
HRESULT CRunErr::OnDemandBreakpoint(CebScript *pScript, CebThread *pThread)
{
	ASSERT(NULL != pScript);
	ASSERT(NULL != pThread);
	if (pScript == NULL || pThread == NULL) 
		return E_POINTER;
	ASSERT(NULL != pThread->GetHandle());
	ASSERT(NULL != pScript->GetHandle());
	if (NULL == pScript->GetHandle() || NULL == pThread->GetHandle()) 
		return E_HANDLE;

// testen, ob im richtigen Kontext verwendet
	ASSERT(!m_fRTError);

	m_fRunModal = true;

// evtl. Debuggerfenster erzeugen
	if (NULL == m_pScriptDebugger) {
	HRESULT hr = CreateDebugger();

		if (FAILED(hr)) 
			return hr;
		ASSERT(NULL != m_pScriptDebugger);
	}

	if (!ebDebugger_SetScript(GetDebuggerWnd(), pScript->GetHandle())) return E_FAIL;
	if (!ebDebugger_SetThread(GetDebuggerWnd(), pThread->GetHandle())) return E_FAIL;

// jetzt Debugger anzeigen 
HRESULT hr = m_pScriptDebugger -> RunModal();	
	if (E_ABORT == hr || E_UNEXPECTED == hr)
		// Debugger wurde geschlossen
		m_fRunModal = false;

return hr;
}