oleaut32: Convert CustData to use standard linked lists.
[wine.git] / dlls / fusion / fusionpriv.h
blobc114cd4b6bcee5b4dfc2e9399bcd9778dc1d50bd
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"
31 #include <pshpack1.h>
33 typedef struct
35 ULONG Signature;
36 USHORT MajorVersion;
37 USHORT MinorVersion;
38 ULONG Reserved;
39 ULONG VersionLength;
40 LPSTR Version;
41 BYTE Flags;
42 WORD Streams;
43 } METADATAHDR;
45 typedef struct
47 DWORD Offset;
48 DWORD Size;
49 } METADATASTREAMHDR;
51 typedef struct
53 DWORD Reserved1;
54 BYTE MajorVersion;
55 BYTE MinorVersion;
56 BYTE HeapOffsetSizes;
57 BYTE Reserved2;
58 LARGE_INTEGER MaskValid;
59 LARGE_INTEGER MaskSorted;
60 } METADATATABLESHDR;
62 typedef struct
64 WORD Generation;
65 WORD Name;
66 WORD Mvid;
67 WORD EncId;
68 WORD EncBaseId;
69 } MODULETABLE;
71 typedef struct
73 DWORD Flags;
74 WORD Name;
75 WORD Namespace;
76 WORD Extends;
77 WORD FieldList;
78 WORD MethodList;
79 } TYPEDEFTABLE;
81 typedef struct
83 WORD ResolutionScope;
84 WORD Name;
85 WORD Namespace;
86 } TYPEREFTABLE;
88 typedef struct
90 WORD Flags;
91 WORD Name;
92 WORD Signature;
93 } FIELDTABLE;
95 typedef struct
97 DWORD HashAlgId;
98 WORD MajorVersion;
99 WORD MinorVersion;
100 WORD BuildNumber;
101 WORD RevisionNumber;
102 DWORD Flags;
103 WORD PublicKey;
104 WORD Name;
105 WORD Culture;
106 } ASSEMBLYTABLE;
108 typedef struct
110 DWORD Offset;
111 DWORD Flags;
112 WORD Name;
113 WORD Implementation;
114 } MANIFESTRESTABLE;
116 typedef struct
118 DWORD RVA;
119 WORD ImplFlags;
120 WORD Flags;
121 WORD Name;
122 WORD Signature;
123 WORD ParamList;
124 } METHODDEFTABLE;
126 typedef struct
128 WORD Flags;
129 WORD Sequence;
130 WORD Name;
131 } PARAMTABLE;
133 typedef struct
135 WORD Class;
136 WORD Interface;
137 } INTERFACEIMPLTABLE;
139 typedef struct
141 WORD Class;
142 WORD Name;
143 WORD Signature;
144 } MEMBERREFTABLE;
146 typedef struct
148 BYTE Type;
149 BYTE Reserved;
150 WORD Parent;
151 WORD Value;
152 } CONSTANTTABLE;
154 typedef struct
156 WORD Parent;
157 WORD Type;
158 WORD Value;
159 } CUSTOMATTRIBUTETABLE;
161 typedef struct
163 WORD Parent;
164 WORD NativeType;
165 } FIELDMARSHALTABLE;
167 typedef struct
169 WORD Action;
170 WORD Parent;
171 WORD PermissionSet;
172 } DECLSECURITYTABLE;
174 typedef struct
176 WORD PackingSize;
177 DWORD ClassSize;
178 WORD Parent;
179 } CLASSLAYOUTTABLE;
181 typedef struct
183 DWORD Offset;
184 WORD Field;
185 } FIELDLAYOUTTABLE;
187 typedef struct
189 WORD Signature;
190 } STANDALONESIGTABLE;
192 typedef struct
194 WORD Parent;
195 WORD EventList;
196 } EVENTMAPTABLE;
198 typedef struct
200 WORD EventFlags;
201 WORD Name;
202 WORD EventType;
203 } EVENTTABLE;
205 typedef struct
207 WORD Parent;
208 WORD PropertyList;
209 } PROPERTYMAPTABLE;
211 typedef struct
213 WORD Flags;
214 WORD Name;
215 WORD Type;
216 } PROPERTYTABLE;
218 typedef struct
220 WORD Semantics;
221 WORD Method;
222 WORD Association;
223 } METHODSEMANTICSTABLE;
225 typedef struct
227 WORD Class;
228 WORD MethodBody;
229 WORD MethodDeclaration;
230 } METHODIMPLTABLE;
232 typedef struct
234 WORD Name;
235 } MODULEREFTABLE;
237 typedef struct
239 WORD Signature;
240 } TYPESPECTABLE;
242 typedef struct
244 WORD MappingFlags;
245 WORD MemberForwarded;
246 WORD ImportName;
247 WORD ImportScope;
248 } IMPLMAPTABLE;
250 typedef struct
252 DWORD RVA;
253 WORD Field;
254 } FIELDRVATABLE;
256 typedef struct
258 DWORD Processor;
259 } ASSEMBLYPROCESSORTABLE;
261 typedef struct
263 DWORD OSPlatformID;
264 DWORD OSMajorVersion;
265 DWORD OSMinorVersion;
266 } ASSEMBLYOSTABLE;
268 typedef struct
270 WORD MajorVersion;
271 WORD MinorVersion;
272 WORD BuildNumber;
273 WORD RevisionNumber;
274 DWORD Flags;
275 WORD PublickKeyOrToken;
276 WORD Name;
277 WORD Culture;
278 WORD HashValue;
279 } ASSEMBLYREFTABLE;
281 typedef struct
283 DWORD Processor;
284 WORD AssemblyRef;
285 } ASSEMBLYREFPROCESSORTABLE;
287 typedef struct
289 DWORD OSPlatformId;
290 DWORD OSMajorVersion;
291 DWORD OSMinorVersion;
292 WORD AssemblyRef;
293 } ASSEMBLYREFOSTABLE;
295 typedef struct
297 DWORD Flags;
298 WORD Name;
299 WORD HashValue;
300 } FILETABLE;
302 typedef struct
304 DWORD Flags;
305 DWORD TypeDefId;
306 WORD TypeName;
307 WORD TypeNameSpace;
308 WORD Implementation;
309 } EXPORTEDTYPETABLE;
311 typedef struct
313 WORD NestedClass;
314 WORD EnclosingClass;
315 } NESTEDCLASSTABLE;
317 typedef struct
319 WORD Number;
320 WORD Flags;
321 } GENERICPARAMTABLE;
323 typedef struct
325 WORD MethodDef;
326 WORD Instantiation;
327 } METHODSPECTABLE;
329 typedef struct
331 WORD Owner;
332 WORD Constraint;
333 } GENERICPARAMCONSTRAINTTABLE;
335 typedef struct
337 DWORD ImportLookupTable;
338 DWORD DateTimeStamp;
339 DWORD ForwarderChain;
340 DWORD Name;
341 DWORD ImportAddressTable;
342 BYTE pad[20];
343 } IMPORTTABLE;
345 typedef struct
347 DWORD HintNameTableRVA;
348 BYTE pad[8];
349 } IMPORTLOOKUPTABLE;
351 typedef struct
353 WORD Hint;
354 BYTE Name[12];
355 BYTE Module[12];
356 DWORD Reserved;
357 WORD EntryPoint;
358 DWORD RVA;
359 } HINTNAMETABLE;
361 typedef struct
363 DWORD PageRVA;
364 DWORD Size;
365 DWORD Relocation;
366 } RELOCATION;
368 typedef struct
370 WORD wLength;
371 WORD wValueLength;
372 WORD wType;
373 WCHAR szKey[17];
374 VS_FIXEDFILEINFO Value;
375 } VS_VERSIONINFO;
377 typedef struct
379 WORD wLength;
380 WORD wValueLength;
381 WORD wType;
382 WCHAR szKey[13];
383 } VARFILEINFO;
385 typedef struct
387 WORD wLength;
388 WORD wValueLength;
389 WORD wType;
390 WCHAR szKey[13];
391 DWORD Value;
392 } VAR;
394 typedef struct
396 WORD wLength;
397 WORD wValueLength;
398 WORD wType;
399 WCHAR szKey[15];
400 } STRINGFILEINFO;
402 typedef struct
404 WORD wLength;
405 WORD wValueLength;
406 WORD wType;
407 WCHAR szKey[9];
408 } STRINGTABLE;
410 typedef struct
412 WORD wLength;
413 WORD wValueLength;
414 WORD wType;
415 } STRINGHDR;
417 typedef struct
419 DWORD Size;
420 DWORD Signature;
421 DWORD HeaderVersion;
422 DWORD SkipData;
423 BYTE Data[168];
424 } RESOURCE;
426 #include <poppack.h>
428 struct tagASSEMBLY;
429 typedef struct tagASSEMBLY ASSEMBLY;
431 HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file);
432 HRESULT assembly_release(ASSEMBLY *assembly);
433 HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name);
434 HRESULT assembly_get_path(const ASSEMBLY *assembly, LPWSTR *path);
435 HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version);
436 BYTE assembly_get_architecture(ASSEMBLY *assembly);
437 HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token);
439 extern HRESULT IAssemblyName_SetPath(IAssemblyName *iface, LPCWSTR path);
440 extern HRESULT IAssemblyName_GetPath(IAssemblyName *iface, LPWSTR buf, ULONG *len);
442 static inline LPWSTR strdupW(LPCWSTR src)
444 LPWSTR dest;
446 if (!src)
447 return NULL;
449 dest = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(src) + 1) * sizeof(WCHAR));
450 if (dest)
451 lstrcpyW(dest, src);
453 return dest;
456 #define BYTES_PER_TOKEN 8
457 #define CHARS_PER_BYTE 2
458 #define TOKEN_LENGTH (BYTES_PER_TOKEN * CHARS_PER_BYTE + 1)
460 static inline void token_to_str(BYTE *bytes, LPWSTR str)
462 DWORD i;
464 static const WCHAR hexval[16] = {
465 '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'
468 for(i = 0; i < BYTES_PER_TOKEN; i++)
470 str[i * 2] = hexval[((bytes[i] >> 4) & 0xF)];
471 str[i * 2 + 1] = hexval[(bytes[i]) & 0x0F];
473 str[i * 2] = 0;
476 #endif /* __WINE_FUSION_PRIVATE__ */