By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,376 Members | 1,599 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,376 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.