| 1 | /* $Id: tstDllMainStub.c 3601 2007-10-29 00:21:13Z bird $ */ | 
|---|
| 2 | /** @file | 
|---|
| 3 | * kLdr testcase - DLL Stub. | 
|---|
| 4 | */ | 
|---|
| 5 |  | 
|---|
| 6 | /* | 
|---|
| 7 | * Copyright (c) 2006-2007 knut st. osmundsen <bird-kStuff-spam@anduin.net> | 
|---|
| 8 | * | 
|---|
| 9 | * This file is part of kStuff. | 
|---|
| 10 | * | 
|---|
| 11 | * kStuff is free software; you can redistribute it and/or | 
|---|
| 12 | * modify it under the terms of the GNU Lesser General Public | 
|---|
| 13 | * License as published by the Free Software Foundation; either | 
|---|
| 14 | * version 2.1 of the License, or (at your option) any later version. | 
|---|
| 15 | * | 
|---|
| 16 | * kStuff 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 GNU | 
|---|
| 19 | * Lesser General Public License for more details. | 
|---|
| 20 | * | 
|---|
| 21 | * You should have received a copy of the GNU Lesser General Public | 
|---|
| 22 | * License along with kStuff; if not, write to the Free Software | 
|---|
| 23 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA | 
|---|
| 24 | * | 
|---|
| 25 | */ | 
|---|
| 26 |  | 
|---|
| 27 | /******************************************************************************* | 
|---|
| 28 | *   Header Files                                                               * | 
|---|
| 29 | *******************************************************************************/ | 
|---|
| 30 | #include "tst.h" | 
|---|
| 31 |  | 
|---|
| 32 | #if K_OS == K_OS_OS2 | 
|---|
| 33 | # define INCL_BASE | 
|---|
| 34 | # include <os2.h> | 
|---|
| 35 |  | 
|---|
| 36 | #elif K_OS == K_OS_WINDOWS | 
|---|
| 37 | # include <windows.h> | 
|---|
| 38 |  | 
|---|
| 39 | #elif K_OS == K_OS_DARWIN | 
|---|
| 40 | /* later */ | 
|---|
| 41 |  | 
|---|
| 42 | #else | 
|---|
| 43 | # error "port me" | 
|---|
| 44 | #endif | 
|---|
| 45 |  | 
|---|
| 46 |  | 
|---|
| 47 | #if K_OS == K_OS_OS2 | 
|---|
| 48 | /** | 
|---|
| 49 | * OS/2 DLL 'main' | 
|---|
| 50 | */ | 
|---|
| 51 | ULONG _System _DLL_InitTerm(HMODULE hmod, ULONG fFlag) | 
|---|
| 52 | { | 
|---|
| 53 | return TRUE; | 
|---|
| 54 | } | 
|---|
| 55 |  | 
|---|
| 56 | #elif K_OS == K_OS_WINDOWS | 
|---|
| 57 |  | 
|---|
| 58 | /** | 
|---|
| 59 | * Window DLL 'main' | 
|---|
| 60 | */ | 
|---|
| 61 | BOOL __stdcall DllMain(HANDLE hDllHandle, DWORD dwReason, LPVOID lpReserved) | 
|---|
| 62 | { | 
|---|
| 63 | return TRUE; | 
|---|
| 64 | } | 
|---|
| 65 |  | 
|---|
| 66 | #elif K_OS == K_OS_DARWIN | 
|---|
| 67 | /* later */ | 
|---|
| 68 |  | 
|---|
| 69 | #else | 
|---|
| 70 | # error "port me" | 
|---|
| 71 | #endif | 
|---|
| 72 |  | 
|---|