source: trunk/include/win/flatthunk.h@ 4

Last change on this file since 4 was 4, checked in by ktk, 26 years ago

Import

File size: 3.5 KB
Line 
1/* $Id: flatthunk.h,v 1.1 1999-05-24 20:19:12 ktk Exp $ */
2
3/*
4 * Win95 Flat Thunk data structures
5 *
6 * Copyright 1998 Ulrich Weigand
7 */
8
9#ifndef __WINE_FLATTHUNK_H
10#define __WINE_FLATTHUNK_H
11
12struct ThunkDataCommon
13{
14 char magic[4]; /* 00 */
15 DWORD checksum; /* 04 */
16};
17
18struct ThunkDataLS16
19{
20 struct ThunkDataCommon common; /* 00 */
21 SEGPTR targetTable; /* 08 */
22 DWORD firstTime; /* 0C */
23};
24
25struct ThunkDataLS32
26{
27 struct ThunkDataCommon common; /* 00 */
28 DWORD * targetTable; /* 08 */
29 char lateBinding[4]; /* 0C */
30 DWORD flags; /* 10 */
31 DWORD reserved1; /* 14 */
32 DWORD reserved2; /* 18 */
33 DWORD offsetQTThunk; /* 1C */
34 DWORD offsetFTProlog; /* 20 */
35};
36
37struct ThunkDataSL16
38{
39 struct ThunkDataCommon common; /* 00 */
40 DWORD flags1; /* 08 */
41 DWORD reserved1; /* 0C */
42 struct ThunkDataSL * fpData; /* 10 */
43 SEGPTR spData; /* 14 */
44 DWORD reserved2; /* 18 */
45 char lateBinding[4]; /* 1C */
46 DWORD flags2; /* 20 */
47 DWORD reserved3; /* 20 */
48 SEGPTR apiDatabase; /* 28 */
49};
50
51struct ThunkDataSL32
52{
53 struct ThunkDataCommon common; /* 00 */
54 DWORD reserved1; /* 08 */
55 struct ThunkDataSL * data; /* 0C */
56 char lateBinding[4]; /* 10 */
57 DWORD flags; /* 14 */
58 DWORD reserved2; /* 18 */
59 DWORD reserved3; /* 1C */
60 DWORD offsetTargetTable; /* 20 */
61};
62
63struct ThunkDataSL
64{
65#if 0
66 This structure differs from the Win95 original,
67 but this should not matter since it is strictly internal to
68 the thunk handling routines in KRNL386 / KERNEL32.
69
70 For reference, here is the Win95 layout:
71
72 struct ThunkDataCommon common; /* 00 */
73 DWORD flags1; /* 08 */
74 SEGPTR apiDatabase; /* 0C */
75 WORD exePtr; /* 10 */
76 WORD segMBA; /* 12 */
77 DWORD lenMBATotal; /* 14 */
78 DWORD lenMBAUsed; /* 18 */
79 DWORD flags2; /* 1C */
80 char pszDll16[256]; /* 20 */
81 char pszDll32[256]; /*120 */
82
83 We do it differently since all our thunk handling is done
84 by 32-bit code. Therefore we do not need do provide
85 easy access to this data, especially the process target
86 table database, for 16-bit code.
87#endif
88
89 struct ThunkDataCommon common;
90 DWORD flags1;
91 struct SLApiDB * apiDB;
92 struct SLTargetDB * targetDB;
93 DWORD flags2;
94 char pszDll16[256];
95 char pszDll32[256];
96};
97
98struct SLTargetDB
99{
100 struct SLTargetDB * next;
101 PDB * process;
102 DWORD * targetTable;
103};
104
105struct SLApiDB
106{
107 DWORD nrArgBytes;
108 DWORD errorReturnValue;
109};
110
111
112#endif /* __WINE_FLATTHUNK_H */
113
Note: See TracBrowser for help on using the repository browser.