source: trunk/include/odinlx.h@ 8706

Last change on this file since 8706 was 7797, checked in by sandervl, 24 years ago

added dummy exe class

File size: 2.6 KB
Line 
1/* $Id: odinlx.h,v 1.8 2002-02-03 13:15:40 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
19#define ORDINAL_REGISTERLXDLL 1238
20#define ORDINAL_UNREGISTERLXDLL 1239
21#define ORDINAL_REGISTERLXEXE 1237
22#define ORDINAL_REGISTERDUMMYEXE 1249
23
24extern "C" {
25
26typedef ULONG (* WIN32API WIN32DLLENTRY)(ULONG hInstance, ULONG reason, LPVOID reserved);
27typedef int (* WIN32API WINMAIN)(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);
28
29//******************************************************************************
30//Create LX Dll object and send process attach message
31//System dlls set EntryPoint to 0
32//Parameters:
33// HINSTANCE hInstance - OS/2 module handle
34// WIN32DLLENTRY EntryPoint - Win32 dll entrypoint address
35// PVOID pResData - pointer to win32 resource data
36// DWORD MajorImageVersion - major image/os version (for fake win32 header)
37// DWORD MinorImageVersion - minor image/os version (for fake win32 header)
38// DWORD Subsystem - subsystem type (for fake win32 header)
39// (IMAGE_SUBSYSTEM_WINDOWS_CUI/IMAGE_SUBSYSTEM_WINDOWS_GUI/IMAGE_SUBSYSTEM_WINDOWS_NATIVE)
40//
41//Returns: Odin32 module handle
42//******************************************************************************
43DWORD WIN32API RegisterLxDll(HINSTANCE hInstance, WIN32DLLENTRY EntryPoint,
44 PVOID pResData,
45 DWORD MajorImageVersion = ODINNT_MAJOR_VERSION,
46 DWORD MinorImageVersion = ODINNT_MINOR_VERSION,
47 DWORD Subsystem = IMAGE_SUBSYSTEM_WINDOWS_CUI);
48
49//******************************************************************************
50//Destroy LX Dll object
51//******************************************************************************
52BOOL WIN32API UnregisterLxDll(HINSTANCE hInstance);
53
54//******************************************************************************
55//Create LX Exe object and call entrypoint
56//System dlls set EntryPoint to 0
57//******************************************************************************
58BOOL WIN32API RegisterLxExe(WINMAIN EntryPoint, PVOID pResData);
59
60
61//******************************************************************************
62//Create Dummy Exe object
63//******************************************************************************
64BOOL WIN32API RegisterDummyExe(LPSTR pszExeName);
65
66}
67#endif
Note: See TracBrowser for help on using the repository browser.