Mercurial > mplayer.hg
annotate loader/wine/module.h @ 30533:e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
import_playtree_playlist_into_gui; declare them in interface.h instead.
author | diego |
---|---|
date | Sun, 14 Feb 2010 13:49:31 +0000 |
parents | 0f1b5b68af32 |
children |
rev | line source |
---|---|
1 | 1 /* |
2 * Module definitions | |
3 * | |
4 * Copyright 1995 Alexandre Julliard | |
5 */ | |
6 | |
26045 | 7 #ifndef MPLAYER_MODULE_H |
8 #define MPLAYER_MODULE_H | |
1 | 9 |
10 #include "windef.h" | |
11 #include "pe_image.h" | |
12 | |
13 | |
24406 | 14 typedef struct { |
1 | 15 BYTE type; |
16 BYTE flags; | |
17 BYTE segnum; | |
24406 | 18 WORD offs WINE_PACKED; |
1 | 19 } ET_ENTRY; |
20 | |
21 typedef struct { | |
22 WORD first; /* ordinal */ | |
23 WORD last; /* ordinal */ | |
24 WORD next; /* bundle */ | |
25 } ET_BUNDLE; | |
26 | |
27 | |
28 /* In-memory segment table */ | |
29 typedef struct | |
30 { | |
31 WORD filepos; /* Position in file, in sectors */ | |
32 WORD size; /* Segment size on disk */ | |
33 WORD flags; /* Segment flags */ | |
34 WORD minsize; /* Min. size of segment in memory */ | |
35 HANDLE16 hSeg; /* Selector or handle (selector - 1) */ | |
36 /* of segment in memory */ | |
37 } SEGTABLEENTRY; | |
38 | |
39 | |
40 /* Self-loading modules contain this structure in their first segment */ | |
41 | |
42 #include "pshpack1.h" | |
43 | |
44 typedef struct | |
45 { | |
46 WORD version; /* Must be "A0" (0x3041) */ | |
47 WORD reserved; | |
48 FARPROC16 BootApp; /* startup procedure */ | |
49 FARPROC16 LoadAppSeg; /* procedure to load a segment */ | |
50 FARPROC16 reserved2; | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28051
diff
changeset
|
51 FARPROC16 MyAlloc; /* memory allocation procedure, |
1 | 52 * wine must write this field */ |
53 FARPROC16 EntryAddrProc; | |
54 FARPROC16 ExitProc; /* exit procedure */ | |
55 WORD reserved3[4]; | |
56 FARPROC16 SetOwner; /* Set Owner procedure, exported by wine */ | |
57 } SELFLOADHEADER; | |
58 | |
59 /* Parameters for LoadModule() */ | |
24406 | 60 typedef struct |
1 | 61 { |
62 HGLOBAL16 hEnvironment; /* Environment segment */ | |
24406 | 63 SEGPTR cmdLine WINE_PACKED; /* Command-line */ |
64 SEGPTR showCmd WINE_PACKED; /* Code for ShowWindow() */ | |
65 SEGPTR reserved WINE_PACKED; | |
1 | 66 } LOADPARAMS16; |
67 | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28051
diff
changeset
|
68 typedef struct |
1 | 69 { |
70 LPSTR lpEnvAddress; | |
71 LPSTR lpCmdLine; | |
72 UINT16 *lpCmdShow; | |
73 DWORD dwReserved; | |
74 } LOADPARAMS; | |
75 | |
76 #include "poppack.h" | |
77 | |
78 /* internal representation of 32bit modules. per process. */ | |
79 typedef enum { | |
80 MODULE32_PE = 1, | |
81 MODULE32_ELF, | |
82 MODULE32_ELFDLL | |
83 } MODULE32_TYPE; | |
84 | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
85 typedef struct wine_modref |
1 | 86 { |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
87 struct wine_modref *next; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
88 struct wine_modref *prev; |
1 | 89 MODULE32_TYPE type; |
90 union { | |
91 PE_MODREF pe; | |
92 ELF_MODREF elf; | |
93 } binfmt; | |
94 | |
95 HMODULE module; | |
96 | |
97 int nDeps; | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
98 struct wine_modref **deps; |
1 | 99 |
100 int flags; | |
101 int refCount; | |
102 | |
103 char *filename; | |
104 char *modname; | |
105 char *short_filename; | |
106 char *short_modname; | |
107 } WINE_MODREF; | |
108 | |
109 #define WINE_MODREF_INTERNAL 0x00000001 | |
110 #define WINE_MODREF_NO_DLL_CALLS 0x00000002 | |
111 #define WINE_MODREF_PROCESS_ATTACHED 0x00000004 | |
112 #define WINE_MODREF_LOAD_AS_DATAFILE 0x00000010 | |
113 #define WINE_MODREF_DONT_RESOLVE_REFS 0x00000020 | |
114 #define WINE_MODREF_MARKER 0x80000000 | |
115 | |
116 | |
117 | |
118 /* Resource types */ | |
119 typedef struct resource_typeinfo_s NE_TYPEINFO; | |
120 typedef struct resource_nameinfo_s NE_NAMEINFO; | |
121 | |
122 #define NE_SEG_TABLE(pModule) \ | |
123 ((SEGTABLEENTRY *)((char *)(pModule) + (pModule)->seg_table)) | |
124 | |
125 #define NE_MODULE_TABLE(pModule) \ | |
126 ((WORD *)((char *)(pModule) + (pModule)->modref_table)) | |
127 | |
128 #define NE_MODULE_NAME(pModule) \ | |
129 (((OFSTRUCT *)((char*)(pModule) + (pModule)->fileinfo))->szPathName) | |
130 | |
7386 | 131 struct modref_list_t; |
132 | |
133 typedef struct modref_list_t | |
134 { | |
135 WINE_MODREF* wm; | |
136 struct modref_list_t *next; | |
137 struct modref_list_t *prev; | |
138 } modref_list; | |
139 | |
140 | |
1 | 141 /* module.c */ |
28051 | 142 FARPROC MODULE_GetProcAddress( HMODULE hModule, LPCSTR function, WIN_BOOL snoop ); |
143 WINE_MODREF *MODULE32_LookupHMODULE( HMODULE hModule ); | |
144 WINE_MODREF *MODULE_FindModule( LPCSTR path ); | |
1 | 145 |
146 /* resource.c */ | |
28051 | 147 INT WINAPI AccessResource( HMODULE, HRSRC ); |
1 | 148 |
26045 | 149 #endif /* MPLAYER_MODULE_H */ |