' ########################################################################################
' Microsoft Windows
' File: winsxs.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_winsxs_PBI)
#DEFINE PBX_winsxs_PBI
%EQUATE `WINSXS_INC = 1
' /* header files for imported files */
#INCLUDE ONCE "Legacy/COM/ObjIdl.inc"
#INCLUDE ONCE "Legacy/COM/OleIdl.inc"
'//---------------------------------------------------------------------------=
'// Fusion Interfaces for sxs assemblies.
%EQUATE `STREAM_FORMAT_COMPLIB_MODULE = 0
%EQUATE `STREAM_FORMAT_COMPLIB_MANIFEST = 1
%EQUATE `STREAM_FORMAT_WIN32_MODULE = 2
%EQUATE `STREAM_FORMAT_WIN32_MANIFEST = 4
#IF NOT %DEF(%LPFUSION_DEFINED)
%EQUATE `LPFUSION_DEFINED = 1
%EQUATE `IASSEMBLYCACHEITEM_COMMIT_FLAG_REFRESH = &H00000001
%EQUATE `QUERYASMINFO_FLAG_VALIDATE = &H1
%EQUATE `ASSEMBLYINFO_FLAG_INSTALLED = &H00000001
%EQUATE `ASSEMBLYINFO_FLAG_PAYLOADRESIDENT = &H00000002
' // Size = 24 bytes
TYPE ASSEMBLY_INFO ' Must be 8 byte aligned
 cbAssemblyInfo AS DWORD ' ULONG
 dwAssemblyFlags AS DWORD
 uliAssemblySizeInKB AS QUAD ' ULARGE_INTEGER
 pszCurrentAssemblyPathBuf AS WSTRINGZ PTR
 cchBuf AS DWORD ' ULONG
