source: trunk/include/odinlx.h@ 6552

Last change on this file since 6552 was 5288, checked in by mike, 24 years ago

Changes/fixes/updates for building with Watcom

File size: 2.2 KB
Line 
1/* $Id: odinlx.h,v 1.7 2001-03-06 21:44:39 mike 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
19extern "C" {
20
21typedef ULONG (* WIN32API WIN32DLLENTRY)(ULONG hInstance, ULONG reason, LPVOID reserved);
22typedef 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
27//Parameters:
28// HINSTANCE hInstance - OS/2 module handle
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//
36//Returns: Odin32 module handle
37//******************************************************************************
38DWORD WIN32API RegisterLxDll(HINSTANCE hInstance, WIN32DLLENTRY EntryPoint,
39 PVOID pResData,
40 DWORD MajorImageVersion = ODINNT_MAJOR_VERSION,
41 DWORD MinorImageVersion = ODINNT_MINOR_VERSION,
42 DWORD Subsystem = IMAGE_SUBSYSTEM_WINDOWS_CUI);
43
44//******************************************************************************
45//Destroy LX Dll object
46//******************************************************************************
47BOOL WIN32API UnregisterLxDll(HINSTANCE hInstance);
48
49//******************************************************************************
50//Create LX Exe object and call entrypoint
51//System dlls set EntryPoint to 0
52//******************************************************************************
53BOOL WIN32API RegisterLxExe(WINMAIN EntryPoint, PVOID pResData);
54}
55#endif
Note: See TracBrowser for help on using the repository browser.