' ########################################################################################
' Microsoft Windows
' File: evalcom2.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_evalcom2_PBI)
#DEFINE PBX_evalcom2_PBI
%EQUATE `EVALCOM2_INC = 1
#INCLUDE ONCE "Legacy/System/ObjBase.inc"
'// returned from IEvalResult::GetResultType
' enum RESULTTYPES
%EQUATE `ieUnknown = 0
%EQUATE `ieError = 1
%EQUATE `ieWarning = 2
%EQUATE `ieInfo = 3
'// values passed to status callback
' enum STATUSTYPES
%EQUATE `ieStatusGetCUB = 0
%EQUATE `ieStatusICECount = 1
%EQUATE `ieStatusMerge = 2
%EQUATE `ieStatusSummaryInfo = 3
%EQUATE `ieStatusCreateEngine = 4
%EQUATE `ieStatusStarting = 5
%EQUATE `ieStatusRunICE = 6
%EQUATE `ieStatusShutdown = 7
%EQUATE `ieStatusSuccess = 8
%EQUATE `ieStatusFail = 9
%EQUATE `ieStatusCancel = 10
'typedef BOOL (WINAPI* LPDISPLAYVAL)(LPVOID pContext, RESULTTYPES uiType, LPCWSTR szwVal, LPCWSTR szwDescription, LPCWSTR szwLocation);
'typedef BOOL (WINAPI* LPEVALCOMCALLBACK)(STATUSTYPES iStatus, LPCWSTR szData, LPVOID pContext);
'FUNCTION DISPLAYVAL ( ' BYVAL pContext AS DWORD ' LPVOID pContext
' , BYVAL uiType AS LONG ' RESULTTYPES uiType
' , BYREF szwVal AS WSTRINGZ ' LPCWSTR szwVal
' , BYREF szwDescription AS WSTRINGZ ' LPCWSTR szwDescription
' , BYREF szwLocation AS WSTRINGZ ' LPCWSTR szwLocation
' ) AS LONG
'FUNCTION EVALCOMCALLBACK ( ' BYVAL iStatus AS DWORD ' STATUSTYPES iStatus
' , BYREF szData AS WSTRINGZ ' LPCWSTR szData
' , BYVAL pContext AS DWORD ' LPVOID pContext
' ) AS LONG
$CLSID_EvalCom2 = GUID$("{6e5e1910-8053-4660-b795-6b612e29bc58}")
$IID_IValidate = GUID$("{e482e5c6-e31e-4143-a2e6-dbc3d8e4b8d3}")
' ########################################################################################
' IValidate interface
' IID = e482e5c6-e31e-4143-a2e6-dbc3d8e4b8d3
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IValidate_INTERFACE_DEFINED)
 %IValidate_INTERFACE_DEFINED = 1
INTERFACE IValidate $IID_IValidate
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OpenDatabase ( ' VTable offset = 12
 BYREF szDatabase AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD OpenCUB ( ' VTable offset = 16
 BYREF szCUBFile AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD CloseDatabase ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD CloseCUB ( ' VTable offset = 24
 ) AS LONG
 ' =====================================================================================
 METHOD SetDisplay ( ' VTable offset = 28
 BYVAL pDisplayFunction AS DWORD
 , BYVAL pContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetStatus ( ' VTable offset = 32
 BYVAL pStatusFunction AS DWORD
 , BYVAL pContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Validate ( ' VTable offset = 36
 OPTIONAL BYREF wzICEs AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IValidate_INTERFACE_DEFINED__ */
#ENDIF