END TYPE
%EQUATE `IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED = 1
%EQUATE `IASSEMBLYCACHE_UNINSTALL_DISPOSITION_STILL_IN_USE = 2
%EQUATE `IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED = 3
%EQUATE `IASSEMBLYCACHE_UNINSTALL_DISPOSITION_DELETE_PENDING = 4
%EQUATE `IASSEMBLYCACHEITEM_COMMIT_DISPOSITION_INSTALLED = 1
%EQUATE `IASSEMBLYCACHEITEM_COMMIT_DISPOSITION_REFRESHED = 2
%EQUATE `IASSEMBLYCACHEITEM_COMMIT_DISPOSITION_ALREADY_INSTALLED = 3
'// {8cedc215-ac4b-488b-93c0-a50a49cb2fb8}
'DEFINE_GUID(FUSION_REFCOUNT_UNINSTALL_SUBKEY_GUID, 0x8cedc215, 0xac4b, 0x488b, 0x93, 0xc0, 0xa5, 0x0a, 0x49, 0xcb, 0x2f, 0xb8);
$FUSION_REFCOUNT_UNINSTALL_SUBKEY_GUID = GUID$("{8cedc215-ac4b-488b-93c0-a50a49cb2fb8}")
'// {b02f9d65-fb77-4f7a-afa5-b391309f11c9}
'DEFINE_GUID(FUSION_REFCOUNT_FILEPATH_GUID, 0xb02f9d65, 0xfb77, 0x4f7a, 0xaf, 0xa5, 0xb3, 0x91, 0x30, 0x9f, 0x11, 0xc9);
$FUSION_REFCOUNT_FILEPATH_GUID = GUID$("{b02f9d65-fb77-4f7a-afa5-b391309f11c9}")
'// {2ec93463-b0c3-45e1-8364-327e96aea856}
'DEFINE_GUID(FUSION_REFCOUNT_OPAQUE_STRING_GUID, 0x2ec93463, 0xb0c3, 0x45e1, 0x83, 0x64, 0x32, 0x7e, 0x96, 0xae, 0xa8, 0x56);
$FUSION_REFCOUNT_OPAQUE_STRING_GUID = GUID$("{2ec93463-b0c3-45e1-8364-327e96aea856}")
' // Size = 32 bytes
TYPE FUSION_INSTALL_REFERENCE DWORD
 cbSize AS DWORD
 dwFlags AS DWORD
 guidScheme AS GUID ' GUID
 szIdentifier AS WSTRINGZ PTR
 szNonCannonicalData AS WSTRINGZ PTR
END TYPE
' ########################################################################################
' IAssemblyName interface
' IID = CD193BC0-B4BC-11D2-9833-00C04FC31D2E
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IAssemblyName_INTERFACE_DEFINED)
 %IAssemblyName_INTERFACE_DEFINED = 1
$IID_IAssemblyName = GUID$("{CD193BC0-B4BC-11D2-9833-00C04FC31D2E}")
' enum ASM_NAME
%EQUATE `ASM_NAME_PUBLIC_KEY = 0
%EQUATE `ASM_NAME_PUBLIC_KEY_TOKEN = %ASM_NAME_PUBLIC_KEY + 1
%EQUATE `ASM_NAME_HASH_VALUE = %ASM_NAME_PUBLIC_KEY_TOKEN + 1
%EQUATE `ASM_NAME_NAME = %ASM_NAME_HASH_VALUE + 1
%EQUATE `ASM_NAME_MAJOR_VERSION = %ASM_NAME_NAME + 1
%EQUATE `ASM_NAME_MINOR_VERSION = %ASM_NAME_MAJOR_VERSION + 1
%EQUATE `ASM_NAME_BUILD_NUMBER = %ASM_NAME_MINOR_VERSION + 1
%EQUATE `ASM_NAME_REVISION_NUMBER = %ASM_NAME_BUILD_NUMBER + 1
%EQUATE `ASM_NAME_CULTURE = %ASM_NAME_REVISION_NUMBER + 1
%EQUATE `ASM_NAME_PROCESSOR_ID_ARRAY = %ASM_NAME_CULTURE + 1
%EQUATE `ASM_NAME_OSINFO_ARRAY = %ASM_NAME_PROCESSOR_ID_ARRAY + 1
%EQUATE `ASM_NAME_HASH_ALGID = %ASM_NAME_OSINFO_ARRAY + 1
%EQUATE `ASM_NAME_ALIAS = %ASM_NAME_HASH_ALGID + 1
%EQUATE `ASM_NAME_CODEBASE_URL = %ASM_NAME_ALIAS + 1
%EQUATE `ASM_NAME_CODEBASE_LASTMOD = %ASM_NAME_CODEBASE_URL + 1
%EQUATE `ASM_NAME_NULL_PUBLIC_KEY = %ASM_NAME_CODEBASE_LASTMOD + 1
%EQUATE `ASM_NAME_NULL_PUBLIC_KEY_TOKEN = %ASM_NAME_NULL_PUBLIC_KEY + 1
%EQUATE `ASM_NAME_CUSTOM = %ASM_NAME_NULL_PUBLIC_KEY_TOKEN + 1
%EQUATE `ASM_NAME_NULL_CUSTOM = %ASM_NAME_CUSTOM + 1
%EQUATE `ASM_NAME_MVID = %ASM_NAME_NULL_CUSTOM + 1
%EQUATE `ASM_NAME_MAX_PARAMS = %ASM_NAME_MVID + 1
' enum ASM_BIND_FLAGS
%EQUATE `ASM_BINDF_FORCE_CACHE_INSTALL = &H1
%EQUATE `ASM_BINDF_RFS_INTEGRITY_CHECK = &H2
%EQUATE `ASM_BINDF_RFS_MODULE_CHECK = &H4
%EQUATE `ASM_BINDF_BINPATH_PROBE_ONLY = &H8
%EQUATE `ASM_BINDF_SHARED_BINPATH_HINT = &H10
%EQUATE `ASM_BINDF_PARENT_ASM_HINT = &H20
' enum ASM_DISPLAY_FLAGS
%EQUATE `ASM_DISPLAYF_VERSION = &H1
%EQUATE `ASM_DISPLAYF_CULTURE = &H2
%EQUATE `ASM_DISPLAYF_PUBLIC_KEY_TOKEN = &H4
%EQUATE `ASM_DISPLAYF_PUBLIC_KEY = &H8
%EQUATE `ASM_DISPLAYF_CUSTOM = &H10
%EQUATE `ASM_DISPLAYF_PROCESSORARCHITECTURE = &H20
%EQUATE `ASM_DISPLAYF_LANGUAGEID = &H40
' enum ASM_CMP_FLAGS
%EQUATE `ASM_CMPF_NAME = &H1
%EQUATE `ASM_CMPF_MAJOR_VERSION = &H2
%EQUATE `ASM_CMPF_MINOR_VERSION = &H4
%EQUATE `ASM_CMPF_BUILD_NUMBER = &H8
%EQUATE `ASM_CMPF_REVISION_NUMBER = &H10
%EQUATE `ASM_CMPF_PUBLIC_KEY_TOKEN = &H20
%EQUATE `ASM_CMPF_CULTURE = &H40
%EQUATE `ASM_CMPF_CUSTOM = &H80
%EQUATE `ASM_CMPF_ALL = (((((((%ASM_CMPF_NAME OR %ASM_CMPF_MAJOR_VERSION) OR %ASM_CMPF_MINOR_VERSION) OR %ASM_CMPF_REVISION_NUMBER) OR %ASM_CMPF_BUILD_NUMBER) OR %ASM_CMPF_PUBLIC_KEY_TOKEN) OR %ASM_CMPF_CULTURE) OR %ASM_CMPF_CUSTOM)
%EQUATE `ASM_CMPF_DEFAULT = &H100
INTERFACE IAssemblyName $IID_IAssemblyName
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetProperty ( ' VTable offset = 12
 BYVAL PropertyId AS DWORD
 , BYVAL pvProperty AS DWORD
 , BYVAL cbProperty AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetProperty ( ' VTable offset = 16
 BYVAL PropertyId AS DWORD
 , BYREF pvProperty AS DWORD
 , BYREF pcbProperty AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Finalize ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD GetDisplayName ( ' VTable offset = 24
 BYREF szDisplayName AS WSTRINGZ
 , BYREF pccDisplayName AS DWORD
 , BYVAL dwDisplayFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reserved ( ' VTable offset = 28
 BYREF refIID AS GUID
 , BYVAL pUnkReserved1 AS IUnknown
 , BYVAL pUnkReserved2 AS IUnknown
 , BYVAL szReserved AS DWORD
 , BYVAL llReserved AS QUAD
 , BYVAL pvReserved AS DWORD
 , BYVAL cbReserved AS DWORD
 , BYREF ppReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetName ( ' VTable offset = 32
 BYREF lpcwBuffer AS DWORD
 , BYREF pwzName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetVersion ( ' VTable offset = 36
 BYREF pdwVersionHi AS DWORD
 , BYREF pdwVersionLow AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD IsEqual ( ' VTable offset = 40
 BYVAL pName AS IAssemblyName
 , BYVAL dwCmpFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 44
 BYREF pName AS IAssemblyName
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IAssemblyName_INTERFACE_DEFINED__ */
' ########################################################################################
' IAssemblyCacheItem interface
' IID = 9E3AAEB4-D1CD-11D2-BAB9-00C04F8ECEAE
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IAssemblyCacheItem_INTERFACE_DEFINED)
 %IAssemblyCacheItem_INTERFACE_DEFINED = 1
$IID_IAssemblyCacheItem = GUID$("{9E3AAEB4-D1CD-11D2-BAB9-00C04F8ECEAE}")
INTERFACE IAssemblyCacheItem $IID_IAssemblyCacheItem
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CreateStream ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYREF pszStreamName AS WSTRINGZ
 , BYVAL dwFormat AS DWORD
 , BYVAL dwFormatFlags AS DWORD
 , BYREF ppIStream AS IStream
 , BYREF puliMaxSize AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 16
 BYVAL dwFlags AS DWORD
 , BYREF pulDisposition AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AbortItem ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IAssemblyCacheItem_INTERFACE_DEFINED__ */
' ########################################################################################
' IAssemblyCache interface
' IID = E707DCDE-D1CD-11D2-BAB9-00C04F8ECEAE
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IAssemblyCache_INTERFACE_DEFINED)
 %IAssemblyCache_INTERFACE_DEFINED = 1
$IID_IAssemblyCache = GUID$("{E707DCDE-D1CD-11D2-BAB9-00C04F8ECEAE}")
INTERFACE IAssemblyCache $IID_IAssemblyCache
 INHERIT IUnknown
 ' =====================================================================================
 METHOD UninstallAssembly ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYREF pszAssemblyName AS WSTRINGZ
 , BYREF pRefData AS FUSION_INSTALL_REFERENCE
 , BYREF pulDisposition AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD QueryAssemblyInfo ( ' VTable offset = 16
 BYVAL dwFlags AS DWORD
 , BYREF pszAssemblyName AS WSTRINGZ
 , BYREF pAsmInfo AS ASSEMBLY_INFO
 ) AS LONG
 ' =====================================================================================
 METHOD CreateAssemblyCacheItem ( ' VTable offset = 20
 BYVAL dwFlags AS DWORD
 , BYVAL pvReserved AS DWORD
 , BYREF ppAsmItem AS IAssemblyCacheItem
 , BYREF pszAssemblyName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD Reserved ( ' VTable offset = 24
 BYREF ppUnk AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD InstallAssembly ( ' VTable offset = 28
 BYVAL dwFlags AS DWORD
 , BYREF pszManifestFilePath AS WSTRINGZ
 , BYREF pRefData AS FUSION_INSTALL_REFERENCE
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IAssemblyCache_INTERFACE_DEFINED__ */
' enum CREATE_ASM_NAME_OBJ_FLAGS
%EQUATE `CANOF_PARSE_DISPLAY_NAME = &H1
%EQUATE `CANOF_SET_DEFAULT_VALUES = &H2
DECLARE FUNCTION CreateAssemblyNameObject LIB "sxs.dll" ALIAS "CreateAssemblyNameObject" ( BYREF ppAssemblyNameObj AS IAssemblyName , BYREF szAssemblyName AS WSTRINGZ , BYVAL dwFlags AS QUAD , BYVAL pvReserved AS QUAD ) AS LONG
DECLARE FUNCTION CreateAssemblyCache LIB "sxs.dll" ALIAS "CreateAssemblyCache" ( BYREF ppAsmCache AS IAssemblyCache
 , BYVAL dwReserved AS DWORD
 ) AS LONG
#ENDIF ' #IF NOT %DEF(%LPFUSION_DEFINED)
#ENDIF
