' ########################################################################################
' Microsoft Windows
' File: WbemProv.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.
' ########################################################################################
' ########################################################################################
' Library name: WbemProviders_v1
' Version: 0.0, Locale ID = 0
' Library GUID: {092DF710-7010-11D1-AD90-00C04FD8FDFF}
' ########################################################################################
#IF NOT %DEF(PBX_WbemProv_PBI)
#DEFINE PBX_WbemProv_PBI
%EQUATE `WBEMPROV_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/ObjIdl.inc"
#INCLUDE ONCE "Legacy/COM/OleIdl.inc"
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
#INCLUDE ONCE "Legacy/System/WbemCli.inc"
'typedef VARIANT WBEM_VARIANT;
'typedef /* [string] */ WCHAR *WBEM_WSTR;
'typedef /* [string] */ const WCHAR *WBEM_CWSTR;
' WBEM_PROVIDER_REQUIREMENTS_TYPE enum
%EQUATE `WBEM_REQUIREMENTS_START_POSTFILTER = 0
%EQUATE `WBEM_REQUIREMENTS_STOP_POSTFILTER = 1
%EQUATE `WBEM_REQUIREMENTS_RECHECK_SUBSCRIPTIONS = 2
#IF NOT %DEF(%WbemProviders_v1_LIBRARY_DEFINED)
 %WbemProviders_v1_LIBRARY_DEFINED = 1
$CLSID_WbemAdministrativeLocator = GUID$("{CB8555CC-9128-11D1-AD9B-00C04FD8FDFF}")
$CLSID_WbemAuthenticatedLocator = GUID$("{CD184336-9128-11D1-AD9B-00C04FD8FDFF}")
$CLSID_WbemUnauthenticatedLocator = GUID$("{443E7B79-DE31-11D2-B340-00104BCC4B4A}")
$CLSID_WbemDecoupledRegistrar = GUID$("{4CFC7932-0F9D-4BEF-9C32-8EA2A6B56FCB}")
$CLSID_WbemDecoupledBasicEventProvider = GUID$("{F5F75737-2843-4F22-933D-C76A97CDA62F}")
$IID_IWbemPropertyProvider = GUID$("{CE61E841-65BC-11D0-B6BD-00AA003240C7}")
$IID_IWbemUnboundObjectSink = GUID$("{E246107B-B06E-11D0-AD61-00C04FD8FDFF}")
$IID_IWbemEventProvider = GUID$("{E245105B-B06E-11D0-AD61-00C04FD8FDFF}")
$IID_IWbemEventProviderQuerySink = GUID$("{580ACAF8-FA1C-11D0-AD72-00C04FD8FDFF}")
$IID_IWbemEventProviderSecurity = GUID$("{631F7D96-D993-11D2-B339-00105A1F4AAF}")
$IID_IWbemEventConsumerProvider = GUID$("{E246107A-B06E-11D0-AD61-00C04FD8FDFF}")
$IID_IWbemProviderInitSink = GUID$("{1BE41571-91DD-11D1-AEB2-00C04FB68820}")
$IID_IWbemProviderInit = GUID$("{1BE41572-91DD-11D1-AEB2-00C04FB68820}")
$IID_IWbemHiPerfProvider = GUID$("{49353C93-516B-11D1-AEA6-00C04FB68820}")
$IID_IWbemDecoupledRegistrar = GUID$("{1005CBCF-E64F-4646-BCD3-3A089D8A84B4}")
$IID_IWbemProviderIdentity = GUID$("{631F7D97-D993-11D2-B339-00105A1F4AAF}")
$IID_IWbemDecoupledBasicEventProvider = GUID$("{86336D20-CA11-4786-9EF1-BC8A946B42FC}")
$IID_IWbemEventSink = GUID$("{3AE0080A-7E3A-4366-BF89-0FEEDC931659}")
' ========================================================================================
' Interface name = IWbemPropertyProvider
' IID = {CE61E841-65BC-11D0-B6BD-00AA003240C7}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ========================================================================================
#IF NOT %DEF(%IWbemPropertyProvider_INTERFACE_DEFINED)
 %IWbemPropertyProvider_INTERFACE_DEFINED = 1
