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()?

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:

ControlNativeWindow.WndProc(System.Windows.Forms.M essage m =
{System.Windows.Forms.Message}) + 0xda bytes
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

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
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.