Files
qt-creator/src/plugins/debugger/cdb/cdbdebugoutput.cpp

58 lines
1.1 KiB
C++
Raw Normal View History

2009-02-09 11:35:43 +01:00
#include <windows.h>
2009-02-20 14:56:36 +01:00
#include <inc/dbgeng.h>
2009-02-09 11:35:43 +01:00
2009-02-09 13:07:38 +01:00
#include "cdbdebugoutput.h"
#include "cdbdebugengine.h"
2009-02-09 11:35:43 +01:00
namespace Debugger {
namespace Internal {
2009-02-20 14:56:36 +01:00
STDMETHODIMP CdbDebugOutput::QueryInterface(
2009-02-09 11:35:43 +01:00
THIS_
IN REFIID InterfaceId,
OUT PVOID* Interface
)
{
*Interface = NULL;
if (IsEqualIID(InterfaceId, __uuidof(IUnknown)) ||
IsEqualIID(InterfaceId, __uuidof(IDebugOutputCallbacks)))
{
*Interface = (IDebugOutputCallbacks *)this;
AddRef();
return S_OK;
}
else
{
return E_NOINTERFACE;
}
}
2009-02-20 14:56:36 +01:00
STDMETHODIMP_(ULONG) CdbDebugOutput::AddRef(THIS)
2009-02-09 11:35:43 +01:00
{
// This class is designed to be static so
// there's no true refcount.
return 1;
}
2009-02-20 14:56:36 +01:00
STDMETHODIMP_(ULONG) CdbDebugOutput::Release(THIS)
2009-02-09 11:35:43 +01:00
{
// This class is designed to be static so
// there's no true refcount.
return 0;
}
2009-02-20 14:56:36 +01:00
STDMETHODIMP CdbDebugOutput::Output(
2009-02-09 11:35:43 +01:00
THIS_
IN ULONG mask,
IN PCSTR text
)
{
UNREFERENCED_PARAMETER(mask);
m_pEngine->handleDebugOutput(text);
return S_OK;
}
} // namespace Internal
} // namespace Debugger