home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
ddkx86v1.zip
/
DDKX86
/
H
/
VPMXPORT.H
< prev
next >
Wrap
C/C++ Source or Header
|
1995-04-14
|
6KB
|
162 lines
/*DDK*************************************************************************/
/* */
/* COPYRIGHT (C) Microsoft Corporation, 1989 */
/* COPYRIGHT Copyright (C) 1995 IBM Corporation */
/* */
/* The following IBM OS/2 WARP source code is provided to you solely for */
/* the purpose of assisting you in your development of OS/2 WARP device */
/* drivers. You may use this code in accordance with the IBM License */
/* Agreement provided in the IBM Device Driver Source Kit for OS/2. This */
/* Copyright statement may not be removed. */
/* */
/*****************************************************************************/
/*** VPMXPORT.H
*
* SCCSID = @(#)vpmxport.h 6.7 91/07/08
*
*
*
*
* Title:
*
* DPMI host per task data
*
* Description:
*
* Contains the vpm definitions
*
* MODIFICATION HISTORY
* --------------------
* 05/07/91 RCW Changed all occurences of the single line comment
* notation to the standard notation to allow users to
* maintain ANSI compatibility. This is in response to
* PTR B718526. All future updates to this and all other
* header files should use the standard commenting format.
*
*/
#include <vpmx2.h>
/***ET+ DHD - DPMI host data block
*
* This is the DPMI host data for a task. The V86 mode
* host data block allocated (in the V86 mode address space)
* before the start protected mode execution call is used only
* for the client V86 mode stack. All other per dpmi task
* data is kept in this structure as per dpmi program instance
* data. Note: there is one structure per dpmi start call in a VDM.
*/
typedef struct dhd_s {
struct dhd_s *dhd_pdhdParent; /* pointer to parent program's DHD */
USHORT dhd_segStack; /* V86 stack segment (host data area) */
USHORT dhd_segEnviron; /* V86 environment segment */
USHORT dhd_segPDB; /* V86 pdb segment */
SEL dhd_selSS; /* protect mode stack selector */
SEL dhd_selDS; /* protect mode ds selector */
SEL dhd_selCS; /* protect mode cs selector */
SEL dhd_selPDB; /* protect mode pdb selector */
SEL dhd_selEnviron; /* protect mode env selector */
PVOID dhd_pdpmData; /* DPMI API layer per DPMI task data */
PVOID dhd_pvpmData; /* em86 per DPMI task data */
PVOID dhd_pDosX; /* DOS API extension area */
PVOID dhd_laddrLDT; /* LDT linear address */
SEL dhd_selvpmbp; /* protect mode vpm breakpoint sel */
ULONG DHD_sig; /* assertion checking */
} DHD;
#define DHD_SIGNATURE 0x20444844 /* "DHD " */
typedef DHD *PDHD; /* pdhd */
/*end*/
//c-begin
/* common external references */
extern PDHD pdhdHostData; /* instance data in em86vpm.c */
extern ULONG flVpmIRQHooks; /* instance data in em86vpm.c */
//c-end
/* Definitions for get/set dpmi exception handler calls */
#define VPMXCPT32 1
#define VPMXCPT10 2
#define VPMXCPT_REFLECT 4
/***ET+ PFNDPMRTE - DPMI router hook
*
* ENTRY
* pcrf - pointer to client register frame
*
* EXIT
* NONE
*
* CALLING CONVENTIONS
* 32-bit small-model PASCAL calling conventions. More specifically:
*
* Parameters are pushed on the stack from left to right, and are
* removed by the callee. The callee will preserve EBX, ESI, EDI, EBP,
* DS and ES. DS is assumed to contain the callee's DGROUP selector
* on entry. EAX must be set to the return code on exit.
*/
typedef VOID (PASCAL *PFNDPMRTE)(PCRF); /* pdpmr */
/*end*/
/***ET+ PFNDPMSTART - DPMI task entry hook
*
* ENTRY
* pcrf - pointer to client register frame
*
* EXIT
* SUCCESS == TRUE
*
* CALLING CONVENTIONS
* 32-bit small-model PASCAL calling conventions. More specifically:
*
* Parameters are pushed on the stack from left to right, and are
* removed by the callee. The callee will preserve EBX, ESI, EDI, EBP,
* DS and ES. DS is assumed to contain the callee's DGROUP selector
* on entry. EAX must be set to the return code on exit.
*/
typedef BOOL (PASCAL *PFNDPMSTART)(PCRF); /* pdpms */
/*end*/
/***ET+ PFNDPMEND - DPMI task end hook
*
* ENTRY
* NONE
*
* EXIT
* SUCCESS == TRUE
*
* CALLING CONVENTIONS
* 32-bit small-model PASCAL calling conventions. More specifically:
*
* Parameters are pushed on the stack from left to right, and are
* removed by the callee. The callee will preserve EBX, ESI, EDI, EBP,
* DS and ES. DS is assumed to contain the callee's DGROUP selector
* on entry. EAX must be set to the return code on exit.
*/
typedef BOOL (PASCAL *PFNDPMEND)(VOID); /* pdpme */
/*end*/
/***ET+ DPMX - DPMI VDD exports to kernel for VDHRegisterDPMI
*
* These entry points are passed to the kernel during the
* exchange of entry points in VDHRegisterDPMI.
*/
typedef struct dpmx_s {
PFNDPMRTE dpmx_pfnINT31Rte;
PFNDPMSTART dpmx_pfnCreateTask;
PFNDPMEND dpmx_pfnEndTask;
} DPMX; /* dpmx */
typedef DPMX *PDPMX; /* pdpmx */
/*end*/
/* VDH service for registering DPMI VDD */
//c-begin
BOOL VDHENTRY VDHRegisterDPMI (ULONG, PDPMX, PVPMX);
//c-end
//masm-begin
/* VDHENTRY VDHRegisterDPMI <ULONG, ULONG, ULONG> */
//masm-end