[comp.os.os2] Implementing DOS TSRs under OS/2

kitchin@hpavla.AVO.HP.COM (Bruce Kitchin) (05/24/90)

The problem of 'TSR's is quite different under DOS and OS/2.  I don't know that you can write a dual mode version although you could have parts of the source
code shared between the two.  The good news is that most of the crazy rules
you had to worry about with DOS when trying to do system access calls have gone
away, the bad news is that the keyboard monitor can be a little difficult to
learn at first.  Under OS/2 you will need to register your program as a keyboard monitor which then puts it in a chain of routines which get to peek and
possibly modify the stream of characters from the keyboard before they are seen
by the application.  You might look at the various books on OS/2 programming, I think there was a pretty good one by Duncan that went into this area with an
example.  One mistake I made when I first wrote one was to not set my thread's
priority to very high.  This lead to a slowdown in keyboard processing by an
application that I was running. Good luck.