Temporary hack to share handles between processes sharing the same
[wine/multimedia.git] / include / flatthunk.h
blob31ec12edd12fec84497b3cf6344cfeac80c05877
1 /*
2 * Win95 Flat Thunk data structures
4 * Copyright 1998 Ulrich Weigand
5 */
7 #ifndef __WINE_FLATTHUNK_H
8 #define __WINE_FLATTHUNK_H
10 #include "windef.h"
12 struct _PDB;
14 struct ThunkDataCommon
16 char magic[4]; /* 00 */
17 DWORD checksum; /* 04 */
20 struct ThunkDataLS16
22 struct ThunkDataCommon common; /* 00 */
23 SEGPTR targetTable; /* 08 */
24 DWORD firstTime; /* 0C */
27 struct ThunkDataLS32
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 */
39 struct ThunkDataSL16
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 */
53 struct ThunkDataSL32
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 */
65 struct ThunkDataSL
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.
72 For reference, here is the Win95 layout:
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 */
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
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];
100 struct SLTargetDB
102 struct SLTargetDB * next;
103 struct _PDB * process;
104 DWORD * targetTable;
107 struct SLApiDB
109 DWORD nrArgBytes;
110 DWORD errorReturnValue;
114 #endif /* __WINE_FLATTHUNK_H */