ReactOS  0.4.13-dev-563-g0561610
fusionpriv.h
Go to the documentation of this file.
1 /*
2  * fusion private definitions
3  *
4  * Copyright 2008 James Hawkins
5  *
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.
10  *
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.
15  *
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
19  */
20 
21 #ifndef __WINE_FUSION_PRIVATE__
22 #define __WINE_FUSION_PRIVATE__
23 
24 #include <stdarg.h>
25 
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "winver.h"
30 #include "wine/heap.h"
31 
32 #ifdef __REACTOS__
33 #include <objbase.h>
34 #include <fusion.h>
35 #endif
36 
37 #include <pshpack1.h>
38 
39 typedef struct
40 {
49 } METADATAHDR;
50 
51 typedef struct
52 {
56 
57 typedef struct
58 {
67 
68 typedef struct
69 {
75 } MODULETABLE;
76 
77 typedef struct
78 {
85 } TYPEDEFTABLE;
86 
87 typedef struct
88 {
92 } TYPEREFTABLE;
93 
94 typedef struct
95 {
99 } FIELDTABLE;
100 
101 typedef struct
102 {
112 } ASSEMBLYTABLE;
113 
114 typedef struct
115 {
121 
122 typedef struct
123 {
131 
132 typedef struct
133 {
137 } PARAMTABLE;
138 
139 typedef struct
140 {
144 
145 typedef struct
146 {
151 
152 typedef struct
153 {
158 } CONSTANTTABLE;
159 
160 typedef struct
161 {
166 
167 typedef struct
168 {
172 
173 typedef struct
174 {
179 
180 typedef struct
181 {
186 
187 typedef struct
188 {
192 
193 typedef struct
194 {
197 
198 typedef struct
199 {
202 } EVENTMAPTABLE;
203 
204 typedef struct
205 {
209 } EVENTTABLE;
210 
211 typedef struct
212 {
216 
217 typedef struct
218 {
222 } PROPERTYTABLE;
223 
224 typedef struct
225 {
230 
231 typedef struct
232 {
237 
238 typedef struct
239 {
242 
243 typedef struct
244 {
246 } TYPESPECTABLE;
247 
248 typedef struct
249 {
254 } IMPLMAPTABLE;
255 
256 typedef struct
257 {
260 } FIELDRVATABLE;
261 
262 typedef struct
263 {
266 
267 typedef struct
268 {
273 
274 typedef struct
275 {
286 
287 typedef struct
288 {
292 
293 typedef struct
294 {
300 
301 typedef struct
302 {
306 } FILETABLE;
307 
308 typedef struct
309 {
316 
317 typedef struct
318 {
322 
323 typedef struct
324 {
328 
329 typedef struct
330 {
334 
335 typedef struct
336 {
340 
341 typedef struct
342 {
348  BYTE pad[20];
349 } IMPORTTABLE;
350 
351 typedef struct
352 {
354  BYTE pad[8];
356 
357 typedef struct
358 {
360  BYTE Name[12];
361  BYTE Module[12];
365 } HINTNAMETABLE;
366 
367 typedef struct
368 {
372 } RELOCATION;
373 
374 typedef struct
375 {
379  WCHAR szKey[17];
382 
383 typedef struct
384 {
388  WCHAR szKey[13];
389 } VARFILEINFO;
390 
391 typedef struct
392 {
396  WCHAR szKey[13];
398 } VAR;
399 
400 typedef struct
401 {
405  WCHAR szKey[15];
407 
408 typedef struct
409 {
413  WCHAR szKey[9];
414 } STRINGTABLE;
415 
416 typedef struct
417 {
421 } STRINGHDR;
422 
423 typedef struct
424 {
429  BYTE Data[168];
430 } RESOURCE;
431 
432 #include <poppack.h>
433 
434 struct tagASSEMBLY;
435 typedef struct tagASSEMBLY ASSEMBLY;
436 
446 
449 
450 static inline LPWSTR strdupW(LPCWSTR src)
451 {
452  LPWSTR dest;
453 
454  if (!src)
455  return NULL;
456 
457  if ((dest = heap_alloc((lstrlenW(src) + 1) * sizeof(WCHAR))))
458  lstrcpyW(dest, src);
459 
460  return dest;
461 }
462 
463 #define BYTES_PER_TOKEN 8
464 #define CHARS_PER_BYTE 2
465 #define TOKEN_LENGTH (BYTES_PER_TOKEN * CHARS_PER_BYTE + 1)
466 
467 static inline void token_to_str(BYTE *bytes, LPWSTR str)
468 {
469  DWORD i;
470 
471  static const WCHAR hexval[] = {
472  '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'
473  };
474 
475  for(i = 0; i < BYTES_PER_TOKEN; i++)
476  {
477  str[i * 2] = hexval[((bytes[i] >> 4) & 0xF)];
478  str[i * 2 + 1] = hexval[(bytes[i]) & 0x0F];
479  }
480  str[i * 2] = 0;
481 }
482 
483 #endif /* __WINE_FUSION_PRIVATE__ */
WORD ResolutionScope
Definition: fusionpriv.h:89
WORD RevisionNumber
Definition: fusionpriv.h:107
WORD Flags
Definition: fusionpriv.h:134
static void token_to_str(BYTE *bytes, LPWSTR str)
Definition: fusionpriv.h:467
HRESULT IAssemblyName_SetPath(IAssemblyName *iface, LPCWSTR path) DECLSPEC_HIDDEN
Definition: asmname.c:521
HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file) DECLSPEC_HIDDEN
Definition: assembly.c:640
WORD EventType
Definition: fusionpriv.h:208
WORD wType
Definition: fusionpriv.h:420
DWORD HeaderVersion
Definition: fusionpriv.h:427
struct tagEVENTTABLE EVENTTABLE
DWORD OSMajorVersion
Definition: fusionpriv.h:270
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
WORD Namespace
Definition: fusionpriv.h:81
WORD wLength
Definition: fusionpriv.h:418
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
WORD Flags
Definition: fusionpriv.h:96
HRESULT assembly_release(ASSEMBLY *assembly) DECLSPEC_HIDDEN
Definition: assembly.c:693
GLuint GLuint GLsizei count
Definition: gl.h:1545
WORD wValueLength
Definition: fusionpriv.h:411
DWORD Signature
Definition: fusionpriv.h:426
WORD MethodList
Definition: fusionpriv.h:84
WORD wType
Definition: fusionpriv.h:395
WORD ImportScope
Definition: fusionpriv.h:253
char * LPSTR
Definition: xmlstorage.h:182
#define lstrlenW
Definition: compat.h:407
DWORD Size
Definition: fusionpriv.h:370
HRESULT assembly_get_path(const ASSEMBLY *assembly, LPWSTR *path) DECLSPEC_HIDDEN
Definition: assembly.c:749
WORD EncId
Definition: fusionpriv.h:73
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
WORD Sequence
Definition: fusionpriv.h:135
WORD Generation
Definition: fusionpriv.h:70
USHORT MajorVersion
Definition: fusionpriv.h:42
WORD Extends
Definition: fusionpriv.h:82
WORD EncBaseId
Definition: fusionpriv.h:74
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
LARGE_INTEGER MaskSorted
Definition: fusionpriv.h:65
HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version) DECLSPEC_HIDDEN
Definition: assembly.c:761
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
DWORD Value
Definition: fusionpriv.h:397
DWORD HashAlgId
Definition: fusionpriv.h:103
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
ULONG VersionLength
Definition: fusionpriv.h:45
HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token) DECLSPEC_HIDDEN
Definition: assembly.c:806
WORD BuildNumber
Definition: fusionpriv.h:106
const WCHAR * str
VS_FIXEDFILEINFO Value
Definition: fusionpriv.h:380
smooth NULL
Definition: ftsmooth.c:416
struct _tagVS_VERSIONINFO VS_VERSIONINFO
static const WCHAR version[]
Definition: asmname.c:64
PEKIND assembly_get_architecture(ASSEMBLY *assembly) DECLSPEC_HIDDEN
Definition: assembly.c:787
WORD Name
Definition: fusionpriv.h:304
HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name) DECLSPEC_HIDDEN
Definition: assembly.c:722
DWORD PageRVA
Definition: fusionpriv.h:369
WORD wLength
Definition: fusionpriv.h:410
WORD Streams
Definition: fusionpriv.h:48
ULONG Signature
Definition: fusionpriv.h:41
WORD HashValue
Definition: fusionpriv.h:305
static void pad(Char *s)
Definition: bzip2.c:908
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD HintNameTableRVA
Definition: fusionpriv.h:353
LONG HRESULT
Definition: typedefs.h:77
ULONG Reserved
Definition: fusionpriv.h:44
DWORD Relocation
Definition: fusionpriv.h:371
LARGE_INTEGER MaskValid
Definition: fusionpriv.h:64
WORD MajorVersion
Definition: fusionpriv.h:104
unsigned short WORD
Definition: ntddk_ex.h:93
static FILE * out
Definition: regtests2xml.c:44
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD Flags
Definition: fusionpriv.h:303
DWORD DateTimeStamp
Definition: fusionpriv.h:344
PEKIND
Definition: fusion.idl:35
WORD EventFlags
Definition: fusionpriv.h:206
HRESULT assembly_get_external_files(ASSEMBLY *assembly, LPWSTR **files, DWORD *count) DECLSPEC_HIDDEN
Definition: assembly.c:887
GLenum GLsizei len
Definition: glext.h:6722
unsigned char BYTE
Definition: mem.h:68
GLenum src
Definition: glext.h:6340
DWORD ImportAddressTable
Definition: fusionpriv.h:347
WORD Name
Definition: fusionpriv.h:97
HRESULT IAssemblyName_GetPath(IAssemblyName *iface, LPWSTR buf, ULONG *len) DECLSPEC_HIDDEN
Definition: asmname.c:532
DWORD ForwarderChain
Definition: fusionpriv.h:345
DWORD OSPlatformID
Definition: fusionpriv.h:269
WORD wValueLength
Definition: fusionpriv.h:386
DWORD ImportLookupTable
Definition: fusionpriv.h:343
WORD wLength
Definition: fusionpriv.h:385
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
#define lstrcpyW
Definition: compat.h:406
unsigned short USHORT
Definition: pedump.c:61
WORD MinorVersion
Definition: fusionpriv.h:105
Definition: services.c:325
DWORD Name
Definition: fusionpriv.h:346
#define BYTES_PER_TOKEN
Definition: fusionpriv.h:463
DWORD Reserved
Definition: fusionpriv.h:362
DWORD OSMinorVersion
Definition: fusionpriv.h:271
WORD FieldList
Definition: fusionpriv.h:83
USHORT MinorVersion
Definition: fusionpriv.h:43
WORD MethodDeclaration
Definition: fusionpriv.h:235
static LPWSTR strdupW(LPCWSTR src)
Definition: fusionpriv.h:450
Definition: name.c:36
HRESULT assembly_get_runtime_version(ASSEMBLY *assembly, LPSTR *version) DECLSPEC_HIDDEN
Definition: assembly.c:881
unsigned int ULONG
Definition: retypes.h:1
LPSTR Version
Definition: fusionpriv.h:46
DWORD SkipData
Definition: fusionpriv.h:428
static char * dest
Definition: rtl.c:135
WCHAR * LPWSTR
Definition: xmlstorage.h:184
WORD Namespace
Definition: fusionpriv.h:91
WORD ImportName
Definition: fusionpriv.h:252
DWORD Flags
Definition: fusionpriv.h:79
WORD wValueLength
Definition: fusionpriv.h:419
WORD MappingFlags
Definition: fusionpriv.h:250
WORD PublickKeyOrToken
Definition: fusionpriv.h:281
DWORD Size
Definition: fusionpriv.h:425
BYTE Flags
Definition: fusionpriv.h:47
WORD wLength
Definition: fusionpriv.h:393
WORD wValueLength
Definition: fusionpriv.h:394
Definition: fci.c:126
WORD Signature
Definition: fusionpriv.h:98
WORD MemberForwarded
Definition: fusionpriv.h:251