ReactOS  0.4.14-dev-554-g2f8d847
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 "ntstatus.h"
27 #define WIN32_NO_STATUS
28 #include "windef.h"
29 #include "windef.h"
30 #include "winbase.h"
31 #include "winuser.h"
32 #include "winver.h"
33 #include "wine/heap.h"
34 
35 #ifdef __REACTOS__
36 #include <objbase.h>
37 #include <fusion.h>
38 #endif
39 
40 #include <pshpack1.h>
41 
42 typedef struct
43 {
52 } METADATAHDR;
53 
54 typedef struct
55 {
59 
60 typedef struct
61 {
70 
71 typedef struct
72 {
78 } MODULETABLE;
79 
80 typedef struct
81 {
88 } TYPEDEFTABLE;
89 
90 typedef struct
91 {
95 } TYPEREFTABLE;
96 
97 typedef struct
98 {
102 } FIELDTABLE;
103 
104 typedef struct
105 {
115 } ASSEMBLYTABLE;
116 
117 typedef struct
118 {
124 
125 typedef struct
126 {
134 
135 typedef struct
136 {
140 } PARAMTABLE;
141 
142 typedef struct
143 {
147 
148 typedef struct
149 {
154 
155 typedef struct
156 {
161 } CONSTANTTABLE;
162 
163 typedef struct
164 {
169 
170 typedef struct
171 {
175 
176 typedef struct
177 {
182 
183 typedef struct
184 {
189 
190 typedef struct
191 {
195 
196 typedef struct
197 {
200 
201 typedef struct
202 {
205 } EVENTMAPTABLE;
206 
207 typedef struct
208 {
212 } EVENTTABLE;
213 
214 typedef struct
215 {
219 
220 typedef struct
221 {
225 } PROPERTYTABLE;
226 
227 typedef struct
228 {
233 
234 typedef struct
235 {
240 
241 typedef struct
242 {
245 
246 typedef struct
247 {
249 } TYPESPECTABLE;
250 
251 typedef struct
252 {
257 } IMPLMAPTABLE;
258 
259 typedef struct
260 {
263 } FIELDRVATABLE;
264 
265 typedef struct
266 {
269 
270 typedef struct
271 {
276 
277 typedef struct
278 {
289 
290 typedef struct
291 {
295 
296 typedef struct
297 {
303 
304 typedef struct
305 {
309 } FILETABLE;
310 
311 typedef struct
312 {
319 
320 typedef struct
321 {
325 
326 typedef struct
327 {
331 
332 typedef struct
333 {
337 
338 typedef struct
339 {
343 
344 typedef struct
345 {
351  BYTE pad[20];
352 } IMPORTTABLE;
353 
354 typedef struct
355 {
357  BYTE pad[8];
359 
360 typedef struct
361 {
363  BYTE Name[12];
364  BYTE Module[12];
368 } HINTNAMETABLE;
369 
370 typedef struct
371 {
375 } RELOCATION;
376 
377 typedef struct
378 {
382  WCHAR szKey[17];
385 
386 typedef struct
387 {
391  WCHAR szKey[13];
392 } VARFILEINFO;
393 
394 typedef struct
395 {
399  WCHAR szKey[13];
401 } VAR;
402 
403 typedef struct
404 {
408  WCHAR szKey[15];
410 
411 typedef struct
412 {
416  WCHAR szKey[9];
417 } STRINGTABLE;
418 
419 typedef struct
420 {
424 } STRINGHDR;
425 
426 typedef struct
427 {
432  BYTE Data[168];
433 } RESOURCE;
434 
435 #include <poppack.h>
436 
437 struct tagASSEMBLY;
438 typedef struct tagASSEMBLY ASSEMBLY;
439 
449 
452 
453 static inline LPWSTR strdupW(LPCWSTR src)
454 {
455  LPWSTR dest;
456 
457  if (!src)
458  return NULL;
459 
460  if ((dest = heap_alloc((lstrlenW(src) + 1) * sizeof(WCHAR))))
461  lstrcpyW(dest, src);
462 
463  return dest;
464 }
465 
466 #define BYTES_PER_TOKEN 8
467 #define CHARS_PER_BYTE 2
468 #define TOKEN_LENGTH (BYTES_PER_TOKEN * CHARS_PER_BYTE + 1)
469 
470 static inline void token_to_str(BYTE *bytes, LPWSTR str)
471 {
472  DWORD i;
473 
474  static const WCHAR hexval[] = {
475  '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'
476  };
477 
478  for(i = 0; i < BYTES_PER_TOKEN; i++)
479  {
480  str[i * 2] = hexval[((bytes[i] >> 4) & 0xF)];
481  str[i * 2 + 1] = hexval[(bytes[i]) & 0x0F];
482  }
483  str[i * 2] = 0;
484 }
485 
486 #endif /* __WINE_FUSION_PRIVATE__ */
WORD ResolutionScope
Definition: fusionpriv.h:92
WORD RevisionNumber
Definition: fusionpriv.h:110
WORD Flags
Definition: fusionpriv.h:137
static void token_to_str(BYTE *bytes, LPWSTR str)
Definition: fusionpriv.h:470
HRESULT IAssemblyName_SetPath(IAssemblyName *iface, LPCWSTR path) DECLSPEC_HIDDEN
Definition: asmname.c:523
HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file) DECLSPEC_HIDDEN
Definition: assembly.c:641
WORD EventType
Definition: fusionpriv.h:211
WORD wType
Definition: fusionpriv.h:423
DWORD HeaderVersion
Definition: fusionpriv.h:430
struct tagEVENTTABLE EVENTTABLE
DWORD OSMajorVersion
Definition: fusionpriv.h:273
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
WORD Namespace
Definition: fusionpriv.h:84
WORD wLength
Definition: fusionpriv.h:421
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
WORD Flags
Definition: fusionpriv.h:99
HRESULT assembly_release(ASSEMBLY *assembly) DECLSPEC_HIDDEN
Definition: assembly.c:694
GLuint GLuint GLsizei count
Definition: gl.h:1545
WORD wValueLength
Definition: fusionpriv.h:414
DWORD Signature
Definition: fusionpriv.h:429
WORD MethodList
Definition: fusionpriv.h:87
WORD wType
Definition: fusionpriv.h:398
WORD ImportScope
Definition: fusionpriv.h:256
char * LPSTR
Definition: xmlstorage.h:182
#define lstrlenW
Definition: compat.h:415
DWORD Size
Definition: fusionpriv.h:373
HRESULT assembly_get_path(const ASSEMBLY *assembly, LPWSTR *path) DECLSPEC_HIDDEN
Definition: assembly.c:750
WORD EncId
Definition: fusionpriv.h:76
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
WORD Sequence
Definition: fusionpriv.h:138
WORD Generation
Definition: fusionpriv.h:73
USHORT MajorVersion
Definition: fusionpriv.h:45
WORD Extends
Definition: fusionpriv.h:85
WORD EncBaseId
Definition: fusionpriv.h:77
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:68
HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version) DECLSPEC_HIDDEN
Definition: assembly.c:762
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
DWORD Value
Definition: fusionpriv.h:400
DWORD HashAlgId
Definition: fusionpriv.h:106
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:48
HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token) DECLSPEC_HIDDEN
Definition: assembly.c:807
WORD BuildNumber
Definition: fusionpriv.h:109
const WCHAR * str
VS_FIXEDFILEINFO Value
Definition: fusionpriv.h:383
smooth NULL
Definition: ftsmooth.c:416
struct _tagVS_VERSIONINFO VS_VERSIONINFO
static const WCHAR version[]
Definition: asmname.c:66
PEKIND assembly_get_architecture(ASSEMBLY *assembly) DECLSPEC_HIDDEN
Definition: assembly.c:788
WORD Name
Definition: fusionpriv.h:307
HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name) DECLSPEC_HIDDEN
Definition: assembly.c:723
DWORD PageRVA
Definition: fusionpriv.h:372
WORD wLength
Definition: fusionpriv.h:413
WORD Streams
Definition: fusionpriv.h:51
ULONG Signature
Definition: fusionpriv.h:44
WORD HashValue
Definition: fusionpriv.h:308
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD HintNameTableRVA
Definition: fusionpriv.h:356
LONG HRESULT
Definition: typedefs.h:77
ULONG Reserved
Definition: fusionpriv.h:47
DWORD Relocation
Definition: fusionpriv.h:374
LARGE_INTEGER MaskValid
Definition: fusionpriv.h:67
WORD MajorVersion
Definition: fusionpriv.h:107
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:306
DWORD DateTimeStamp
Definition: fusionpriv.h:347
PEKIND
Definition: fusion.idl:35
WORD EventFlags
Definition: fusionpriv.h:209
HRESULT assembly_get_external_files(ASSEMBLY *assembly, LPWSTR **files, DWORD *count) DECLSPEC_HIDDEN
Definition: assembly.c:871
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:350
HRESULT IAssemblyName_GetPath(IAssemblyName *iface, LPWSTR buf, ULONG *len) DECLSPEC_HIDDEN
Definition: asmname.c:534
DWORD ForwarderChain
Definition: fusionpriv.h:348
DWORD OSPlatformID
Definition: fusionpriv.h:272
WORD wValueLength
Definition: fusionpriv.h:389
DWORD ImportLookupTable
Definition: fusionpriv.h:346
WORD wLength
Definition: fusionpriv.h:388
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
#define lstrcpyW
Definition: compat.h:414
unsigned short USHORT
Definition: pedump.c:61
WORD MinorVersion
Definition: fusionpriv.h:108
DWORD Name
Definition: fusionpriv.h:349
#define BYTES_PER_TOKEN
Definition: fusionpriv.h:466
DWORD Reserved
Definition: fusionpriv.h:365
DWORD OSMinorVersion
Definition: fusionpriv.h:274
WORD FieldList
Definition: fusionpriv.h:86
USHORT MinorVersion
Definition: fusionpriv.h:46
WORD MethodDeclaration
Definition: fusionpriv.h:238
static LPWSTR strdupW(LPCWSTR src)
Definition: fusionpriv.h:453
Definition: name.c:38
HRESULT assembly_get_runtime_version(ASSEMBLY *assembly, LPSTR *version) DECLSPEC_HIDDEN
Definition: assembly.c:865
unsigned int ULONG
Definition: retypes.h:1
LPSTR Version
Definition: fusionpriv.h:49
DWORD SkipData
Definition: fusionpriv.h:431
static char * dest
Definition: rtl.c:135
WCHAR * LPWSTR
Definition: xmlstorage.h:184
WORD Namespace
Definition: fusionpriv.h:94
WORD ImportName
Definition: fusionpriv.h:255
DWORD Flags
Definition: fusionpriv.h:82
WORD wValueLength
Definition: fusionpriv.h:422
WORD MappingFlags
Definition: fusionpriv.h:253
WORD PublickKeyOrToken
Definition: fusionpriv.h:284
DWORD Size
Definition: fusionpriv.h:428
BYTE Flags
Definition: fusionpriv.h:50
WORD wLength
Definition: fusionpriv.h:396
WORD wValueLength
Definition: fusionpriv.h:397
Definition: fci.c:126
WORD Signature
Definition: fusionpriv.h:101
WORD MemberForwarded
Definition: fusionpriv.h:254