' ########################################################################################
' Microsoft Windows
' File: FunctionDiscoveryProvider.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_functiondiscoveryprovider_PBI)
#DEFINE PBX_functiondiscoveryprovider_PBI
%EQUATE `FUNCTIONDISCOVERYPROVIDER_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
#INCLUDE ONCE "Legacy/COM/OCIdl.inc"
#INCLUDE ONCE "Legacy/System/propsys.inc"
#INCLUDE ONCE "Legacy/System/functiondiscoveryapi.inc"
' ########################################################################################
' Interface name = IFunctionDiscoveryProvider
' IID = DCDE394F-1478-4813-A402-F6FB10657222
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IFunctionDiscoveryProvider_INTERFACE_DEFINED)
 %IFunctionDiscoveryProvider_INTERFACE_DEFINED = 1
$IID_IFunctionDiscoveryProvider = GUID$("{DCDE394F-1478-4813-A402-F6FB10657222}")
INTERFACE IFunctionDiscoveryProvider $IID_IFunctionDiscoveryProvider
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Initialize ( ' VTable offset = 12
 BYVAL pIFunctionDiscoveryProviderFactory AS IFunctionDiscoveryProviderFactory
 , BYVAL pIFunctionDiscoveryNotification AS IFunctionDiscoveryNotification
 , BYVAL lcidUserDefault AS DWORD
 , BYREF pdwStgAccessCapabilities AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Query ( ' VTable offset = 16
 BYVAL pIFunctionDiscoveryProviderQuery AS IFunctionDiscoveryProviderQuery
 , BYREF ppIFunctionInstanceCollection AS IFunctionInstanceCollection
 ) AS LONG
 ' =====================================================================================
 METHOD EndQuery ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD InstancePropertyStoreValidateAccess ( ' VTable offset = 24
 BYVAL pIFunctionInstance AS IFunctionInstance
 , BYVAL iProviderInstanceContext AS DWORD
 , BYVAL dwStgAccess AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD InstancePropertyStoreOpen ( ' VTable offset = 28
 BYVAL pIFunctionInstance AS IFunctionInstance
 , BYVAL iProviderInstanceContext AS DWORD
 , BYVAL dwStgAccess AS DWORD
 , BYREF ppIPropertyStore AS IPropertyStore
 ) AS LONG
 ' =====================================================================================
 METHOD InstancePropertyStoreFlush ( ' VTable offset = 32
 BYVAL pIFunctionInstance AS IFunctionInstance
 , BYVAL iProviderInstanceContext AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD InstanceQueryService ( ' VTable offset = 36
 BYVAL pIFunctionInstance AS IFunctionInstance
 , BYVAL iProviderInstanceContext AS DWORD
 , BYREF guidService AS GUID
 , BYREF riid AS GUID
 , BYREF ppIUnknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD InstanceReleased ( ' VTable offset = 40
 BYVAL pIFunctionInstance AS IFunctionInstance
 , BYVAL iProviderInstanceContext AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IFunctionDiscoveryProvider_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IProviderProperties
' IID = CF986EA6-3B5F-4C5F-B88A-2F8B20CEEF17
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IProviderProperties_INTERFACE_DEFINED)
 %IProviderProperties_INTERFACE_DEFINED = 1
$IID_IProviderProperties = GUID$("{CF986EA6-3B5F-4C5F-B88A-2F8B20CEEF17}")
INTERFACE IProviderProperties $IID_IProviderProperties
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 12
 BYVAL pIFunctionInstance AS IFunctionInstance
 , BYVAL iProviderInstanceContext AS DWORD
 , BYREF pdwCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAt ( ' VTable offset = 16
 BYVAL pIFunctionInstance AS IFunctionInstance
 , BYVAL iProviderInstanceContext AS DWORD
 , BYVAL dwIndex AS DWORD
 , BYREF pKey AS PROPERTYKEY
 ) AS LONG
 ' =====================================================================================
 METHOD GetValue ( ' VTable offset = 20
 BYVAL pIFunctionInstance AS IFunctionInstance
 , BYVAL iProviderInstanceContext AS DWORD
 , BYREF Key AS PROPERTYKEY
 , BYREF ppropVar AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetValue ( ' VTable offset = 24
 BYVAL pIFunctionInstance AS IFunctionInstance
 , BYVAL iProviderInstanceContext AS DWORD
 , BYREF Key AS PROPERTYKEY
 , BYREF ppropVar AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IProviderProperties_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IProviderPublishing
' IID = CD1B9A04-206C-4A05-A0C8-1635A21A2B7C
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IProviderPublishing_INTERFACE_DEFINED)
 %IProviderPublishing_INTERFACE_DEFINED = 1
$IID_IProviderPublishing = GUID$("{CD1B9A04-206C-4A05-A0C8-1635A21A2B7C}")
INTERFACE IProviderPublishing $IID_IProviderPublishing
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CreateInstance ( ' VTable offset = 12
 BYVAL enumVisibilityFlags AS LONG
 , BYREF pszSubCategory AS WSTRINGZ
 , BYREF pszProviderInstanceIdentity AS WSTRINGZ
 , BYREF ppIFunctionInstance AS IFunctionInstance
 ) AS LONG
 ' =====================================================================================
 METHOD RemoveInstance ( ' VTable offset = 16
 BYVAL enumVisibilityFlags AS LONG
 , BYREF pszSubCategory AS WSTRINGZ
 , BYREF pszProviderInstanceIdentity AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IProviderPublishing_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IFunctionDiscoveryProviderFactory
' IID = 86443FF0-1AD5-4E68-A45A-40C2C329DE3B
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IFunctionDiscoveryProviderFactory_INTERFACE_DEFINED)
 %IFunctionDiscoveryProviderFactory_INTERFACE_DEFINED = 1
$IID_IFunctionDiscoveryProviderFactory = GUID$("{86443FF0-1AD5-4E68-A45A-40C2C329DE3B}")
INTERFACE IFunctionDiscoveryProviderFactory $IID_IFunctionDiscoveryProviderFactory
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CreatePropertyStore ( ' VTable offset = 12
 BYREF ppIPropertyStore AS IPropertyStore
 ) AS LONG
 ' =====================================================================================
 METHOD CreateInstance ( ' VTable offset = 16
 BYREF pszSubCategory AS WSTRINGZ
 , BYREF pszProviderInstanceIdentity AS WSTRINGZ
 , BYVAL iProviderInstanceContext AS DWORD
 , BYVAL pIPropertyStore AS IPropertyStore
 , BYVAL pIFunctionDiscoveryProvider AS IFunctionDiscoveryProvider
 , BYREF ppIFunctionInstance AS IFunctionInstance
 ) AS LONG
 ' =====================================================================================
 METHOD CreateFunctionInstanceCollection ( ' VTable offset = 20
 BYREF ppIFunctionInstanceCollection AS IFunctionInstanceCollection
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IFunctionDiscoveryProviderFactory_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IFunctionDiscoveryProviderQuery
' IID = 6876EA98-BAEC-46DB-BC20-75A76E267A3A
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IFunctionDiscoveryProviderQuery_INTERFACE_DEFINED)
 %IFunctionDiscoveryProviderQuery_INTERFACE_DEFINED = 1
$IID_IFunctionDiscoveryProviderQuery = GUID$("{6876EA98-BAEC-46DB-BC20-75A76E267A3A}")
INTERFACE IFunctionDiscoveryProviderQuery $IID_IFunctionDiscoveryProviderQuery
 INHERIT IUnknown
 ' =====================================================================================
 METHOD IsInstanceQuery ( ' VTable offset = 12
 BYREF pisInstanceQuery AS LONG
 , BYREF ppszConstraintValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD IsSubcategoryQuery ( ' VTable offset = 16
 BYREF pisSubcategoryQuery AS LONG
 , BYREF ppszConstraintValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetQueryConstraints ( ' VTable offset = 20
 BYREF ppIProviderQueryConstraints AS IProviderQueryConstraintCollection
 ) AS LONG
 ' =====================================================================================
 METHOD GetPropertyConstraints ( ' VTable offset = 24
 BYREF ppIProviderPropertyConstraints AS IProviderPropertyConstraintCollection
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IFunctionDiscoveryProviderQuery_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IProviderQueryConstraintCollection
' IID = 9C243E11-3261-4BCD-B922-84A873D460AE
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IProviderQueryConstraintCollection_INTERFACE_DEFINED)
 %IProviderQueryConstraintCollection_INTERFACE_DEFINED = 1
$IID_IProviderQueryConstraintCollection = GUID$("{9C243E11-3261-4BCD-B922-84A873D460AE}")
INTERFACE IProviderQueryConstraintCollection $IID_IProviderQueryConstraintCollection
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 12
 BYREF pdwCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Get ( ' VTable offset = 16
 BYREF pszConstraintName AS WSTRINGZ
 , BYREF ppszConstraintValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD Item ( ' VTable offset = 20
 BYVAL dwIndex AS DWORD
 , BYREF ppszConstraintName AS WSTRINGZ
 , BYREF ppszConstraintValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 24
 BYREF ppszConstraintName AS WSTRINGZ
 , BYREF ppszConstraintValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IProviderQueryConstraintCollection_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IProviderPropertyConstraintCollection
' IID = F4FAE42F-5778-4A13-8540-B5FD8C1398DD
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IProviderPropertyConstraintCollection_INTERFACE_DEFINED)
 %IProviderPropertyConstraintCollection_INTERFACE_DEFINED = 1
$IID_IProviderPropertyConstraintCollection = GUID$("{F4FAE42F-5778-4A13-8540-B5FD8C1398DD}")
INTERFACE IProviderPropertyConstraintCollection $IID_IProviderPropertyConstraintCollection
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 12
 BYREF pdwCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Get ( ' VTable offset = 16
 BYREF Key AS PROPERTYKEY
 , BYREF pPropVar AS PROPVARIANT
 , BYREF pdwPropertyConstraint AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Item ( ' VTable offset = 20
 BYVAL dwIndex AS DWORD
 , BYREF pKey AS PROPERTYKEY
 , BYREF pPropVar AS PROPVARIANT
 , BYREF pdwPropertyConstraint AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 24
 BYREF pKey AS PROPERTYKEY
 , BYREF pPropVar AS PROPVARIANT
 , BYREF pdwPropertyConstraint AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IProviderPropertyConstraintCollection_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IFunctionDiscoveryServiceProvider
' IID = 4C81ED02-1B04-43F2-A451-69966CBCD1C2
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IFunctionDiscoveryServiceProvider_INTERFACE_DEFINED)
 %IFunctionDiscoveryServiceProvider_INTERFACE_DEFINED = 1
$IID_IFunctionDiscoveryServiceProvider = GUID$("{4C81ED02-1B04-43F2-A451-69966CBCD1C2}")
INTERFACE IFunctionDiscoveryServiceProvider $IID_IFunctionDiscoveryServiceProvider
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Initialize ( ' VTable offset = 12
 BYVAL pIFunctionInstance AS IFunctionInstance
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IFunctionDiscoveryServiceProvider_INTERFACE_DEFINED__ */
#ENDIF
