' ########################################################################################
' Microsoft Windows
' File: tlbref.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_tlbref_PBI)
#DEFINE PBX_tlbref_PBI
%EQUATE `TLBREF_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
$IID_ITypeLibResolver = GUID$("{8F026EDB-785E-4470-A8E1-B4E84E9D1779}")
' ########################################################################################
' Interface name = ITypeLibResolver
' IID = 8F026EDB-785E-4470-A8E1-B4E84E9D1779
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ITypeLibResolver_INTERFACE_DEFINED)
 %ITypeLibResolver_INTERFACE_DEFINED = 1
INTERFACE ITypeLibResolver $IID_ITypeLibResolver
 INHERIT IUnknown
 ' =====================================================================================
 METHOD ResolveTypeLib ( ' VTable offset = 12
 BYVAL bstrSimpleName AS WSTRING
 , BYVAL tlbid AS GUID
 , BYVAL lcid AS DWORD
 , BYVAL wMajorVersion AS WORD
 , BYVAL wMinorVersion AS WORD
 , BYVAL syskind AS LONG
 , BYREF pbstrResolvedTlbName AS WSTRING
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITypeLibResolver_INTERFACE_DEFINED__ */
DECLARE FUNCTION LoadTypeLibWithResolver LIB "tlbref.dll" ALIAS "LoadTypeLibWithResolver" ( BYREF szFile AS WSTRINGZ , BYVAL regkind AS LONG , BYVAL pTlbResolver AS ITypeLibResolver , BYREF pptlib AS ITypeLib ) AS LONG
DECLARE FUNCTION GetTypeLibInfo LIB "tlbref.dll" ALIAS "GetTypeLibInfo" ( BYREF szFile AS WSTRINGZ
 , BYREF pTypeLibID AS GUID
 , BYREF pTypeLibLCID AS DWORD
 , BYREF pTypeLibPlatform AS LONG
 , BYREF pTypeLibMajorVer AS WORD
 , BYREF pTypeLibMinorVer AS WORD
 ) AS LONG
#ENDIF
