| 1 | /* $Id: kLdrExeStub-win.c 2878 2006-11-12 12:41:15Z bird $ */ | 
|---|
| 2 | /** @file | 
|---|
| 3 | * | 
|---|
| 4 | * kLdr - OS/2 C Loader Stub. | 
|---|
| 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 | *   Header Files                                                               * | 
|---|
| 30 | *******************************************************************************/ | 
|---|
| 31 | #include <kLdr.h> | 
|---|
| 32 | #include <os2.h> | 
|---|
| 33 |  | 
|---|
| 34 |  | 
|---|
| 35 | /******************************************************************************* | 
|---|
| 36 | *   Global Variables                                                           * | 
|---|
| 37 | *******************************************************************************/ | 
|---|
| 38 | /** The stub arguments. */ | 
|---|
| 39 | static const KLDREXEARGS g_Args = | 
|---|
| 40 | { | 
|---|
| 41 | /* .fFlags       = */ KLDRDYLD_LOAD_FLAGS_RECURSIVE_INIT, | 
|---|
| 42 | /* .enmSearch    = */ KLDRDYLD_SEARCH_OS2, | 
|---|
| 43 | /* .szExecutable = */ "tst-0", /* just while testing */ | 
|---|
| 44 | /* .szDefPrefix  = */ "", | 
|---|
| 45 | /* .szDefSuffix  = */ ".dll", | 
|---|
| 46 | /* .szLibPath    = */ "" | 
|---|
| 47 | }; | 
|---|
| 48 |  | 
|---|
| 49 | /** | 
|---|
| 50 | * OS/2 'main'. | 
|---|
| 51 | */ | 
|---|
| 52 | int _System OS2Main(HMODULE hmod, ULONG ulReserved, PCH pszzEnv, PCH pszzCmdLine) | 
|---|
| 53 | { | 
|---|
| 54 | return kLdrDyldLoadExe(&g_Args, &hmod); | 
|---|
| 55 | } | 
|---|
| 56 |  | 
|---|