Line | |
---|
1 | /* $Id: $ */
|
---|
2 | /** @file
|
---|
3 | *
|
---|
4 | * kLdr - The Dynamic Loader, OS/2 Specifics.
|
---|
5 | *
|
---|
6 | * Copyright (c) 2006 knut st. osmundsen <bird-kbuild-src@anduin.net>
|
---|
7 | *
|
---|
8 | *
|
---|
9 | * This file is part of kLdr.
|
---|
10 | *
|
---|
11 | * kLdr is free software; you can redistribute it and/or modify
|
---|
12 | * it under the terms of the GNU General Public License as published by
|
---|
13 | * the Free Software Foundation; either version 2 of the License, or
|
---|
14 | * (at your option) any later version.
|
---|
15 | *
|
---|
16 | * kLdr is distributed in the hope that it will be useful,
|
---|
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | * GNU General Public License for more details.
|
---|
20 | *
|
---|
21 | * You should have received a copy of the GNU General Public License
|
---|
22 | * along with kLdr; if not, write to the Free Software
|
---|
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
24 | *
|
---|
25 | */
|
---|
26 |
|
---|
27 |
|
---|
28 |
|
---|
29 | /*******************************************************************************
|
---|
30 | * Header Files *
|
---|
31 | *******************************************************************************/
|
---|
32 | #define INCL_BASE
|
---|
33 | #include <os2.h>
|
---|
34 |
|
---|
35 | #include <kLdr.h>
|
---|
36 | #include "kLdrInternal.h"
|
---|
37 | #include "kLdrHlp.h"
|
---|
38 |
|
---|
39 |
|
---|
40 | /**
|
---|
41 | * The DLL main function.
|
---|
42 | *
|
---|
43 | * @returns TRUE / FALSE.
|
---|
44 | * @param hmod The dll handle.
|
---|
45 | * @param fFlags Flags.
|
---|
46 | */
|
---|
47 | ULONG _System _DLL_InitTerm(HMODULE hmod, ULONG fFlags)
|
---|
48 | {
|
---|
49 | switch (fFlags)
|
---|
50 | {
|
---|
51 | case 0:
|
---|
52 | {
|
---|
53 | int rc = kldrInit();
|
---|
54 | return rc == 0;
|
---|
55 | }
|
---|
56 |
|
---|
57 | case 1:
|
---|
58 | kldrTerm();
|
---|
59 | return TRUE;
|
---|
60 |
|
---|
61 | default:
|
---|
62 | return FALSE;
|
---|
63 | }
|
---|
64 | }
|
---|
65 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.