| 1 | /* $Id: probkrnl.h,v 1.8 2000-02-19 23:52:00 bird Exp $
|
|---|
| 2 | *
|
|---|
| 3 | * Include file for ProbKrnl.
|
|---|
| 4 | *
|
|---|
| 5 | * Copyright (c) 1998-2000 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
|
|---|
| 6 | *
|
|---|
| 7 | * Project Odin Software License can be found in LICENSE.TXT
|
|---|
| 8 | *
|
|---|
| 9 | */
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 | #ifndef _ProbKrnl_h_
|
|---|
| 13 | #define _ProbKrnl_h_
|
|---|
| 14 |
|
|---|
| 15 | /*******************************************************************************
|
|---|
| 16 | * Defined Constants And Macros *
|
|---|
| 17 | *******************************************************************************/
|
|---|
| 18 | #define NBR_OF_KRNLIMPORTS 16 /* When this is changed make sure to */
|
|---|
| 19 | /* update the arrays in d32init.c and */
|
|---|
| 20 | /* probkrnl32.c */
|
|---|
| 21 | #define MAX_LENGTH_NAME 32 /* Max length for the function. */
|
|---|
| 22 |
|
|---|
| 23 | /* Entry-Point Type flag */
|
|---|
| 24 | #define EPT_PROC 0x00 /* procedure - overload procedure*/
|
|---|
| 25 | #define EPT_PROCIMPORT 0x01 /* procedure 32bit - import only */
|
|---|
| 26 | #define EPT_VARIMPORT 0x02 /* variable/non-procedure 32bit - not implemented yet */
|
|---|
| 27 | #define EPT_32BIT 0x00 /* 16 bit entry-point */
|
|---|
| 28 | #define EPT_16BIT 0x80 /* 32 bit entry-point */
|
|---|
| 29 | #define EPT_BIT_MASK 0x80 /* Mask bit entry-point */
|
|---|
| 30 | #define EPT16BitEntry(a) (((a).fType & EPT_BIT_MASK) == EPT_16BIT)
|
|---|
| 31 | #define EPT32BitEntry(a) (((a).fType & EPT_BIT_MASK) == EPT_32BIT)
|
|---|
| 32 |
|
|---|
| 33 | /* 32bit types */
|
|---|
| 34 | #define EPT_PROC32 (EPT_PROC | EPT_32BIT)
|
|---|
| 35 | #define EPT_PROCIMPORT32 (EPT_PROCIMPORT | EPT_32BIT)
|
|---|
| 36 |
|
|---|
| 37 | /* 16bit types */
|
|---|
| 38 | #define EPT_PROC16 (EPT_PROC | EPT_16BIT) /* no implemented yet! */
|
|---|
| 39 | #define EPT_PROCIMPORT16 (EPT_PROCIMPORT | EPT_16BIT) /* far proc in calltab with a far jmp. */
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 | /*******************************************************************************
|
|---|
| 43 | * Structures and Typedefs *
|
|---|
| 44 | *******************************************************************************/
|
|---|
| 45 | #pragma pack(1)
|
|---|
| 46 | typedef struct tagIMPORTKRNLSYM
|
|---|
| 47 | {
|
|---|
| 48 | unsigned char fFound; /* This is set when name is found */
|
|---|
| 49 | unsigned char iObject; /* Object number the name was found in*/
|
|---|
| 50 | unsigned short int cchName; /* Length of the name (optmize search) (INPUT) */
|
|---|
| 51 | unsigned char achName[MAX_LENGTH_NAME]; /* Name (INPUT) */
|
|---|
| 52 | unsigned long int offObject; /* Offset into the object */
|
|---|
| 53 | unsigned long int ulAddress; /* 32-bit flat address */
|
|---|
| 54 | unsigned short int usSel; /* Select of the object */
|
|---|
| 55 | unsigned char fType; /* Entry-Point Type Flags */
|
|---|
| 56 | } IMPORTKRNLSYM;
|
|---|
| 57 | #pragma pack()
|
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 | /*******************************************************************************
|
|---|
| 62 | * Global Variables *
|
|---|
| 63 | * NOTE! These are only available at init time! *
|
|---|
| 64 | *******************************************************************************/
|
|---|
| 65 | extern IMPORTKRNLSYM _aImportTab[NBR_OF_KRNLIMPORTS]; /* 'aImportTab' in PrbKrnl.c */
|
|---|
| 66 | extern unsigned long int _ulBuild; /* 'ulBuild' in PrbKrnl.c */
|
|---|
| 67 | extern unsigned short int _usVerMajor; /* 'usVerMajor' in PrbKrnl.c */
|
|---|
| 68 | extern unsigned short int _usVerMinor; /* 'usVerMinor' in PrbKrnl.c */
|
|---|
| 69 |
|
|---|
| 70 | #ifdef INCL_16 /* 16-bit only */
|
|---|
| 71 | int ProbeKernel(PRPINITIN pReqPack);
|
|---|
| 72 | #endif
|
|---|
| 73 |
|
|---|
| 74 | #endif
|
|---|
| 75 |
|
|---|