private SimpleOutputHandler2(DebugUtilities executionUtilities, DebugUtilities passthroughUtilities, OUTPUT_FILTER outputFilter, bool wantsDml, bool passThrough, bool passThroughOnly) { ExecutionUtilities = executionUtilities; PassthroughUtilities = passthroughUtilities; Installed = false; PreviousCallbacks = IntPtr.Zero; if (passThroughOnly == false) { DataBuffer = new DbgStringBuilder(executionUtilities, 1024); } passthroughUtilities.OutputMaskSave(); passthroughUtilities.OutputMaskDisableAll(); //LineBuffer = new DbgStringBuilder(executionUtilities, 1024); OutputFilter = outputFilter; PassThrough = passThrough; PassThroughOnly = passThroughOnly; InterestMask = wantsDml ? DEBUG_OUTCBI.DML : DEBUG_OUTCBI.TEXT; executionUtilities.DebugClient.GetOutputCallbacks(out PreviousCallbacks); /* We will need to release this */ ThisIDebugOutputCallbacksPtr = Marshal.GetComInterfaceForObject(this, typeof(IDebugOutputCallbacks2)); InstallationHRESULT = executionUtilities.DebugClient.SetOutputCallbacks(ThisIDebugOutputCallbacksPtr); if (SUCCEEDED(InstallationHRESULT)) { Installed = true; InstalledThreadId = Thread.CurrentThread.ManagedThreadId; BufferedOutput = new List <BufferLine>(1024); } else { Dispose(); } }
private AdvancedOutputHandler(DebugUtilities executionUtilities, DebugUtilities passthroughUtilities, OUTPUT_FILTER outputFilter, bool wantsDml) { if (_installed == true) { Revert(); throw new Exception("Can not install an Output Handler more than once."); } _executionUtilities = executionUtilities; _passthroughUtilities = passthroughUtilities; _previousCallbacks = IntPtr.Zero; passthroughUtilities.OutputMaskSave(); passthroughUtilities.OutputMaskDisableAll(); passthroughUtilities.DebugClient.FlushCallbacks(); executionUtilities.DebugClient.FlushCallbacks(); _outputFilter = outputFilter; _interestMask = wantsDml ? DEBUG_OUTCBI.DML : DEBUG_OUTCBI.TEXT; executionUtilities.DebugClient.GetOutputCallbacks(out _previousCallbacks); /* We will need to release this */ _thisIDebugOutputCallbacksPtr = Marshal.GetComInterfaceForObject(this, typeof(IDebugOutputCallbacks2)); _installationHresult = executionUtilities.DebugClient.SetOutputCallbacks(_thisIDebugOutputCallbacksPtr); if (SUCCEEDED(_installationHresult)) { _installed = true; _installedThreadId = Thread.CurrentThread.ManagedThreadId; _bufferedOutput = new List <CallbackData>(128); } else { Dispose(); } }
int IDebugOutputCallbacks2.GetInterestMask(out DEBUG_OUTCBI Mask) { return(GetInterestMask(out Mask)); }
/// <summary> /// Implements IDebugOutputCallbacks2::GetInterestMask /// </summary> public int GetInterestMask(out DEBUG_OUTCBI Mask) { Mask = InterestMask; return(S_OK); }
public int GetInterestMask(out DEBUG_OUTCBI Mask) { Mask = DEBUG_OUTCBI.ANY_FORMAT; return(HResult.Ok); }
public int GetInterestMask(out DEBUG_OUTCBI Mask) { Mask = DEBUG_OUTCBI.TEXT; return(0); }
int IDebugOutputCallbacks2.GetInterestMask(out DEBUG_OUTCBI Mask) { return GetInterestMask(out Mask); }
/// <summary> /// Implements IDebugOutputCallbacks2::GetInterestMask /// </summary> public int GetInterestMask(out DEBUG_OUTCBI Mask) { Mask = InterestMask; return S_OK; }