470,594 Members | 1,120 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,594 developers. It's quick & easy.

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

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.M essage m =
{System.Windows.Forms.Message}) + 0xda bytes
system.windows.forms.dll!
System.Windows.Forms.NativeWindow.DebuggableCallba ck(int hWnd =
4196340, int msg = 16, int wparam = 0, int lparam = 0) + 0x39 bytes
system.dll!System.Diagnostics.TraceInternal.WriteL ine(string message =
"blablabla") + 0x4d bytes
system.dll!System.Diagnostics.Debug.WriteLine(stri ng 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.

May 10 '07 #1
0 1026

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by DraguVaso | last post: by
reply views Thread by Marco Segurini | last post: by
reply views Thread by Howard Kaikow | last post: by
51 posts views Thread by Tony Sinclair | last post: by
7 posts views Thread by UnkleVo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.