looks like you have taken the lead on this one matz .. I would be interested to see your source code if you would be up for posting it as Im new to C++ in general and also had a few issues with the AreYouInFocus method ... Im assuming you wrote this in c++.
Was this a debug dll ? seems kind of big .. anyways, if you or anyone else feel like working on using my sourcecode here it is is with the dll attached .. Its real basic but it works ..
enjoy