You need a system debug viewer running such as DebugView and output goes to the debugger window. Also,
If the application has no debugger and the system debugger is not active, OutputDebugString does nothing.
This could also be used with Al's trace ruby messages technique so instead of output going to files ,it goes to the debugger.
Come to think of it, something like this should be part of the api.
- Code: Select all
OutputDebugString = Win32API.new("kernel32.dll", "OutputDebugString", ['P'], 'V')
def opd(s="\0")
s = s.to_s + "\0"
OutputDebugString.call(s)
end
opd(Time.now)