Saturday, 21 November 2009

MSVC++ Debug Output

I've been working on a multi-threaded Audio / Video / Network based browser plug-in recently and had a few threading-related synchronization issues to deal with. Break-points in multi-threaded apps are all well and good but when you have synchronisation issues that can potentially cause a browser crash, either a file-based logger or, preferably in my case, an IDE-based log of what happened is invaluable.

I've been a big GCC/G++ user for quite some time and haven't touched MSVC in a while so I was suprised when I had a lot of trouble tracking down the function used to output Debug information to the MSVC Output console so I thought I'd post it here to help out anyone with similar problems.

The functions you want are OutputDebugStringA or OutputDebugStringW. They're in winbase.h, included from windows.h. Their use is self explanatory.

Wednesday, 4 November 2009

Information that is missing from the Adobe RTMP Specification

I've been implementing an RTMP client and server library for the past few months and assumed that if I stuck to the official specifications I couldn't go wrong. Unfortunately though the specs are a little lacking in parts. To save anyone else the mistakes I have made, heres a few pointers.