[5288] | 1 | /* $Id: odinlx.h,v 1.7 2001-03-06 21:44:39 mike 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 |
|
---|
[5288] | 19 | extern "C" {
|
---|
| 20 |
|
---|
[953] | 21 | typedef ULONG (* WIN32API WIN32DLLENTRY)(ULONG hInstance, ULONG reason, LPVOID reserved);
|
---|
| 22 | typedef int (* WIN32API WINMAIN)(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);
|
---|
| 23 |
|
---|
| 24 | //******************************************************************************
|
---|
| 25 | //Create LX Dll object and send process attach message
|
---|
| 26 | //System dlls set EntryPoint to 0
|
---|
[3991] | 27 | //Parameters:
|
---|
[5288] | 28 | // HINSTANCE hInstance - OS/2 module handle
|
---|
[3991] | 29 | // WIN32DLLENTRY EntryPoint - Win32 dll entrypoint address
|
---|
| 30 | // PVOID pResData - pointer to win32 resource data
|
---|
| 31 | // DWORD MajorImageVersion - major image/os version (for fake win32 header)
|
---|
| 32 | // DWORD MinorImageVersion - minor image/os version (for fake win32 header)
|
---|
| 33 | // DWORD Subsystem - subsystem type (for fake win32 header)
|
---|
| 34 | // (IMAGE_SUBSYSTEM_WINDOWS_CUI/IMAGE_SUBSYSTEM_WINDOWS_GUI/IMAGE_SUBSYSTEM_WINDOWS_NATIVE)
|
---|
| 35 | //
|
---|
[1420] | 36 | //Returns: Odin32 module handle
|
---|
[953] | 37 | //******************************************************************************
|
---|
[5288] | 38 | DWORD WIN32API RegisterLxDll(HINSTANCE hInstance, WIN32DLLENTRY EntryPoint,
|
---|
| 39 | PVOID pResData,
|
---|
| 40 | DWORD MajorImageVersion = ODINNT_MAJOR_VERSION,
|
---|
[3991] | 41 | DWORD MinorImageVersion = ODINNT_MINOR_VERSION,
|
---|
| 42 | DWORD Subsystem = IMAGE_SUBSYSTEM_WINDOWS_CUI);
|
---|
[953] | 43 |
|
---|
| 44 | //******************************************************************************
|
---|
| 45 | //Destroy LX Dll object
|
---|
| 46 | //******************************************************************************
|
---|
| 47 | BOOL WIN32API UnregisterLxDll(HINSTANCE hInstance);
|
---|
| 48 |
|
---|
| 49 | //******************************************************************************
|
---|
| 50 | //Create LX Exe object and call entrypoint
|
---|
| 51 | //System dlls set EntryPoint to 0
|
---|
| 52 | //******************************************************************************
|
---|
[978] | 53 | BOOL WIN32API RegisterLxExe(WINMAIN EntryPoint, PVOID pResData);
|
---|
[5288] | 54 | }
|
---|
[970] | 55 | #endif
|
---|