Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:ibm:prcp:mou:register [2016/02/04 03:40] – created valerius | en:ibm:prcp:mou:register [2016/09/15 04:19] (current) – valerius | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ==== MouRegister ==== | ||
| + | |||
| + | **Bindings**: | ||
| + | |||
| + | This call registers a mouse subsystem within a session. | ||
| + | |||
| + | // | ||
| + | |||
| + | // | ||
| + | Address of the dynamic link module name. The maximum length is 9 bytes (including ASCIIZ terminator). | ||
| + | |||
| + | // | ||
| + | Address of the dynamic link entry point name of a routine that receives control when any of the registered functions are called. The maximum length is 33 bytes (including ASCIIZ terminator). | ||
| + | |||
| + | //Mask// (**ULONG**) - input | ||
| + | A mask of bits, where each bit set to 1 identifies a mouse function being registered. Bit values are: | ||
| + | |||
| + | ^Bit ^Description ^ | ||
| + | |31-22 |Reserved, set to zero | | ||
| + | |21 |[[en: | ||
| + | |20 |[[en: | ||
| + | |19 |[[en: | ||
| + | |18 |[[en: | ||
| + | |17 |[[en: | ||
| + | |16 |[[en: | ||
| + | |15 |[[en: | ||
| + | |14 |[[en: | ||
| + | |13 |[[en: | ||
| + | |12 |[[en: | ||
| + | |11 |[[en: | ||
| + | |10 |Reserved | | ||
| + | |9 |Reserved | | ||
| + | |8 |[[en: | ||
| + | |7 |[[en: | ||
| + | |6 |[[en: | ||
| + | |5 |[[en: | ||
| + | |4 |[[en: | ||
| + | |3 |[[en: | ||
| + | |2 |[[en: | ||
| + | |1 |[[en: | ||
| + | |0 |[[en: | ||
| + | |||
| + | //rc// (**USHORT**) - return | ||
| + | Return code descriptions are: | ||
| + | |||
| + | |0 |NO_ERROR | | ||
| + | |385 |ERROR_MOUSE_NO_DEVICE | | ||
| + | |413 |ERROR_MOUSE_INVALID_ASCIIZ | | ||
| + | |414 |ERROR_MOUSE_INVALID_MASK | | ||
| + | |415 |ERROR_MOUSE_REGISTER | | ||
| + | |466 |ERROR_MOU_DETACHED | | ||
| + | |505 |ERROR_MOU_EXTENDED_SG | | ||
| + | |||
| + | **Remarks** | ||
| + | |||
| + | The Base Mouse Subsystem is the default mouse subsystem. There can be only one [[en: | ||
| + | |||
| + | When any registered function is called, control is routed to // | ||
| + | |||
| + | <code asm> | ||
| + | PUSH@ WORD NumberOfMickeys | ||
| + | PUSH WORD DeviceHandle | ||
| + | CALL FAR | ||
| + | PUSH WORD Function Code | ||
| + | CALL NEAR Entry point in Mouse Router | ||
| + | PUSH DS | ||
| + | CALL FAR | ||
| + | </ | ||
| + | |||
| + | |||
| + | When a registered function returns to the Mouse Router, AX is interpreted as follows: | ||
| + | |||
| + | AX = 0 | ||
| + | No error. Do not invoke the Base Mouse Subsystem routine. Return AX = 0. | ||
| + | |||
| + | AX = -1 | ||
| + | Invoke the BaseMouse Subsystem routine. Return AX = return code from the Base Mouse Subsystem. | ||
| + | |||
| + | AX = error (if not 0 or -1) | ||
| + | Do not invoke the Base Mouse Subsystem Routine. Return AX = error. | ||
| + | |||
| + | When the mouse router receives a mouse call, it routes it to the Base Mouse Subsystem unless an application or other mouse subsystem has previously issued [[en: | ||
| + | |||
| + | The registered function mask is used to determine whether a requested function is performed by the registered mouse subsystem or default to the Base Mouse Subsystem. | ||
| + | |||
| + | The following list shows the relationship of the mouse API calls and the Function Code passed to either the Base Mouse Subsystem or a registered mouse subsystem. | ||
| + | |||
| + | ^MOU API calls ^Function Code ^ | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |Reserved |09H | | ||
| + | |Reserved |0AH | | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |[[en: | ||
| + | |||
| + | A registered mouse sybsystem must leave the stack, on exit, in the exact state it was received. | ||
| + | |||
| + | === C bindings === | ||
| + | |||
| + | <code c> | ||
| + | #define INCL_MOU | ||
| + | |||
| + | USHORT | ||
| + | |||
| + | PSZ ModuleName; | ||
| + | PSZ EntryName; | ||
| + | ULONG Mask; /* Function Mask */ | ||
| + | |||
| + | USHORT | ||
| + | </ | ||
| + | |||
| + | === MASM bindings === | ||
| + | |||
| + | <code asm> | ||
| + | EXTRN | ||
| + | INCL_MOU | ||
| + | |||
| + | PUSH@ ASCIIZ | ||
| + | PUSH@ ASCIIZ | ||
| + | PUSH | ||
| + | CALL | ||
| + | |||
| + | Returns WORD | ||
| + | </ | ||




