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