I would think C++. Perhaps with .Net (though possibly via an out of process server) Windows hooks, prior to .Net 4.0 would have been incredibly painful in any managed language, I'm not sure they are ...