source: trunk/include/odinlx.h@ 4927

Last change on this file since 4927 was 3991, checked in by sandervl, 25 years ago

header update

File size: 2.4 KB
Line 
1/* $Id: odinlx.h,v 1.5 2000-08-11 10:54:20 sandervl Exp $ */
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
16#include <win\peexe.h>
17#include <versionos2.h>
18
19typedef ULONG (* WIN32API WIN32DLLENTRY)(ULONG hInstance, ULONG reason, LPVOID reserved);
20typedef 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
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//
34//Returns: Odin32 module handle
35//******************************************************************************
36DWORD 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);
41
42//******************************************************************************
43//Destroy LX Dll object
44//******************************************************************************
45BOOL WIN32API UnregisterLxDll(HINSTANCE hInstance);
46
47//******************************************************************************
48//Create LX Exe object and call entrypoint
49//System dlls set EntryPoint to 0
50//******************************************************************************
51BOOL WIN32API RegisterLxExe(WINMAIN EntryPoint, PVOID pResData);
52
53#ifdef __cplusplus
54extern "C" {
55#endif
56
57void OS2SetExceptionHandler(void *exceptframe);
58void OS2UnsetExceptionHandler(void *exceptframe);
59
60#ifdef __cplusplus
61}
62#endif
63
64#endif
Note: See TracBrowser for help on using the repository browser.