// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//+---------------------------------------------------------------------------
//
//  Microsoft Windows
//  File:       fusion.idl
//
//  Contents:   Fusion Interfaces
//
//  Classes:
//
//  Functions:
//
//
//----------------------------------------------------------------------------

cpp_quote("")
cpp_quote("#ifdef _MSC_VER")
cpp_quote("#pragma comment(lib,\"uuid.lib\")")
cpp_quote("#endif")
cpp_quote("")
cpp_quote("//---------------------------------------------------------------------------=")
cpp_quote("// Fusion Interfaces.")
cpp_quote("")

import "objidl.idl";

cpp_quote("#ifdef _MSC_VER")
cpp_quote("#pragma once")
cpp_quote("#endif")


typedef enum _tagAssemblyContentType
{
    AssemblyContentType_Default         = 0x00000000,
    AssemblyContentType_WindowsRuntime  = 0x00000001,
    AssemblyContentType_Invalid         = 0xffffffff
} AssemblyContentType;


///////////////////////////////////////////////////////////////////////////////
//
// IAssemblyName
//
///////////////////////////////////////////////////////////////////////////////

cpp_quote("// {CD193BC0-B4BC-11d2-9833-00C04FC31D2E}")
cpp_quote("EXTERN_GUID(IID_IAssemblyName, 0xCD193BC0, 0xB4BC, 0x11d2, 0x98, 0x33, 0x00, 0xC0, 0x4F, 0xC3, 0x1D, 0x2E);")


[
        local,
        object,
        uuid(CD193BC0-B4BC-11d2-9833-00C04FC31D2E),
        pointer_default(unique)
]
interface IAssemblyName: IUnknown
{
    typedef [unique] IAssemblyName *LPASSEMBLYNAME;

    typedef enum
    {
        ASM_NAME_PUBLIC_KEY = 0,        //  0
        ASM_NAME_PUBLIC_KEY_TOKEN,      //  1
        ASM_NAME_HASH_VALUE,            //  2
        ASM_NAME_NAME,                  //  3
        ASM_NAME_MAJOR_VERSION,         //  4
        ASM_NAME_MINOR_VERSION,         //  5
        ASM_NAME_BUILD_NUMBER,          //  6
        ASM_NAME_REVISION_NUMBER,       //  7
        ASM_NAME_CULTURE,               //  8
        ASM_NAME_PROCESSOR_ID_ARRAY,    //  9
        ASM_NAME_OSINFO_ARRAY,          // 10 ... 0x0a
        ASM_NAME_HASH_ALGID,            // 11 ... 0x0b
        ASM_NAME_ALIAS,                 // 12 ... 0x0c
        ASM_NAME_CODEBASE_URL,          // 13 ... 0x0d
        ASM_NAME_CODEBASE_LASTMOD,      // 14 ... 0x0e
        ASM_NAME_NULL_PUBLIC_KEY,       // 15 ... 0x0f
        ASM_NAME_NULL_PUBLIC_KEY_TOKEN, // 16 ... 0x10
        ASM_NAME_CUSTOM,                // 17 ... 0x11
        ASM_NAME_NULL_CUSTOM,           // 18 ... 0x12
        ASM_NAME_MVID,                  // 19 ... 0x13
        ASM_NAME_FILE_MAJOR_VERSION,    // 20 ... 0x14
        ASM_NAME_FILE_MINOR_VERSION,    // 21 ... 0x15
        ASM_NAME_FILE_BUILD_NUMBER,     // 22 ... 0x16
        ASM_NAME_FILE_REVISION_NUMBER,  // 23 ... 0x17
        ASM_NAME_RETARGET,              // 24 ... 0x18
        ASM_NAME_SIGNATURE_BLOB,        // 25 ... 0x19
        ASM_NAME_CONFIG_MASK,           // 26 ... 0x1a
        ASM_NAME_ARCHITECTURE,          // 27 ... 0x1b
        ASM_NAME_CONTENT_TYPE,          // 28 ... 0x1c
        ASM_NAME_MAX_PARAMS             // 29 ... 0x1d
    } ASM_NAME;

    typedef enum
    {
        ASM_DISPLAYF_VERSION               = 0x1,
        ASM_DISPLAYF_CULTURE               = 0x2,
        ASM_DISPLAYF_PUBLIC_KEY_TOKEN      = 0x4,
        ASM_DISPLAYF_PUBLIC_KEY            = 0x8,
        ASM_DISPLAYF_CUSTOM                = 0x10,
        ASM_DISPLAYF_PROCESSORARCHITECTURE = 0x20,
        ASM_DISPLAYF_LANGUAGEID            = 0x40,
        ASM_DISPLAYF_RETARGET              = 0x80,
        ASM_DISPLAYF_CONFIG_MASK           = 0x100,
        ASM_DISPLAYF_MVID                  = 0x200,
        ASM_DISPLAYF_CONTENT_TYPE          = 0x400,


        // ASM_DISPLAYF_FULL shows the full identity of the assembly.
        // It should be used when you are working with APIs taking
        // assembly full identity, such as GAC APIs.
        //
        // WARNING!!! ASM_DISPLAYF_FULL will change in the future,
        // when we introduce new attributes. This means the identity returned
        // will change from CLR version to version. Don't ever assume
        // the identity will not change. !!!
        ASM_DISPLAYF_FULL    = ASM_DISPLAYF_VERSION
                                | ASM_DISPLAYF_CULTURE
                                | ASM_DISPLAYF_PUBLIC_KEY_TOKEN
                                | ASM_DISPLAYF_RETARGET
                                | ASM_DISPLAYF_PROCESSORARCHITECTURE
                                | ASM_DISPLAYF_CONTENT_TYPE,
    } ASM_DISPLAY_FLAGS;

    HRESULT SetProperty(
        [in]    DWORD        PropertyId,
        [in]    void const * pvProperty,
        [in]    DWORD        cbProperty);

    HRESULT GetProperty(
        [in]         DWORD    PropertyId,
        [out]        LPVOID   pvProperty,
        [in, out]    LPDWORD  pcbProperty);
}

