[Qt-interest] qDebug output for Windows Service (no console)?

Girish Ramakrishnan girish at forwardbias.in
Wed Sep 2 06:44:58 CEST 2009


The tracker entry is very old - it's from 4.1.x time frame. So, I
wouldn't read deep into it.

How did you manage to compile your Windows Service without the SDK?

AFAIK, what qDebug uses depends on the /subsystem option that you use
while linking. If you use console, qDebug lands up as fprintf. If
windows, DebugOutputString is used. There is no detection of whether SDK
is installed at run time or compile time. What subsytem does your
service use?

Girish

Jon Nicoll wrote:
> Hi Girish
> 
> On Tuesday 01 Sep 2009 18:08:18 Girish Ramakrishnan wrote:
>> Windows Services do not have a session associated with them, right? If
>> so, DebugView has this 'Capture Global Win32' option to capture
>> debugging output from other sessions.
>>
>> Another reason for failure is possibly that the integrity level of the
>> service and debugview are different (google for psexec to change it).
>>
>> If any of the above worked, let me know :)
> 
> Thanks for your comments. I was about to say 'I'll look into this further', 
> but I have learned something else:
> 
> This task-tracker entry:
> 
> http://qt.nokia.com/developer/task-tracker/index_html?method=entry&id=119929
> 
> Says that in fact qDebug only uses OutputDebugString if the Platform SDK is 
> installed.
> 
> This seems weird behaviour to me, but I wonder if it's the cause of my 
> problem. Anyone else know about this? I'll experiment tomorrow and see if I 
> can learn more.
> 
> BTW, I'm running under XP, and most of the problems with DebugView relating to 
> integrity levels and psexec seem to be Vista-related FWIW.
> 
> Thanks for your help
> 
> 	J^n
> 
> 
> -------------------------------------------------------



More information about the Qt-interest-old mailing list