The Windows OSDI functions

Apart from the calls to DDI_Load() and DDI_Unload() , which are made when the OSDI is loaded and unloaded by Windows, all calls into the OSDI are made through the function DDI_Entry() by the DP4 terminal manager. This function has four parameters:

  1. A handle returned by dipw.c by the first call to DDI_Entry (which uses command 0)
  2. A command parameter which is a number from 0 to 7 that indicates the function being requested by the terminal manager
  3. Another integer parameter whose meaning depends on the command.
  4. A pointer to data whose meaning depends on the command.

Not all commands use the third or fourth parameters.

The commands map into the user functions described below as follows:

Commands Function
0 DDI_InitTask()
1 DDI_Error()
2 DDI_SelectSubdevice()
3 DDI_PollInput()
4 DDI_EnableInput()
4 & 7 DDI_DisableInput()
5 DDI_DvcStatus()
6 DDI_OutputData()
7 DDI_EndTask()

All the other values are reserved for future expansion. If you want to add custom commands into an OSDI then export another function and call that.

Details of the functions to be modified are given below:

Managing input sources

The terminal manager is primarily responsible for managing the keyboard and mouse in a DP4 Windows application. Nevertheless the OSDI can at least partially over-ride this using either or both of the following techniques:

It is worth referring to the following pages in the non-Windows part of this section:

However, the latter page does have some information which is not relevant to the Windows OSDI because of its different construction.