| Line | |
|---|
| 1 | /* $Id: libInit.c,v 1.2 2000-02-26 17:48:22 bird Exp $
|
|---|
| 2 | *
|
|---|
| 3 | * Inits the Win32k library functions.
|
|---|
| 4 | *
|
|---|
| 5 | * Copyright (c) 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 | /*******************************************************************************
|
|---|
| 13 | * Header Files *
|
|---|
| 14 | *******************************************************************************/
|
|---|
| 15 | #define INCL_DOSERRORS
|
|---|
| 16 | #define INCL_DOSFILEMGR
|
|---|
| 17 | #define INCL_DOSDEVICES
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 | /*******************************************************************************
|
|---|
| 21 | * Internal Functions *
|
|---|
| 22 | *******************************************************************************/
|
|---|
| 23 | #include <os2.h>
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 | /*******************************************************************************
|
|---|
| 27 | * Global Variables *
|
|---|
| 28 | *******************************************************************************/
|
|---|
| 29 | BOOL fInited = FALSE;
|
|---|
| 30 | HFILE hWin32k = NULLHANDLE;
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 | /**
|
|---|
| 34 | * Initiates the library.
|
|---|
| 35 | * @returns OS/2 return code.
|
|---|
| 36 | * @status
|
|---|
| 37 | * @author knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
|
|---|
| 38 | * @remark
|
|---|
| 39 | */
|
|---|
| 40 | APIRET APIENTRY libWin32kInit(void)
|
|---|
| 41 | {
|
|---|
| 42 | APIRET rc;
|
|---|
| 43 |
|
|---|
| 44 | if (!fInited)
|
|---|
| 45 | {
|
|---|
| 46 | ULONG ulAction = 0UL;
|
|---|
| 47 |
|
|---|
| 48 | rc = DosOpen("\\dev\\win32k$",
|
|---|
| 49 | &hWin32k,
|
|---|
| 50 | &ulAction,
|
|---|
| 51 | 0UL,
|
|---|
| 52 | FILE_NORMAL,
|
|---|
| 53 | OPEN_ACTION_FAIL_IF_NEW | OPEN_ACTION_OPEN_IF_EXISTS,
|
|---|
| 54 | OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY,
|
|---|
| 55 | NULL);
|
|---|
| 56 |
|
|---|
| 57 | fInited = rc == NO_ERROR;
|
|---|
| 58 | }
|
|---|
| 59 | else
|
|---|
| 60 | rc = NO_ERROR;
|
|---|
| 61 |
|
|---|
| 62 | return rc;
|
|---|
| 63 | }
|
|---|
| 64 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.