0

I have a service code developed in visual c in VS2012 running on windows 7. it uses outputdebugstring function write error msgs and log info. How can I see output from this function, If I start/stop my service from service control manager?

Thanks, KM.

user2731777
  • 171
  • 2
  • 11
  • 1
    Isn't outputdebugstring used to display messages with a debugger attached, such as the one in visual studio? – Borgleader Sep 04 '13 at 02:53
  • 1
    This may work as well: http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx I don't know if it supports Windows 7, but it is a nice way to get the output without having to install a debugger. – Retired Ninja Sep 04 '13 at 02:59
  • 2
    Check out the excellent [DebugView](http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx) tool from the mad geniuses behind SysInternals, which is now a part of Microsoft. – Nik Bougalis Sep 04 '13 at 03:00
  • In my opinion, this is really an XY problem. Instead of "how can I view output from `OutputDebugString`, you should be asking: "how can I produce viewable error and logging output from my service?" The answer to that is to use the Windows Event log API (though I'll admit that's enough more work it's not an entirely satisfying answer). – Jerry Coffin Sep 04 '13 at 03:28

0 Answers0