| 1 | /* $Id: OS2KPTDA.h,v 1.3 2001-09-27 03:04:12 bird Exp $
|
|---|
| 2 | *
|
|---|
| 3 | * PTDA access functions.
|
|---|
| 4 | *
|
|---|
| 5 | * Copyright (c) 2000-2001 knut st. osmundsen (kosmunds@csc.com)
|
|---|
| 6 | *
|
|---|
| 7 | * Project Odin Software License can be found in LICENSE.TXT
|
|---|
| 8 | *
|
|---|
| 9 | */
|
|---|
| 10 | #ifndef _OS2KPTDA_h_
|
|---|
| 11 | #define _OS2KPTDA_h_
|
|---|
| 12 |
|
|---|
| 13 | #ifdef __cplusplus
|
|---|
| 14 | extern "C" {
|
|---|
| 15 | #endif
|
|---|
| 16 |
|
|---|
| 17 | /*******************************************************************************
|
|---|
| 18 | * Structures and Typedefs *
|
|---|
| 19 | *******************************************************************************/
|
|---|
| 20 | typedef struct _PTDA
|
|---|
| 21 | {
|
|---|
| 22 | struct _PTDA *p1;
|
|---|
| 23 | struct _PTDA *p2;
|
|---|
| 24 | struct _PTDA *p3;
|
|---|
| 25 | struct _PTDA *pPTDAExecChild; /* This offset is fixed for all supported OS/2 version. */
|
|---|
| 26 | } PTDA, *PPTDA, **PPPTDA;
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 | /*******************************************************************************
|
|---|
| 30 | * Global Variables *
|
|---|
| 31 | *******************************************************************************/
|
|---|
| 32 | #ifndef KKRNLLIB
|
|---|
| 33 | #if defined(__IBMC__) || defined(__IBMCPP__)
|
|---|
| 34 | #pragma map(pPTDACur, "_pPTDACur")
|
|---|
| 35 | #else
|
|---|
| 36 | #pragma pPTDACur _pPTDACur
|
|---|
| 37 | #endif
|
|---|
| 38 | #endif
|
|---|
| 39 | #ifdef KKRNLLIB
|
|---|
| 40 | extern PPPTDA ppPTDACur; /* Please access this only thru the ptdaGetCur() function. */
|
|---|
| 41 | #else
|
|---|
| 42 | extern PPTDA pPTDACur; /* Please access this only thru the ptdaGetCur() function. */
|
|---|
| 43 | #endif
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 | /*******************************************************************************
|
|---|
| 47 | * Defined Constants And Macros *
|
|---|
| 48 | *******************************************************************************/
|
|---|
| 49 | /**
|
|---|
| 50 | * Gets the current PTDA pointer.
|
|---|
| 51 | * @returns Pointer to the current PTDA.
|
|---|
| 52 | * @remark Using import stuff.
|
|---|
| 53 | */
|
|---|
| 54 | //PPTDA ptdaGetCur(void);
|
|---|
| 55 | #ifdef KKRNLLIB
|
|---|
| 56 | #define ptdaGetCur() (*ppPTDACur)
|
|---|
| 57 | #else
|
|---|
| 58 | #define ptdaGetCur() (pPTDACur)
|
|---|
| 59 | #endif
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 | /**
|
|---|
| 65 | * Gets the pPTDAExecChild member of the PTDA.
|
|---|
| 66 | * @returns Pointer to child being started. NULL if none.
|
|---|
| 67 | * @param pPTDA Pointer to the ptda structure.
|
|---|
| 68 | * @remark This member is fixed for all the supported kernels (all 2.x kernels too?).
|
|---|
| 69 | */
|
|---|
| 70 | //PPTDA ptdaGet_pPTDAExecChild(PPTDA pPTDA);
|
|---|
| 71 | #define ptdaGet_pPTDAExecChild(pPTDA) ((PPTDA)(pPTDA))->pPTDAExecChild
|
|---|
| 72 |
|
|---|
| 73 |
|
|---|
| 74 | USHORT ptdaGet_ptda_environ(PPTDA pPTDA);
|
|---|
| 75 | HPTDA ptdaGet_ptda_handle(PPTDA pPTDA);
|
|---|
| 76 | USHORT ptdaGet_ptda_module(PPTDA pPTDA);
|
|---|
| 77 | HKSEMMTX ptda_ptda_ptdasem(PPTDA pPTDA);
|
|---|
| 78 | PSZ ptdaGet_ptda_pBeginLIBPATH(PPTDA pPTDA);
|
|---|
| 79 | PSZ ptdaGet_ptda_pEndLIBPATH(PPTDA pPTDA);
|
|---|
| 80 |
|
|---|
| 81 | #ifdef __cplusplus
|
|---|
| 82 | }
|
|---|
| 83 | #endif
|
|---|
| 84 |
|
|---|
| 85 | #endif
|
|---|