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