home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / H / VPMXPORT.H < prev    next >
C/C++ Source or Header  |  1995-04-14  |  6KB  |  162 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT (C) Microsoft Corporation, 1989                                 */
  4. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  5. /*                                                                           */
  6. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  7. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  8. /*    drivers. You may use this code in accordance with the IBM License      */
  9. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  10. /*    Copyright statement may not be removed.                                */
  11. /*                                                                           */
  12. /*****************************************************************************/
  13. /***    VPMXPORT.H
  14.  *
  15.  *    SCCSID = @(#)vpmxport.h    6.7 91/07/08
  16.  *
  17.  *
  18.  *
  19.  *
  20.  *    Title:
  21.  *
  22.  *    DPMI host per task data
  23.  *
  24.  *    Description:
  25.  *
  26.  *    Contains the vpm definitions
  27.  *
  28.  *    MODIFICATION HISTORY
  29.  *    --------------------
  30.  *    05/07/91 RCW  Changed all occurences of the single line comment
  31.  *              notation to the standard notation to allow users to
  32.  *              maintain ANSI compatibility.  This is in response to
  33.  *              PTR B718526.  All future updates to this and all other
  34.  *              header files should use the standard commenting format.
  35.  *
  36.  */
  37.  
  38. #include <vpmx2.h>
  39.  
  40. /***ET+ DHD - DPMI host data block
  41.  *
  42.  *    This is the DPMI host data for a task.    The V86 mode
  43.  *    host data block allocated (in the V86 mode address space)
  44.  *    before the start protected mode execution call is used only
  45.  *    for the client V86 mode stack.    All other per dpmi task
  46.  *    data is kept in this structure as per dpmi program instance
  47.  *    data.  Note: there is one structure per dpmi start call in a VDM.
  48.  */
  49. typedef struct dhd_s {
  50.     struct dhd_s *dhd_pdhdParent;   /* pointer to parent program's DHD    */
  51.     USHORT dhd_segStack;        /* V86 stack segment (host data area) */
  52.     USHORT dhd_segEnviron;        /* V86 environment segment          */
  53.     USHORT dhd_segPDB;            /* V86 pdb segment              */
  54.     SEL    dhd_selSS;            /* protect mode stack selector      */
  55.     SEL    dhd_selDS;            /* protect mode ds    selector      */
  56.     SEL    dhd_selCS;            /* protect mode cs    selector      */
  57.     SEL    dhd_selPDB;            /* protect mode pdb selector      */
  58.     SEL    dhd_selEnviron;        /* protect mode env selector      */
  59.     PVOID  dhd_pdpmData;        /* DPMI API layer per DPMI task data  */
  60.     PVOID  dhd_pvpmData;        /* em86 per DPMI task data          */
  61.     PVOID  dhd_pDosX;            /* DOS API extension area          */
  62.     PVOID  dhd_laddrLDT;        /* LDT linear address          */
  63.     SEL    dhd_selvpmbp;        /* protect mode vpm breakpoint sel      */
  64.     ULONG  DHD_sig;            /* assertion checking          */
  65. } DHD;
  66.  
  67. #define DHD_SIGNATURE            0x20444844    /* "DHD " */
  68.  
  69. typedef DHD *PDHD;  /* pdhd */
  70. /*end*/
  71.  
  72. //c-begin
  73. /* common external references */
  74. extern PDHD    pdhdHostData;        /* instance data in em86vpm.c */
  75. extern ULONG   flVpmIRQHooks;        /* instance data in em86vpm.c */
  76. //c-end
  77.  
  78. /* Definitions for get/set dpmi exception handler calls */
  79. #define VPMXCPT32        1
  80. #define VPMXCPT10        2
  81. #define VPMXCPT_REFLECT     4
  82.  
  83. /***ET+ PFNDPMRTE - DPMI router hook
  84.  *
  85.  *  ENTRY
  86.  *    pcrf   - pointer to client register frame
  87.  *
  88.  *  EXIT
  89.  *    NONE
  90.  *
  91.  *  CALLING CONVENTIONS
  92.  *    32-bit small-model PASCAL calling conventions.    More specifically:
  93.  *
  94.  *    Parameters are pushed on the stack from left to right, and are
  95.  *    removed by the callee.    The callee will preserve EBX, ESI, EDI, EBP,
  96.  *    DS and ES.  DS is assumed to contain the callee's DGROUP selector
  97.  *    on entry.  EAX must be set to the return code on exit.
  98.  */
  99. typedef VOID (PASCAL *PFNDPMRTE)(PCRF);       /* pdpmr */
  100. /*end*/
  101.  
  102. /***ET+ PFNDPMSTART - DPMI task entry hook
  103.  *
  104.  *  ENTRY
  105.  *    pcrf   - pointer to client register frame
  106.  *
  107.  *  EXIT
  108.  *    SUCCESS == TRUE
  109.  *
  110.  *  CALLING CONVENTIONS
  111.  *    32-bit small-model PASCAL calling conventions.    More specifically:
  112.  *
  113.  *    Parameters are pushed on the stack from left to right, and are
  114.  *    removed by the callee.    The callee will preserve EBX, ESI, EDI, EBP,
  115.  *    DS and ES.  DS is assumed to contain the callee's DGROUP selector
  116.  *    on entry.  EAX must be set to the return code on exit.
  117.  */
  118. typedef BOOL (PASCAL *PFNDPMSTART)(PCRF);       /* pdpms */
  119. /*end*/
  120.  
  121. /***ET+ PFNDPMEND - DPMI task end hook
  122.  *
  123.  *  ENTRY
  124.  *    NONE
  125.  *
  126.  *  EXIT
  127.  *    SUCCESS == TRUE
  128.  *
  129.  *  CALLING CONVENTIONS
  130.  *    32-bit small-model PASCAL calling conventions.    More specifically:
  131.  *
  132.  *    Parameters are pushed on the stack from left to right, and are
  133.  *    removed by the callee.    The callee will preserve EBX, ESI, EDI, EBP,
  134.  *    DS and ES.  DS is assumed to contain the callee's DGROUP selector
  135.  *    on entry.  EAX must be set to the return code on exit.
  136.  */
  137. typedef BOOL (PASCAL *PFNDPMEND)(VOID);      /* pdpme */
  138. /*end*/
  139.  
  140.  
  141. /***ET+ DPMX - DPMI VDD exports to kernel for VDHRegisterDPMI
  142.  *
  143.  *    These entry points are passed to the kernel during the
  144.  *    exchange of entry points in VDHRegisterDPMI.
  145.  */
  146. typedef struct dpmx_s {
  147.     PFNDPMRTE    dpmx_pfnINT31Rte;
  148.     PFNDPMSTART dpmx_pfnCreateTask;
  149.     PFNDPMEND    dpmx_pfnEndTask;
  150. } DPMX;        /* dpmx */
  151.  
  152. typedef DPMX *PDPMX;  /* pdpmx */
  153. /*end*/
  154.  
  155. /* VDH service for registering DPMI VDD */
  156. //c-begin
  157. BOOL VDHENTRY VDHRegisterDPMI (ULONG, PDPMX, PVPMX);
  158. //c-end
  159. //masm-begin
  160. /* VDHENTRY VDHRegisterDPMI <ULONG, ULONG, ULONG> */
  161. //masm-end
  162.