en:ibm:prcp:mou:register

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:ibm:prcp:mou:register [2016/02/04 03:44] – created valeriusen:ibm:prcp:mou:register [2016/09/15 04:19] (current) valerius
Line 1: Line 1:
 ==== MouRegister ==== ==== MouRegister ====
  
-**Bindings**: C, MASM +**Bindings**: [[register#bindings|C]][[register#MASM bindings|MASM]]
  
 This call registers a mouse subsystem within a session.  This call registers a mouse subsystem within a session. 
Line 10: Line 10:
 Address of the dynamic link module name. The maximum length is 9 bytes (including ASCIIZ terminator).  Address of the dynamic link module name. The maximum length is 9 bytes (including ASCIIZ terminator). 
  
-//EntryName?? (**PSZ**) - input +//EntryName// (**PSZ**) - input 
 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).  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). 
  
Line 54: Line 54:
 **Remarks**  **Remarks** 
  
-The Base Mouse Subsystem is the default mouse subsystem. There can be only one MouRegister outstanding for each session without an intervening MouDeRegister. MouDeRegister must be issued by the same process that issued MouRegister. +The Base Mouse Subsystem is the default mouse subsystem. There can be only one [[en:ibm:prcp:mou:register|MouRegister]] outstanding for each session without an intervening [[en:ibm:prcp:mou:dereg|MouDeRegister]][[en:ibm:prcp:mou:dereg|MouDeRegister]] must be issued by the same process that issued [[en:ibm:prcp:mou:register|MouRegister]]
  
-When any registered function is called, control is routed to EntryName. When this routine is entered, four additional values are pushed onto the stack. The first is the index number (Word) of the function being called. The second is a near pointer (Word). The third is the caller's DS register (Word). The fourth is the return address (DWord) to the mouse router. For example, if MouGetNumMickeys were called and control routed to EntryName, the stack would appear as if the following instructions were executed: +When any registered function is called, control is routed to //EntryName//. When this routine is entered, four additional values are pushed onto the stack. The first is the index number (Word) of the function being called. The second is a near pointer (Word). The third is the caller's DS register (Word). The fourth is the return address (DWord) to the mouse router. For example, if [[en:ibm:prcp:mou:getnummickeys|MouGetNumMickeys]] were called and control routed to //EntryName//, the stack would appear as if the following instructions were executed: 
  
 <code asm> <code asm>
Line 80: Line 80:
 Do not invoke the Base Mouse Subsystem Routine. Return AX = error.  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 MouRegister for that call. If the call was registered, the subsystem is entered at the EntryName specified, and provided with the applicable function code. +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:ibm:prcp:mou:register|MouRegister]] for that call. If the call was registered, the subsystem is entered at the //EntryName// specified, and provided with the applicable function code. 
  
 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 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. 
Line 111: Line 111:
  
 A registered mouse sybsystem must leave the stack, on exit, in the exact state it was received.  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  rc = MouRegister(ModuleName, EntryName, Mask);
 +
 +PSZ              ModuleName;    /* Module Name */
 +PSZ              EntryName;     /* Entry Name */
 +ULONG            Mask;          /* Function Mask */
 +
 +USHORT           rc;            /* return code */
 +</code>
 +
 +=== MASM bindings ===
 +
 +<code asm>
 +EXTRN   MouRegister:FAR
 +INCL_MOU            EQU 1
 +
 +PUSH@  ASCIIZ  ModuleName    ;Module Name
 +PUSH@  ASCIIZ  EntryName     ;Entry Name
 +PUSH   DWORD   Mask          ;Function Mask
 +CALL   MouRegister
 +
 +Returns WORD
 +</code>