Rev | Line | |
---|
[5250] | 1 | /* $Id: k32QueryCallGate.cpp,v 1.3 2001-02-23 04:01:48 bird Exp $
|
---|
[5223] | 2 | *
|
---|
| 3 | * k32QueryCallGate - Query the callgate selector for the callgate to the k32 APIs.
|
---|
| 4 | *
|
---|
| 5 | * Copyright (c) 2001 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
|
---|
| 6 | *
|
---|
| 7 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
| 8 | *
|
---|
| 9 | */
|
---|
| 10 |
|
---|
| 11 |
|
---|
| 12 | /*******************************************************************************
|
---|
| 13 | * Defined Constants And Macros *
|
---|
| 14 | *******************************************************************************/
|
---|
| 15 | #define INCL_DOSMEMMGR
|
---|
| 16 | #define INCL_DOSERRORS
|
---|
| 17 | #define INCL_OS2KRNL_TK
|
---|
| 18 |
|
---|
| 19 | #define NO_WIN32K_LIB_FUNCTIONS
|
---|
| 20 |
|
---|
| 21 |
|
---|
| 22 |
|
---|
| 23 | /*******************************************************************************
|
---|
| 24 | * Header Files *
|
---|
| 25 | *******************************************************************************/
|
---|
| 26 | #include <os2.h>
|
---|
| 27 | #include "devSegDf.h" /* Win32k segment definitions. */
|
---|
| 28 | #include "OS2Krnl.h"
|
---|
| 29 | #include "win32k.h"
|
---|
| 30 | #include "k32.h"
|
---|
| 31 | #include "options.h"
|
---|
| 32 | #include "dev32.h"
|
---|
| 33 | #include "log.h"
|
---|
| 34 | #include "macros.h"
|
---|
| 35 |
|
---|
| 36 |
|
---|
| 37 |
|
---|
| 38 | /**
|
---|
| 39 | * Query the callgate selector for the callgate to the k32 APIs.
|
---|
| 40 | * @returns NO_ERROR on success.
|
---|
| 41 | * Appropriate error code on failure.
|
---|
| 42 | * @param pusCGSelector Pointer to the variable which should have the CallGate
|
---|
| 43 | * assigned.
|
---|
| 44 | * User memory!!!
|
---|
| 45 | * @sketch Check if the CallGate is no NULL. Fail if so.
|
---|
| 46 | * Try copy the CallGate selecto to the passed in variable pointer.
|
---|
| 47 | * return the result of this attempt.
|
---|
| 48 | * @status Completely implelemnted.
|
---|
| 49 | * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no)
|
---|
| 50 | */
|
---|
| 51 | APIRET k32QueryCallGate(PUSHORT pusCGSelector)
|
---|
| 52 | {
|
---|
| 53 | APIRET rc;
|
---|
| 54 |
|
---|
| 55 | if (CallGateGDT > 7)
|
---|
| 56 | rc = TKSuULongNF(pusCGSelector, &CallGateGDT);
|
---|
| 57 | else
|
---|
| 58 | rc = ERROR_INVALID_CALLGATE;
|
---|
| 59 |
|
---|
| 60 | return rc;
|
---|
| 61 | }
|
---|
| 62 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.