source: trunk/include/odinlx.h@ 21393

Last change on this file since 21393 was 21393, checked in by dmik, 15 years ago

Fixed: RegisterLxDll() and friends are extern C.

File size: 3.4 KB
RevLine 
[10383]1/* $Id: odinlx.h,v 1.10 2004-01-12 09:53:28 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
[7797]19#define ORDINAL_REGISTERLXDLL 1238
20#define ORDINAL_UNREGISTERLXDLL 1239
21#define ORDINAL_REGISTERLXEXE 1237
22#define ORDINAL_REGISTERDUMMYEXE 1249
23
[9730]24#ifdef __cplusplus
[5288]25extern "C" {
[9730]26#endif
[5288]27
[953]28typedef ULONG (* WIN32API WIN32DLLENTRY)(ULONG hInstance, ULONG reason, LPVOID reserved);
29typedef int (* WIN32API WINMAIN)(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);
30
[9730]31#ifdef __cplusplus
32
[953]33//******************************************************************************
34//Create LX Dll object and send process attach message
35//System dlls set EntryPoint to 0
[3991]36//Parameters:
[5288]37// HINSTANCE hInstance - OS/2 module handle
[3991]38// WIN32DLLENTRY EntryPoint - Win32 dll entrypoint address
39// PVOID pResData - pointer to win32 resource data
40// DWORD MajorImageVersion - major image/os version (for fake win32 header)
41// DWORD MinorImageVersion - minor image/os version (for fake win32 header)
42// DWORD Subsystem - subsystem type (for fake win32 header)
43// (IMAGE_SUBSYSTEM_WINDOWS_CUI/IMAGE_SUBSYSTEM_WINDOWS_GUI/IMAGE_SUBSYSTEM_WINDOWS_NATIVE)
44//
[1420]45//Returns: Odin32 module handle
[953]46//******************************************************************************
[5288]47DWORD WIN32API RegisterLxDll(HINSTANCE hInstance, WIN32DLLENTRY EntryPoint,
48 PVOID pResData,
49 DWORD MajorImageVersion = ODINNT_MAJOR_VERSION,
[3991]50 DWORD MinorImageVersion = ODINNT_MINOR_VERSION,
51 DWORD Subsystem = IMAGE_SUBSYSTEM_WINDOWS_CUI);
[9730]52#else
[953]53
[9730]54DWORD WIN32API RegisterLxDll(HINSTANCE hInstance, WIN32DLLENTRY EntryPoint,
55 PVOID pResData,
56 DWORD MajorImageVersion,
57 DWORD MinorImageVersion,
58 DWORD Subsystem) ;
59
60#endif
61
[953]62//******************************************************************************
63//Destroy LX Dll object
64//******************************************************************************
65BOOL WIN32API UnregisterLxDll(HINSTANCE hInstance);
66
67//******************************************************************************
68//Create LX Exe object and call entrypoint
69//System dlls set EntryPoint to 0
70//******************************************************************************
[978]71BOOL WIN32API RegisterLxExe(WINMAIN EntryPoint, PVOID pResData);
[7797]72
73//******************************************************************************
74//Create Dummy Exe object
75//******************************************************************************
76BOOL WIN32API RegisterDummyExe(LPSTR pszExeName);
[10383]77BOOL WIN32API IsDummyExeLoaded();
[7797]78
[21381]79//******************************************************************************
80//Enable SEH (structured exception handling) support. This call is necessary
81//for the __try/__except statement to work correctly. Must be called before
82// RegisterLxDll()/RegisterLxExe().
83//******************************************************************************
84VOID WIN32API EnableSEH();
85
[21393]86#ifdef __cplusplus
87}
[970]88#endif
[21393]89
90#endif
Note: See TracBrowser for help on using the repository browser.