I debated with myself whether I should argue my point. I eventually realized it was probably better to produce a poc than to try and argue or prove any point. I respect your opinion Randy, but please don't make the assumption that I'm just some wannabe code junkie. I'm not established here, but I've written my share of applications.
Ok, but you said VB, not C#. I have researched this type of thing pretty exhaustively for other reasons in the past. Here's a quote from one of the sites researched:
-----------
Before you get excited, though, VB on its own cannot be used to create a system-wide hook. This is because the hook procedure must reside within a Windows DLL, and VB cannot create these beasts (because you cannot specify to export the HookProc function). Also I should point out that system-wide hooks aren't much fun to write: you can't debug them very easily, and if anything goes wrong it takes your whole system down! If you have some C/C++ knowledge, however, there are various samples of creating system-wide hooks at MSDN and CodeGuru.
-----------
While it can be done, by using hooks as I stated, "simple" is relative especially as it concerns the use of VB to do these kinds of things. And doing this kind of thing is "frowned upon" in many circles because it uses exactly the same mechanism as covert key-logging software, etc. With very little extra code, the very same utility you use to provide this functionality can be used to log every keystroke you make to a file somewhere, which can then be transmitted to unknown persons for nefarious purposes. If you value the information you type (passwords, credit card numbers, etc) one should be very cautious about installing software that does this kind of thing, especially if it comes from some unknown "eastern block" author, as one of the examples posted by Xiaou2 obviously did. Some (like MS) go to great lengths to intervene with the functionality required to do this type of thing and for good reason. But if Ahofle can put one together that works, I think we can trust him
The other thing to be concerned about / aware of is Windows cross-platform compatibility, how upcoming changes in the way MAME collects input might affect the operation of said code, and so on. Even the linked article states that 95/98 can only use application level hooking, not system wide. So I guess my cab is out
I made no assumptions about you or your abilities. I do a lot in VB, and if it were "simple" I would have just knocked out the app instead of posting that it's not that simple to do well. I even posted that I tested a
finished app that purports to provide the functionality and it failed under MAME. I'm guessing there's probably a reason for that.
RandyT