winegstreamer: Move the "flip" field to struct wg_parser_stream.
[wine/zf.git] / dlls / fusion / fusionpriv.h
blob22de4ca7846ff1cd1388861c2b18d302bfd9c51f
1 /*
2 * fusion private definitions
4 * Copyright 2008 James Hawkins
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_FUSION_PRIVATE__
22 #define __WINE_FUSION_PRIVATE__
24 #include <stdarg.h>
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "winver.h"
30 #include "wine/heap.h"
32 #include <pshpack1.h>
34 typedef struct
36 ULONG Signature;
37 USHORT MajorVersion;
38 USHORT MinorVersion;
39 ULONG Reserved;
40 ULONG VersionLength;
41 LPSTR Version;
42 BYTE Flags;
43 WORD Streams;
44 } METADATAHDR;
46 typedef struct
48 DWORD Offset;
49 DWORD Size;
50 } METADATASTREAMHDR;
52 typedef struct
54 DWORD Reserved1;
55 BYTE MajorVersion;
56 BYTE MinorVersion;
57 BYTE HeapOffsetSizes;
58 BYTE Reserved2;
59 LARGE_INTEGER MaskValid;
60 LARGE_INTEGER MaskSorted;
61 } METADATATABLESHDR;
63 typedef struct
65 WORD Generation;
66 WORD Name;
67 WORD Mvid;
68 WORD EncId;
69 WORD EncBaseId;
70 } MODULETABLE;
72 typedef struct
74 DWORD Flags;
75 WORD Name;
76 WORD Namespace;
77 WORD Extends;
78 WORD FieldList;
79 WORD MethodList;
80 } TYPEDEFTABLE;
82 typedef struct
84 WORD ResolutionScope;
85 WORD Name;
86 WORD Namespace;
87 } TYPEREFTABLE;
89 typedef struct
91 WORD Flags;
92 WORD Name;
93 WORD Signature;
94 } FIELDTABLE;
96 typedef struct
98 DWORD HashAlgId;
99 WORD MajorVersion;
100 WORD MinorVersion;
101 WORD BuildNumber;
102 WORD RevisionNumber;
103 DWORD Flags;
104 WORD PublicKey;
105 WORD Name;
106 WORD Culture;
107 } ASSEMBLYTABLE;
109 typedef struct
111 DWORD Offset;
112 DWORD Flags;
113 WORD Name;
114 WORD Implementation;
115 } MANIFESTRESTABLE;
117 typedef struct
119 DWORD RVA;
120 WORD ImplFlags;
121 WORD Flags;
122 WORD Name;
123 WORD Signature;
124 WORD ParamList;
125 } METHODDEFTABLE;
127 typedef struct
129 WORD Flags;
130 WORD Sequence;
131 WORD Name;
132 } PARAMTABLE;
134 typedef struct
136 WORD Class;
137 WORD Interface;
138 } INTERFACEIMPLTABLE;
140 typedef struct
142 WORD Class;
143 WORD Name;
144 WORD Signature;
145 } MEMBERREFTABLE;
147 typedef struct
149 BYTE Type;
150 BYTE Reserved;
151 WORD Parent;
152 WORD Value;
153 } CONSTANTTABLE;
155 typedef struct
157 WORD Parent;
158 WORD Type;
159 WORD Value;
160 } CUSTOMATTRIBUTETABLE;
162 typedef struct
164 WORD Parent;
165 WORD NativeType;
166 } FIELDMARSHALTABLE;
168 typedef struct
170 WORD Action;
171 WORD Parent;
172 WORD PermissionSet;
173 } DECLSECURITYTABLE;
175 typedef struct
177 WORD PackingSize;
178 DWORD ClassSize;
179 WORD Parent;
180 } CLASSLAYOUTTABLE;
182 typedef struct
184 DWORD Offset;
185 WORD Field;
186 } FIELDLAYOUTTABLE;
188 typedef struct
190 WORD Signature;
191 } STANDALONESIGTABLE;
193 typedef struct
195 WORD Parent;
196 WORD EventList;
197 } EVENTMAPTABLE;
199 typedef struct
201 WORD EventFlags;
202 WORD Name;
203 WORD EventType;
204 } EVENTTABLE;
206 typedef struct
208 WORD Parent;
209 WORD PropertyList;
210 } PROPERTYMAPTABLE;
212 typedef struct
214 WORD Flags;
215 WORD Name;
216 WORD Type;
217 } PROPERTYTABLE;
219 typedef struct
221 WORD Semantics;
222 WORD Method;
223 WORD Association;
224 } METHODSEMANTICSTABLE;
226 typedef struct
228 WORD Class;
229 WORD MethodBody;
230 WORD MethodDeclaration;
231 } METHODIMPLTABLE;
233 typedef struct
235 WORD Name;
236 } MODULEREFTABLE;
238 typedef struct
240 WORD Signature;
241 } TYPESPECTABLE;
243 typedef struct
245 WORD MappingFlags;
246 WORD MemberForwarded;
247 WORD ImportName;
248 WORD ImportScope;
249 } IMPLMAPTABLE;
251 typedef struct
253 DWORD RVA;
254 WORD Field;
255 } FIELDRVATABLE;
257 typedef struct
259 DWORD Processor;
260 } ASSEMBLYPROCESSORTABLE;
262 typedef struct
264 DWORD OSPlatformID;
265 DWORD OSMajorVersion;
266 DWORD OSMinorVersion;
267 } ASSEMBLYOSTABLE;
269 typedef struct
271 WORD MajorVersion;
272 WORD MinorVersion;
273 WORD BuildNumber;
274 WORD RevisionNumber;
275 DWORD Flags;
276 WORD PublickKeyOrToken;
277 WORD Name;
278 WORD Culture;
279 WORD HashValue;
280 } ASSEMBLYREFTABLE;
282 typedef struct
284 DWORD Processor;
285 WORD AssemblyRef;
286 } ASSEMBLYREFPROCESSORTABLE;
288 typedef struct
290 DWORD OSPlatformId;
291 DWORD OSMajorVersion;
292 DWORD OSMinorVersion;
293 WORD AssemblyRef;
294 } ASSEMBLYREFOSTABLE;
296 typedef struct
298 DWORD Flags;
299 WORD Name;
300 WORD HashValue;
301 } FILETABLE;
303 typedef struct
305 DWORD Flags;
306 DWORD TypeDefId;
307 WORD TypeName;
308 WORD TypeNameSpace;
309 WORD Implementation;
310 } EXPORTEDTYPETABLE;
312 typedef struct
314 WORD NestedClass;
315 WORD EnclosingClass;
316 } NESTEDCLASSTABLE;
318 typedef struct
320 WORD Number;
321 WORD Flags;
322 } GENERICPARAMTABLE;
324 typedef struct
326 WORD MethodDef;
327 WORD Instantiation;
328 } METHODSPECTABLE;
330 typedef struct
332 WORD Owner;
333 WORD Constraint;
334 } GENERICPARAMCONSTRAINTTABLE;
336 typedef struct
338 DWORD ImportLookupTable;
339 DWORD DateTimeStamp;
340 DWORD ForwarderChain;
341 DWORD Name;
342 DWORD ImportAddressTable;
343 BYTE pad[20];
344 } IMPORTTABLE;
346 typedef struct
348 DWORD HintNameTableRVA;
349 BYTE pad[8];
350 } IMPORTLOOKUPTABLE;
352 typedef struct
354 WORD Hint;
355 BYTE Name[12];
356 BYTE Module[12];
357 DWORD Reserved;
358 WORD EntryPoint;
359 DWORD RVA;
360 } HINTNAMETABLE;
362 typedef struct
364 DWORD PageRVA;
365 DWORD Size;
366 DWORD Relocation;
367 } RELOCATION;
369 typedef struct
371 WORD wLength;
372 WORD wValueLength;
373 WORD wType;
374 WCHAR szKey[17];
375 VS_FIXEDFILEINFO Value;
376 } VS_VERSIONINFO;
378 typedef struct
380 WORD wLength;
381 WORD wValueLength;
382 WORD wType;
383 WCHAR szKey[13];
384 } VARFILEINFO;
386 typedef struct
388 WORD wLength;
389 WORD wValueLength;
390 WORD wType;
391 WCHAR szKey[13];
392 DWORD Value;
393 } VAR;
395 typedef struct
397 WORD wLength;
398 WORD wValueLength;
399 WORD wType;
400 WCHAR szKey[15];
401 } STRINGFILEINFO;
403 typedef struct
405 WORD wLength;
406 WORD wValueLength;
407 WORD wType;
408 WCHAR szKey[9];
409 } STRINGTABLE;
411 typedef struct
413 WORD wLength;
414 WORD wValueLength;
415 WORD wType;
416 } STRINGHDR;
418 typedef struct
420 DWORD Size;
421 DWORD Signature;
422 DWORD HeaderVersion;
423 DWORD SkipData;
424 BYTE Data[168];
425 } RESOURCE;
427 #include <poppack.h>
429 struct tagASSEMBLY;
430 typedef struct tagASSEMBLY ASSEMBLY;
432 HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file) DECLSPEC_HIDDEN;
433 HRESULT assembly_release(ASSEMBLY *assembly) DECLSPEC_HIDDEN;
434 HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name) DECLSPEC_HIDDEN;
435 HRESULT assembly_get_path(const ASSEMBLY *assembly, LPWSTR *path) DECLSPEC_HIDDEN;
436 HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version) DECLSPEC_HIDDEN;
437 PEKIND assembly_get_architecture(ASSEMBLY *assembly) DECLSPEC_HIDDEN;
438 HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token) DECLSPEC_HIDDEN;
439 HRESULT assembly_get_runtime_version(ASSEMBLY *assembly, LPSTR *version) DECLSPEC_HIDDEN;
440 HRESULT assembly_get_external_files(ASSEMBLY *assembly, LPWSTR **files, DWORD *count) DECLSPEC_HIDDEN;
442 extern HRESULT IAssemblyName_SetPath(IAssemblyName *iface, LPCWSTR path) DECLSPEC_HIDDEN;
443 extern HRESULT IAssemblyName_GetPath(IAssemblyName *iface, LPWSTR buf, ULONG *len) DECLSPEC_HIDDEN;
445 static inline LPWSTR strdupW(LPCWSTR src)
447 LPWSTR dest;
449 if (!src)
450 return NULL;
452 if ((dest = heap_alloc((lstrlenW(src) + 1) * sizeof(WCHAR))))
453 lstrcpyW(dest, src);
455 return dest;
458 #define BYTES_PER_TOKEN 8
459 #define CHARS_PER_BYTE 2
460 #define TOKEN_LENGTH (BYTES_PER_TOKEN * CHARS_PER_BYTE + 1)
462 static inline void token_to_str(BYTE *bytes, LPWSTR str)
464 DWORD i;
466 static const WCHAR hexval[] = {
467 '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'
470 for(i = 0; i < BYTES_PER_TOKEN; i++)
472 str[i * 2] = hexval[((bytes[i] >> 4) & 0xF)];
473 str[i * 2 + 1] = hexval[(bytes[i]) & 0x0F];
475 str[i * 2] = 0;
478 #endif /* __WINE_FUSION_PRIVATE__ */