Logo Search packages:      
Sourcecode: wine version File versions  Download package

fusionpriv.h

/*
 * fusion private definitions
 *
 * Copyright 2008 James Hawkins
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#ifndef __WINE_FUSION_PRIVATE__
#define __WINE_FUSION_PRIVATE__

#include <stdarg.h>

#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winver.h"

#include <pshpack1.h>

00033 typedef struct
{
    ULONG Signature;
    USHORT MajorVersion;
    USHORT MinorVersion;
    ULONG Reserved;
    ULONG VersionLength;
    LPSTR Version;
    BYTE Flags;
    WORD Streams;
} METADATAHDR;

00045 typedef struct
{
    DWORD Offset;
    DWORD Size;
} METADATASTREAMHDR;

00051 typedef struct
{
    DWORD Reserved1;
    BYTE MajorVersion;
    BYTE MinorVersion;
    BYTE HeapOffsetSizes;
    BYTE Reserved2;
    LARGE_INTEGER MaskValid;
    LARGE_INTEGER MaskSorted;
} METADATATABLESHDR;

00062 typedef struct
{
    WORD Generation;
    WORD Name;
    WORD Mvid;
    WORD EncId;
    WORD EncBaseId;
} MODULETABLE;

00071 typedef struct
{
    DWORD Flags;
    WORD Name;
    WORD Namespace;
    WORD Extends;
    WORD FieldList;
    WORD MethodList;
} TYPEDEFTABLE;

00081 typedef struct
{
    WORD ResolutionScope;
    WORD Name;
    WORD Namespace;
} TYPEREFTABLE;

00088 typedef struct
{
    WORD Flags;
    WORD Name;
    WORD Signature;
} FIELDTABLE;

00095 typedef struct
{
    DWORD HashAlgId;
    WORD MajorVersion;
    WORD MinorVersion;
    WORD BuildNumber;
    WORD RevisionNumber;
    DWORD Flags;
    WORD PublicKey;
    WORD Name;
    WORD Culture;
} ASSEMBLYTABLE;

00108 typedef struct
{
    DWORD Offset;
    DWORD Flags;
    WORD Name;
    WORD Implementation;
} MANIFESTRESTABLE;

00116 typedef struct
{
    DWORD RVA;
    WORD ImplFlags;
    WORD Flags;
    WORD Name;
    WORD Signature;
    WORD ParamList;
} METHODDEFTABLE;

00126 typedef struct
{
    WORD Flags;
    WORD Sequence;
    WORD Name;
} PARAMTABLE;

00133 typedef struct
{
    WORD Class;
    WORD Interface;
} INTERFACEIMPLTABLE;

00139 typedef struct
{
    WORD Class;
    WORD Name;
    WORD Signature;
} MEMBERREFTABLE;

00146 typedef struct
{
    BYTE Type;
    BYTE Reserved;
    WORD Parent;
    WORD Value;
} CONSTANTTABLE;

00154 typedef struct
{
    WORD Parent;
    WORD Type;
    WORD Value;
} CUSTOMATTRIBUTETABLE;

00161 typedef struct
{
    WORD Parent;
    WORD NativeType;
} FIELDMARSHALTABLE;

00167 typedef struct
{
    WORD Action;
    WORD Parent;
    WORD PermissionSet;
} DECLSECURITYTABLE;

00174 typedef struct
{
    WORD PackingSize;
    DWORD ClassSize;
    WORD Parent;
} CLASSLAYOUTTABLE;

00181 typedef struct
{
    DWORD Offset;
    WORD Field;
} FIELDLAYOUTTABLE;

00187 typedef struct
{
    WORD Signature;
} STANDALONESIGTABLE;

00192 typedef struct
{
    WORD Parent;
    WORD EventList;
} EVENTMAPTABLE;

00198 typedef struct
{
    WORD EventFlags;
    WORD Name;
    WORD EventType;
} EVENTTABLE;

00205 typedef struct
{
    WORD Parent;
    WORD PropertyList;
} PROPERTYMAPTABLE;

00211 typedef struct
{
    WORD Flags;
    WORD Name;
    WORD Type;
} PROPERTYTABLE;

00218 typedef struct
{
    WORD Semantics;
    WORD Method;
    WORD Association;
} METHODSEMANTICSTABLE;

00225 typedef struct
{
    WORD Class;
    WORD MethodBody;
    WORD MethodDeclaration;
} METHODIMPLTABLE;

00232 typedef struct
{
    WORD Name;
} MODULEREFTABLE;

00237 typedef struct
{
    WORD Signature;
} TYPESPECTABLE;

00242 typedef struct
{
    WORD MappingFlags;
    WORD MemberForwarded;
    WORD ImportName;
    WORD ImportScope;
} IMPLMAPTABLE;

00250 typedef struct
{
    DWORD RVA;
    WORD Field;
} FIELDRVATABLE;

00256 typedef struct
{
    DWORD Processor;
} ASSEMBLYPROCESSORTABLE;

00261 typedef struct
{
    DWORD OSPlatformID;
    DWORD OSMajorVersion;
    DWORD OSMinorVersion;
} ASSEMBLYOSTABLE;

00268 typedef struct
{
    WORD MajorVersion;
    WORD MinorVersion;
    WORD BuildNumber;
    WORD RevisionNumber;
    DWORD Flags;
    WORD PublickKeyOrToken;
    WORD Name;
    WORD Culture;
    WORD HashValue;
} ASSEMBLYREFTABLE;

00281 typedef struct
{
    DWORD Processor;
    WORD AssemblyRef;
} ASSEMBLYREFPROCESSORTABLE;

00287 typedef struct
{
    DWORD OSPlatformId;
    DWORD OSMajorVersion;
    DWORD OSMinorVersion;
    WORD AssemblyRef;
} ASSEMBLYREFOSTABLE;

00295 typedef struct
{
    DWORD Flags;
    WORD Name;
    WORD HashValue;
} FILETABLE;

00302 typedef struct
{
    DWORD Flags;
    DWORD TypeDefId;
    WORD TypeName;
    WORD TypeNameSpace;
    WORD Implementation;
} EXPORTEDTYPETABLE;

00311 typedef struct
{
    WORD NestedClass;
    WORD EnclosingClass;
} NESTEDCLASSTABLE;

00317 typedef struct
{
    WORD Number;
    WORD Flags;
} GENERICPARAMTABLE;

00323 typedef struct
{
    WORD MethodDef;
    WORD Instantiation;
} METHODSPECTABLE;

00329 typedef struct
{
    WORD Owner;
    WORD Constraint;
} GENERICPARAMCONSTRAINTTABLE;

00335 typedef struct
{
    DWORD ImportLookupTable;
    DWORD DateTimeStamp;
    DWORD ForwarderChain;
    DWORD Name;
    DWORD ImportAddressTable;
    BYTE pad[20];
} IMPORTTABLE;

00345 typedef struct
{
    DWORD HintNameTableRVA;
    BYTE pad[8];
} IMPORTLOOKUPTABLE;

00351 typedef struct
{
    WORD Hint;
    BYTE Name[12];
    BYTE Module[12];
    DWORD Reserved;
    WORD EntryPoint;
    DWORD RVA;
} HINTNAMETABLE;

00361 typedef struct
{
    DWORD PageRVA;
    DWORD Size;
    DWORD Relocation;
} RELOCATION;

00368 typedef struct
{
    WORD wLength;
    WORD wValueLength;
    WORD wType;
    WCHAR szKey[17];
    VS_FIXEDFILEINFO Value;
} VS_VERSIONINFO;

00377 typedef struct
{
    WORD wLength;
    WORD wValueLength;
    WORD wType;
    WCHAR szKey[13];
} VARFILEINFO;

00385 typedef struct
{
    WORD wLength;
    WORD wValueLength;
    WORD wType;
    WCHAR szKey[13];
    DWORD Value;
} VAR;

00394 typedef struct
{
    WORD wLength;
    WORD wValueLength;
    WORD wType;
    WCHAR szKey[15];
} STRINGFILEINFO;

00402 typedef struct
{
    WORD wLength;
    WORD wValueLength;
    WORD wType;
    WCHAR szKey[9];
} STRINGTABLE;

00410 typedef struct
{
    WORD wLength;
    WORD wValueLength;
    WORD wType;
} STRINGHDR;

00417 typedef struct
{
    DWORD Size;
    DWORD Signature;
    DWORD HeaderVersion;
    DWORD SkipData;
    BYTE Data[168];
} RESOURCE;

#include <poppack.h>

struct tagASSEMBLY;
typedef struct tagASSEMBLY ASSEMBLY;

HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file);
HRESULT assembly_release(ASSEMBLY *assembly);
HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name);
HRESULT assembly_get_path(ASSEMBLY *assembly, LPWSTR *path);
HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version);
HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token);

static inline LPWSTR strdupW(LPCWSTR src)
{
    LPWSTR dest;

    if (!src)
        return NULL;

    dest = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(src) + 1) * sizeof(WCHAR));
    if (dest)
        lstrcpyW(dest, src);

    return dest;
}

#define BYTES_PER_TOKEN 8
#define CHARS_PER_BYTE  2
#define TOKEN_LENGTH    (BYTES_PER_TOKEN * CHARS_PER_BYTE + 1)

static inline void token_to_str(BYTE *bytes, LPWSTR str)
{
    DWORD i;

    static const WCHAR hexval[16] = {
        '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'
    };

    for(i = 0; i < BYTES_PER_TOKEN; i++)
    {
        str[i * 2] = hexval[((bytes[i] >> 4) & 0xF)];
        str[i * 2 + 1] = hexval[(bytes[i]) & 0x0F];
    }
    str[i * 2] = 0;
}

#endif /* __WINE_FUSION_PRIVATE__ */

Generated by  Doxygen 1.6.0   Back to index