Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

63 lines
1.3 KiB

//----------------------------------------------------------------------------
//
// Output capturing support.
//
// Copyright (C) Microsoft Corporation, 2001.
//
//----------------------------------------------------------------------------
#ifndef __OUTCAP_HPP__
#define __OUTCAP_HPP__
//
// Output callback implementation which feeds into the
// output capture buffer.
//
class CaptureOutputCallbacks : public IDebugOutputCallbacks
{
public:
CaptureOutputCallbacks(void);
// IUnknown.
STDMETHOD(QueryInterface)(
THIS_
IN REFIID InterfaceId,
OUT PVOID* Interface
);
STDMETHOD_(ULONG, AddRef)(
THIS
);
STDMETHOD_(ULONG, Release)(
THIS
);
// IDebugOutputCallbacks.
STDMETHOD(Output)(
THIS_
IN ULONG Mask,
IN PCSTR Text
);
void Reset(void)
{
m_Insert = m_TextBuffer;
if (m_Insert)
{
*m_Insert = 0;
}
}
PSTR GetCapturedText(void)
{
return m_TextBuffer;
}
protected:
PSTR m_TextBuffer;
ULONG m_TextBufferSize;
PSTR m_Insert;
};
extern CaptureOutputCallbacks g_OutCapCb;
HRESULT CaptureCommandOutput(PSTR Command);
#endif // #ifndef __OUTCAP_HPP__