' ########################################################################################
' Microsoft Windows
' File: ivalidator.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_ivalidator_PBI)
#DEFINE PBX_ivalidator_PBI
%EQUATE `IVALIDATOR_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/System/ivehandler.inc"
' enum ValidatorFlags
%EQUATE `VALIDATOR_EXTRA_VERBOSE = &H1
%EQUATE `VALIDATOR_SHOW_SOURCE_LINES = &H2
%EQUATE `VALIDATOR_CHECK_ILONLY = &H4
%EQUATE `VALIDATOR_CHECK_PEFORMAT_ONLY = &H8
%EQUATE `VALIDATOR_NOCHECK_PEFORMAT = &H10
%EQUATE `VALIDATOR_TRANSPARENT_ONLY = &H20
' ########################################################################################
' Interface name = IValidator
' IID = {63DF8730-DC81-4062-84A2-1FF943F59FAC}
' Inherited interface = IUnknown
' Provides methods for validating portable executable (PE) images and reporting
' validation errors.
' ########################################################################################
#IF NOT %DEF(%IValidator_INTERFACE_DEFINED)
 %IValidator_INTERFACE_DEFINED = 1
$IID_IValidator = GUID$("{63DF8730-DC81-4062-84A2-1FF943F59FAC}")
INTERFACE IValidator $IID_IValidator
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Validate ( ' VTable offset = 12
 BYVAL veh AS IVEHandler
 , BYVAL pAppDomain AS IUnknown
 , BYVAL ulFlags AS DWORD
 , BYVAL ulMaxError AS DWORD
 , BYVAL token AS DWORD
 , BYREF fileName AS WSTRINGZ
 , BYREF pe AS BYTE
 , BYVAL ulSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FormatEventInfo ( ' VTable offset = 16
 BYVAL hVECode AS LONG
 , BYVAL Context AS VEContext
 , BYREF msg AS WSTRINGZ
 , BYVAL ulMaxLength AS DWORD
 , BYVAL psa AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IValidator_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ICLRValidator
' IID = {63DF8730-DC81-4062-84A2-1FF943F59FDD}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ICLRValidator_INTERFACE_DEFINED)
 %ICLRValidator_INTERFACE_DEFINED = 1
$IID_ICLRValidator = GUID$("{63DF8730-DC81-4062-84A2-1FF943F59FDD}")
INTERFACE ICLRValidator $IID_ICLRValidator
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Validate ( ' VTable offset = 12
 BYVAL veh AS IVEHandler
 , BYVAL ulAppDomainId AS DWORD
 , BYVAL ulFlags AS DWORD
 , BYVAL ulMaxError AS DWORD
 , BYVAL token AS DWORD
 , BYREF fileName AS WSTRINGZ
 , BYREF pe AS BYTE
 , BYVAL ulSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FormatEventInfo ( ' VTable offset = 16
 BYVAL hVECode AS LONG
 , BYVAL Context AS VEContext
 , BYREF msg AS WSTRINGZ
 , BYVAL ulMaxLength AS DWORD
 , BYVAL psa AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ICLRValidator_INTERFACE_DEFINED__ */
#ENDIF
