Why does NativeWindow.DebuggableCallback() get called from Debug.WriteLine()?

C

caa

Hi there, people!

I m working on a c# control. Using VS2003 and writing for .NET 1.1. I
wrote an app that automaticly opens and closes (after a random Sleep)
forms that own one instance of my control each. While running my
application I'm seeing strange stacks like this:

system.windows.forms.dll!
ControlNativeWindow.WndProc(System.Windows.Forms.Message m =
{System.Windows.Forms.Message}) + 0xda bytes
system.windows.forms.dll!
System.Windows.Forms.NativeWindow.DebuggableCallback(int hWnd =
4196340, int msg = 16, int wparam = 0, int lparam = 0) + 0x39 bytes
system.dll!System.Diagnostics.TraceInternal.WriteLine(string message =
"blablabla") + 0x4d bytes
system.dll!System.Diagnostics.Debug.WriteLine(string message =
"blablabla") + 0xf bytes

As you see I'm sending a string to the VS output window. BUT! Before
exitting from "Debug.WriteLine" the program decides to go and process
another message. Just how can processing of WM_CLOSE be a part of
Debug.WriteLine?

I looked in Reflector and if the only Listener in Debug.Listeneres
collection is DefaultListener then there is no code in
Debug.WriteLine, except for a call to OutputDebugString.

I hope this some well known feature of WinForms/Win API that I am not
aware of. Please give me a few URLs where I could read about this
stuff.
Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top