While discussing MS RFC 28, Tamas suggested that we also include support for Windows OutputDebugString?():
Tamas Szekeres wrote:
It would be pretty useful to support the Windows OutputDebugString? API
as well. That would make the life of the Windows developers much
easier and establish the ability to use external programs like
SysInternals? debugview to display the debug output. (I think there
have been some issues in the -users list in this question before) For
using this function <windows.h> should be included which have already
included in many places in the code.
This option could be trigerred by setting MS_ERRORFILE to "windowsdebug". He also provided the following example showing how to use the function:
You should simply call the non unicode variant, like:
#ifdef WIN32
#include <windows.h>
void writeDebug( const char * pszMessage)
{
OutputDebugStringA(pszMessage);
}
#endif
For more info http://msdn2.microsoft.com/en-us/library/aa363362.aspx