INTERFACE IWbemPropertyProvider $IID_IWbemPropertyProvider
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetProperty ( ' VTable offset = 12
 BYVAL lFlags AS LONG
 , BYVAL strLocale AS WSTRING
 , BYVAL strClassMapping AS WSTRING
 , BYVAL strInstMapping AS WSTRING
 , BYVAL strPropMapping AS WSTRING
 , BYREF pvValue AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD PutProperty ( ' VTable offset = 16
 BYVAL lFlags AS LONG
 , BYVAL strLocale AS WSTRING
 , BYVAL strClassMapping AS WSTRING
 , BYVAL strInstMapping AS WSTRING
 , BYVAL strPropMapping AS WSTRING
 , BYREF pvValue AS VARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWbemPropertyProvider_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWbemUnboundObjectSink
' IID = {E246107B-B06E-11D0-AD61-00C04FD8FDFF}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWbemUnboundObjectSink_INTERFACE_DEFINED)
 %IWbemUnboundObjectSink_INTERFACE_DEFINED = 1
INTERFACE IWbemUnboundObjectSink $IID_IWbemUnboundObjectSink
 INHERIT IUnknown
 ' =====================================================================================
 METHOD IndicateToConsumer ( ' VTable offset = 12
 BYVAL pLogicalConsumer AS IWbemClassObject
 , BYVAL lNumObjects AS LONG
 , BYREF apObjects AS IWbemClassObject
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWbemUnboundObjectSink_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWbemEventProvider
' IID = {E245105B-B06E-11D0-AD61-00C04FD8FDFF}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWbemEventProvider_INTERFACE_DEFINED)
 %IWbemEventProvider_INTERFACE_DEFINED = 1
INTERFACE IWbemEventProvider $IID_IWbemEventProvider
 INHERIT IUnknown
 ' =====================================================================================
 METHOD ProvideEvents ( ' VTable offset = 12
 BYVAL pSink AS IWbemObjectSink
 , BYVAL lFlags AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWbemEventProvider_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWbemEventProviderQuerySink
' IID = {580ACAF8-FA1C-11D0-AD72-00C04FD8FDFF}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWbemEventProviderQuerySink_INTERFACE_DEFINED)
 %IWbemEventProviderQuerySink_INTERFACE_DEFINED = 1
INTERFACE IWbemEventProviderQuerySink $IID_IWbemEventProviderQuerySink
 INHERIT IUnknown
 ' =====================================================================================
 METHOD NewQuery ( ' VTable offset = 12
 BYVAL dwId AS DWORD
 , BYREF wszQueryLanguage AS WSTRINGZ
 , BYREF wszQuery AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD CancelQuery ( ' VTable offset = 16
 BYVAL dwId AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWbemEventProviderQuerySink_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWbemEventProviderSecurity
' IID = {631F7D96-D993-11D2-B339-00105A1F4AAF}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWbemEventProviderSecurity_INTERFACE_DEFINED)
 %IWbemEventProviderSecurity_INTERFACE_DEFINED = 1
INTERFACE IWbemEventProviderSecurity $IID_IWbemEventProviderSecurity
 INHERIT IUnknown
 ' =====================================================================================
 METHOD AccessCheck ( ' VTable offset = 12
 BYREF wszQueryLanguage AS WSTRINGZ
 , BYREF wszQuery AS WSTRINGZ
 , BYVAL lSidLength AS LONG
 , BYVAL pSid AS BYTE PTR
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWbemEventProviderSecurity_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWbemEventConsumerProvider
' IID = {E246107A-B06E-11D0-AD61-00C04FD8FDFF}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWbemEventConsumerProvider_INTERFACE_DEFINED)
 %IWbemEventConsumerProvider_INTERFACE_DEFINED = 1
INTERFACE IWbemEventConsumerProvider $IID_IWbemEventConsumerProvider
 INHERIT IUnknown
 ' =====================================================================================
 METHOD FindConsumer ( ' VTable offset = 12
 BYVAL pLogicalConsumer AS IWbemClassObject
 , BYREF ppConsumer AS IWbemUnboundObjectSink
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWbemEventConsumerProvider_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWbemProviderInitSink
' IID = {1BE41571-91DD-11D1-AEB2-00C04FB68820}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWbemProviderInitSink_INTERFACE_DEFINED)
 %IWbemProviderInitSink_INTERFACE_DEFINED = 1
INTERFACE IWbemProviderInitSink $IID_IWbemProviderInitSink
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetStatus ( ' VTable offset = 12
 BYVAL lStatus AS LONG
 , BYVAL lFlags AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWbemProviderInitSink_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWbemProviderInit
' IID = {1BE41572-91DD-11D1-AEB2-00C04FB68820}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWbemProviderInit_INTERFACE_DEFINED)
 %IWbemProviderInit_INTERFACE_DEFINED = 1
INTERFACE IWbemProviderInit $IID_IWbemProviderInit
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Initialize ( ' VTable offset = 12
 BYREF wszUser AS WSTRINGZ
 , BYVAL lFlags AS LONG
 , BYREF wszNamespace AS WSTRINGZ
 , BYREF wszLocale AS WSTRINGZ
 , BYVAL pNamespace AS IWbemServices
 , BYVAL pCtx AS IWbemContext
 , BYVAL pInitSink AS IWbemProviderInitSink
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWbemProviderInit_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWbemHiPerfProvider
' IID = {49353C93-516B-11D1-AEA6-00C04FB68820}
' Attributes = 512 [&H200] [Restricted]
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWbemHiPerfProvider_INTERFACE_DEFINED)
 %IWbemHiPerfProvider_INTERFACE_DEFINED = 1
INTERFACE IWbemHiPerfProvider $IID_IWbemHiPerfProvider
 INHERIT IUnknown
 ' =====================================================================================
 METHOD QueryInstances ( ' VTable offset = 12
 BYVAL pNamespace AS IWbemServices
 , BYVAL wszClass AS DWORD
 , BYVAL lFlags AS LONG
 , BYVAL pCtx AS IWbemContext
 , BYVAL pSink AS IWbemObjectSink
 ) AS LONG
 ' =====================================================================================
 METHOD CreateRefresher ( ' VTable offset = 16
 BYVAL pNamespace AS IWbemServices
 , BYVAL lFlags AS LONG
 , BYREF ppRefresher AS IWbemRefresher
 ) AS LONG
 ' =====================================================================================
 METHOD CreateRefreshableObject ( ' VTable offset = 20
 BYVAL pNamespace AS IWbemServices
 , BYVAL pTemplate AS IWbemObjectAccess
 , BYVAL pRefresher AS IWbemRefresher
 , BYVAL lFlags AS LONG
 , BYVAL pContext AS IWbemContext
 , BYREF ppRefreshable AS IWbemObjectAccess
 , BYREF plId AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD StopRefreshing ( ' VTable offset = 24
 BYVAL pRefresher AS IWbemRefresher
 , BYVAL lId AS LONG
 , BYVAL lFlags AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CreateRefreshableEnum ( ' VTable offset = 28
 BYVAL pNamespace AS IWbemServices
 , BYREF wszClass AS WSTRINGZ
 , BYVAL pRefresher AS IWbemRefresher
 , BYVAL lFlags AS LONG
 , BYVAL pContext AS IWbemContext
 , BYVAL pHiPerfEnum AS IWbemHiPerfEnum
 , BYREF plId AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetObjects ( ' VTable offset = 32
 BYVAL pNamespace AS IWbemServices
 , BYVAL lNumObjects AS LONG
 , BYREF apObj AS IWbemObjectAccess
 , BYVAL lFlags AS LONG
 , BYVAL pContext AS IWbemContext
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWbemHiPerfProvider_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWbemDecoupledRegistrar
' IID = {1005CBCF-E64F-4646-BCD3-3A089D8A84B4}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWbemDecoupledRegistrar_INTERFACE_DEFINED)
 %IWbemDecoupledRegistrar_INTERFACE_DEFINED = 1
INTERFACE IWbemDecoupledRegistrar $IID_IWbemDecoupledRegistrar
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Register ( ' VTable offset = 12
 BYVAL a_Flags AS LONG
 , BYVAL a_Context AS IWbemContext
 , BYREF a_User AS WSTRINGZ
 , BYREF a_Locale AS WSTRINGZ
 , BYREF a_Scope AS WSTRINGZ
 , BYREF a_Registration AS WSTRINGZ
 , BYVAL a_Unknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD UnRegister ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWbemDecoupledRegistrar_INTERFACE_DEFINED__ */
#ENDIF ' /* __WbemProviders_v1_LIBRARY_DEFINED__ */
' ========================================================================================
' Interface name = IWbemProviderIdentity
' IID = 631F7D97-D993-11D2-B339-00105A1F4AAF
' Inherited interface = IUnknown
' ========================================================================================
#IF NOT %DEF(%IWbemProviderIdentity_INTERFACE_DEFINED)
 %IWbemProviderIdentity_INTERFACE_DEFINED = 1
INTERFACE IWbemProviderIdentity $IID_IWbemProviderIdentity
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetRegistrationObject ( ' VTable offset = 12
 BYVAL lFlags AS LONG
 , BYVAL pProvReg AS IWbemClassObject
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWbemProviderIdentity_INTERFACE_DEFINED__ */
' WBEM_EXTRA_RETURN_CODES enum
%EQUATE `WBEM_S_INITIALIZED = 0
%EQUATE `WBEM_S_LIMITED_SERVICE = &H43001
%EQUATE `WBEM_S_INDIRECTLY_UPDATED = %WBEM_S_LIMITED_SERVICE + 1
%EQUATE `WBEM_S_SUBJECT_TO_SDS = %WBEM_S_INDIRECTLY_UPDATED + 1
%EQUATE `WBEM_E_RETRY_LATER = &H80043001
%EQUATE `WBEM_E_RESOURCE_CONTENTION = %WBEM_E_RETRY_LATER + 1
' WBEM_PROVIDER_FLAGS enum
%EQUATE `WBEM_FLAG_OWNER_UPDATE = &H10000
' ########################################################################################
' Interface name = IWbemDecoupledBasicEventProvider
' IID = {86336D20-CA11-4786-9EF1-BC8A946B42FC}
' Inherited interface = IWbemDecoupledRegistrar
' ########################################################################################
#IF NOT %DEF(%IWbemDecoupledBasicEventProvider_INTERFACE_DEFINED)
 %IWbemDecoupledBasicEventProvider_INTERFACE_DEFINED = 1
INTERFACE IWbemDecoupledBasicEventProvider $IID_IWbemDecoupledBasicEventProvider
 INHERIT IUnknown
 ' =====================================================================================
 ' IWbemDecoupledRegistrar methods
 ' =====================================================================================
 METHOD Register ( ' VTable offset = 12
 BYVAL a_Flags AS LONG
 , BYVAL a_Context AS IWbemContext
 , BYREF a_User AS WSTRINGZ
 , BYREF a_Locale AS WSTRINGZ
 , BYREF a_Scope AS WSTRINGZ
 , BYREF a_Registration AS WSTRINGZ
 , BYVAL a_Unknown AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD UnRegister ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IWbemDecoupledBasicEventProvider methods
 ' =====================================================================================
 METHOD GetSink ( ' VTable offset = 20
 BYVAL a_Flags AS LONG
 , BYVAL a_Context AS IWbemContext
 , BYREF a_Sink AS IWbemObjectSink
 ) AS LONG
 ' =====================================================================================
 METHOD GetService ( ' VTable offset = 24
 BYVAL a_Flags AS LONG
 , BYVAL a_Context AS IWbemContext
 , BYREF a_Service AS IWbemServices
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWbemDecoupledBasicEventProvider_INTERFACE_DEFINED__ */
' WBEM_BATCH_TYPE enum
%EQUATE `WBEM_FLAG_BATCH_IF_NEEDED = 0
%EQUATE `WBEM_FLAG_MUST_BATCH = &H1
%EQUATE `WBEM_FLAG_MUST_NOT_BATCH = &H2
' ========================================================================================
' Interface name = IWbemEventSink
' IID = 3AE0080A-7E3A-4366-BF89-0FEEDC931659
' Inherited interface = IWbemObjectSink
' ========================================================================================
#IF NOT %DEF(%IWbemEventSink_INTERFACE_DEFINED)
 %IWbemEventSink_INTERFACE_DEFINED = 1
INTERFACE IWbemEventSink $IID_IWbemEventSink
 INHERIT IUnknown
 ' =====================================================================================
 ' IWbemObjectSink methods
 ' =====================================================================================
 METHOD Indicate ( ' VTable offset = 12
 BYVAL lObjectCount AS LONG
 , BYREF apObjArray AS IWbemClassObject
 ) AS LONG
 ' =====================================================================================
 METHOD SetStatus ( ' VTable offset = 16
 BYVAL lFlags AS LONG
 , BYVAL hResult AS LONG
 , BYVAL strParam AS WSTRING
 , BYVAL pObjParam AS IWbemClassObject
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IWbemEventSink methods
 ' =====================================================================================
 METHOD SetSinkSecurity ( ' VTable offset = 20
 BYVAL lSDLength AS LONG
 , BYVAL pSD AS BYTE PTR
 ) AS LONG
 ' =====================================================================================
 METHOD IsActive ( ' VTable offset = 24
 ) AS LONG
 ' =====================================================================================
 METHOD GetRestrictedSink ( ' VTable offset = 28
 BYVAL lNumQueries AS LONG
 , BYREF awszQueries AS WSTRINGZ
 , BYVAL pCallback AS IUnknown
 , BYREF ppSink AS IWbemEventSink
 ) AS LONG
 ' =====================================================================================
 METHOD SetBatchingParameters ( ' VTable offset = 32
 BYVAL lFlags AS LONG
 , BYVAL dwMaxBufferSize AS DWORD
 , BYVAL dwMaxSendLatency AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWbemEventSink_INTERFACE_DEFINED__ */
#ENDIF
