[3991] | 1 | /* $Id: odinlx.h,v 1.5 2000-08-11 10:54:20 sandervl Exp $ */
|
---|
[953] | 2 |
|
---|
| 3 | /*
|
---|
| 4 | *
|
---|
| 5 | * Interface for running Win32 programs (compiled in OS/2)
|
---|
| 6 | *
|
---|
| 7 | * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl)
|
---|
| 8 | *
|
---|
| 9 | *
|
---|
| 10 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
| 11 | *
|
---|
| 12 | */
|
---|
| 13 | #ifndef _ODINLX_H
|
---|
| 14 | #define _ODINLX_H
|
---|
| 15 |
|
---|
[3991] | 16 | #include <win\peexe.h>
|
---|
| 17 | #include <versionos2.h>
|
---|
[953] | 18 |
|
---|
| 19 | typedef ULONG (* WIN32API WIN32DLLENTRY)(ULONG hInstance, ULONG reason, LPVOID reserved);
|
---|
| 20 | typedef int (* WIN32API WINMAIN)(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);
|
---|
| 21 |
|
---|
| 22 | //******************************************************************************
|
---|
| 23 | //Create LX Dll object and send process attach message
|
---|
| 24 | //System dlls set EntryPoint to 0
|
---|
[3991] | 25 | //Parameters:
|
---|
| 26 | // HINSTANCE hInstance - OS/2 module handle
|
---|
| 27 | // WIN32DLLENTRY EntryPoint - Win32 dll entrypoint address
|
---|
| 28 | // PVOID pResData - pointer to win32 resource data
|
---|
| 29 | // DWORD MajorImageVersion - major image/os version (for fake win32 header)
|
---|
| 30 | // DWORD MinorImageVersion - minor image/os version (for fake win32 header)
|
---|
| 31 | // DWORD Subsystem - subsystem type (for fake win32 header)
|
---|
| 32 | // (IMAGE_SUBSYSTEM_WINDOWS_CUI/IMAGE_SUBSYSTEM_WINDOWS_GUI/IMAGE_SUBSYSTEM_WINDOWS_NATIVE)
|
---|
| 33 | //
|
---|
[1420] | 34 | //Returns: Odin32 module handle
|
---|
[953] | 35 | //******************************************************************************
|
---|
[3991] | 36 | DWORD WIN32API RegisterLxDll(HINSTANCE hInstance, WIN32DLLENTRY EntryPoint,
|
---|
| 37 | PVOID pResData,
|
---|
| 38 | DWORD MajorImageVersion = ODINNT_MAJOR_VERSION,
|
---|
| 39 | DWORD MinorImageVersion = ODINNT_MINOR_VERSION,
|
---|
| 40 | DWORD Subsystem = IMAGE_SUBSYSTEM_WINDOWS_CUI);
|
---|
[953] | 41 |
|
---|
| 42 | //******************************************************************************
|
---|
| 43 | //Destroy LX Dll object
|
---|
| 44 | //******************************************************************************
|
---|
| 45 | BOOL WIN32API UnregisterLxDll(HINSTANCE hInstance);
|
---|
| 46 |
|
---|
| 47 | //******************************************************************************
|
---|
| 48 | //Create LX Exe object and call entrypoint
|
---|
| 49 | //System dlls set EntryPoint to 0
|
---|
| 50 | //******************************************************************************
|
---|
[978] | 51 | BOOL WIN32API RegisterLxExe(WINMAIN EntryPoint, PVOID pResData);
|
---|
[953] | 52 |
|
---|
[970] | 53 | #ifdef __cplusplus
|
---|
| 54 | extern "C" {
|
---|
| 55 | #endif
|
---|
[953] | 56 |
|
---|
[970] | 57 | void OS2SetExceptionHandler(void *exceptframe);
|
---|
| 58 | void OS2UnsetExceptionHandler(void *exceptframe);
|
---|
| 59 |
|
---|
| 60 | #ifdef __cplusplus
|
---|
| 61 | }
|
---|
[953] | 62 | #endif
|
---|
[970] | 63 |
|
---|
| 64 | #endif
|
---|