ReactOS 0.4.15-dev-7931-gfd331f1
himem.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _XMS_HANDLE
 
struct  _XMS_COPY_DATA
 

Macros

#define XMS_ADDRESS   0x110000
 
#define XMS_BLOCK_SIZE   1024
 
#define XMS_BLOCKS   ((MAX_ADDRESS - XMS_ADDRESS) / XMS_BLOCK_SIZE)
 
#define XMS_MAX_HANDLES   16
 
#define XMS_STATUS_SUCCESS   0x00
 
#define XMS_STATUS_NOT_IMPLEMENTED   0x80
 
#define XMS_STATUS_A20_ERROR   0x82
 
#define XMS_STATUS_HMA_DOES_NOT_EXIST   0x90
 
#define XMS_STATUS_HMA_IN_USE   0x91
 
#define XMS_STATUS_HMA_MIN_SIZE   0x92
 
#define XMS_STATUS_HMA_NOT_ALLOCATED   0x93
 
#define XMS_STATUS_A20_STILL_ENABLED   0x94
 
#define XMS_STATUS_OUT_OF_MEMORY   0xA0
 
#define XMS_STATUS_OUT_OF_HANDLES   0xA1
 
#define XMS_STATUS_INVALID_HANDLE   0xA2
 
#define XMS_STATUS_BAD_SRC_HANDLE   0xA3
 
#define XMS_STATUS_BAD_DEST_HANDLE   0xA4
 
#define XMS_STATUS_BAD_SRC_OFFSET   0xA5
 
#define XMS_STATUS_BAD_DEST_OFFSET   0xA6
 
#define XMS_STATUS_NOT_LOCKED   0xAA
 
#define XMS_STATUS_LOCKED   0xAB
 
#define XMS_STATUS_LOCK_OVERFLOW   0xAC
 
#define XMS_STATUS_CANNOT_LOCK   0xAD
 
#define XMS_STATUS_SMALLER_UMB   0xB0
 
#define XMS_STATUS_OUT_OF_UMBS   0xB1
 
#define XMS_STATUS_INVALID_UMB   0xB2
 

Typedefs

typedef struct _XMS_HANDLE XMS_HANDLE
 
typedef struct _XMS_HANDLEPXMS_HANDLE
 
typedef struct _XMS_COPY_DATA XMS_COPY_DATA
 
typedef struct _XMS_COPY_DATAPXMS_COPY_DATA
 

Functions

BOOLEAN XmsGetDriverEntry (PDWORD Pointer)
 
VOID XmsInitialize (VOID)
 
VOID XmsCleanup (VOID)
 

Macro Definition Documentation

◆ XMS_ADDRESS

#define XMS_ADDRESS   0x110000

Definition at line 15 of file himem.h.

◆ XMS_BLOCK_SIZE

#define XMS_BLOCK_SIZE   1024

Definition at line 16 of file himem.h.

◆ XMS_BLOCKS

#define XMS_BLOCKS   ((MAX_ADDRESS - XMS_ADDRESS) / XMS_BLOCK_SIZE)

Definition at line 17 of file himem.h.

◆ XMS_MAX_HANDLES

#define XMS_MAX_HANDLES   16

Definition at line 18 of file himem.h.

◆ XMS_STATUS_A20_ERROR

#define XMS_STATUS_A20_ERROR   0x82

Definition at line 22 of file himem.h.

◆ XMS_STATUS_A20_STILL_ENABLED

#define XMS_STATUS_A20_STILL_ENABLED   0x94

Definition at line 27 of file himem.h.

◆ XMS_STATUS_BAD_DEST_HANDLE

#define XMS_STATUS_BAD_DEST_HANDLE   0xA4

Definition at line 32 of file himem.h.

◆ XMS_STATUS_BAD_DEST_OFFSET

#define XMS_STATUS_BAD_DEST_OFFSET   0xA6

Definition at line 34 of file himem.h.

◆ XMS_STATUS_BAD_SRC_HANDLE

#define XMS_STATUS_BAD_SRC_HANDLE   0xA3

Definition at line 31 of file himem.h.

◆ XMS_STATUS_BAD_SRC_OFFSET

#define XMS_STATUS_BAD_SRC_OFFSET   0xA5

Definition at line 33 of file himem.h.

◆ XMS_STATUS_CANNOT_LOCK

#define XMS_STATUS_CANNOT_LOCK   0xAD

Definition at line 38 of file himem.h.

◆ XMS_STATUS_HMA_DOES_NOT_EXIST

#define XMS_STATUS_HMA_DOES_NOT_EXIST   0x90

Definition at line 23 of file himem.h.

◆ XMS_STATUS_HMA_IN_USE

#define XMS_STATUS_HMA_IN_USE   0x91

Definition at line 24 of file himem.h.

◆ XMS_STATUS_HMA_MIN_SIZE

#define XMS_STATUS_HMA_MIN_SIZE   0x92

Definition at line 25 of file himem.h.

◆ XMS_STATUS_HMA_NOT_ALLOCATED

#define XMS_STATUS_HMA_NOT_ALLOCATED   0x93

Definition at line 26 of file himem.h.

◆ XMS_STATUS_INVALID_HANDLE

#define XMS_STATUS_INVALID_HANDLE   0xA2

Definition at line 30 of file himem.h.

◆ XMS_STATUS_INVALID_UMB

#define XMS_STATUS_INVALID_UMB   0xB2

Definition at line 41 of file himem.h.

◆ XMS_STATUS_LOCK_OVERFLOW

#define XMS_STATUS_LOCK_OVERFLOW   0xAC

Definition at line 37 of file himem.h.

◆ XMS_STATUS_LOCKED

#define XMS_STATUS_LOCKED   0xAB

Definition at line 36 of file himem.h.

◆ XMS_STATUS_NOT_IMPLEMENTED

#define XMS_STATUS_NOT_IMPLEMENTED   0x80

Definition at line 21 of file himem.h.

◆ XMS_STATUS_NOT_LOCKED

#define XMS_STATUS_NOT_LOCKED   0xAA

Definition at line 35 of file himem.h.

◆ XMS_STATUS_OUT_OF_HANDLES

#define XMS_STATUS_OUT_OF_HANDLES   0xA1

Definition at line 29 of file himem.h.

◆ XMS_STATUS_OUT_OF_MEMORY

#define XMS_STATUS_OUT_OF_MEMORY   0xA0

Definition at line 28 of file himem.h.

◆ XMS_STATUS_OUT_OF_UMBS

#define XMS_STATUS_OUT_OF_UMBS   0xB1

Definition at line 40 of file himem.h.

◆ XMS_STATUS_SMALLER_UMB

#define XMS_STATUS_SMALLER_UMB   0xB0

Definition at line 39 of file himem.h.

◆ XMS_STATUS_SUCCESS

#define XMS_STATUS_SUCCESS   0x00

Definition at line 20 of file himem.h.

Typedef Documentation

◆ PXMS_COPY_DATA

◆ PXMS_HANDLE

◆ XMS_COPY_DATA

◆ XMS_HANDLE

Function Documentation

◆ XmsCleanup()

VOID XmsCleanup ( VOID  )

Definition at line 814 of file himem.c.

815{
818}
VOID RegisterBop(BYTE BopCode, EMULATOR_BOP_PROC BopHandler)
Definition: bop.c:29
#define NULL
Definition: types.h:112
#define BOP_XMS
Definition: himem.c:65
VOID DosDeleteDevice(PDOS_DEVICE_NODE DeviceNode)
Definition: device.c:419
Definition: dlist.c:348

◆ XmsGetDriverEntry()

BOOLEAN XmsGetDriverEntry ( PDWORD  Pointer)

Definition at line 789 of file himem.c.

790{
791 if (Node == NULL) return FALSE;
792 *Pointer = DEVICE_PRIVATE_AREA(Node->Driver);
793 return TRUE;
794}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define DEVICE_PRIVATE_AREA(Driver)
Definition: device.h:16

Referenced by DosInt2Fh().

◆ XmsInitialize()

VOID XmsInitialize ( VOID  )

Definition at line 796 of file himem.c.

797{
801
804 sizeof(EntryProcedure));
805
807
808 /* Copy the entry routine to the device private area */
811 sizeof(EntryProcedure));
812}
#define FAR_POINTER(x)
Definition: emulator.h:35
static VOID WINAPI XmsBopProcedure(LPWORD Stack)
Definition: himem.c:413
#define XMS_DEVICE_NAME
Definition: himem.c:62
static const BYTE EntryProcedure[]
Definition: himem.c:69
static RTL_BITMAP AllocBitmap
Definition: himem.c:85
static ULONG BitmapBuffer[(XMS_BLOCKS+31)/32]
Definition: himem.c:86
static XMS_HANDLE HandleTable[XMS_MAX_HANDLES]
Definition: himem.c:83
#define XMS_BLOCKS
Definition: himem.h:17
NTSYSAPI void WINAPI RtlInitializeBitMap(PRTL_BITMAP, PULONG, ULONG)
PDOS_DEVICE_NODE DosCreateDeviceEx(WORD Attributes, PCHAR DeviceName, WORD PrivateDataSize)
Definition: device.c:361
#define DOS_DEVATTR_IOCTL
Definition: device.h:28
#define DOS_DEVATTR_CHARACTER
Definition: device.h:29
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264

Referenced by DosKRNLInitialize().