mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
234 lines
8.3 KiB
234 lines
8.3 KiB
/*++
|
|
|
|
Copyright (C) 1997-2001 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
Abstract:
|
|
|
|
History:
|
|
|
|
--*/
|
|
|
|
|
|
//***************************************************************************
|
|
//
|
|
// STDPROV.H
|
|
//
|
|
// Test instance provider
|
|
//
|
|
// raymcc 02-Dec-97
|
|
//
|
|
//***************************************************************************
|
|
|
|
#ifndef _STDPROV_H_
|
|
#define _STDPROV_H_
|
|
|
|
class CStdProvider : public IWbemServices, public IWbemProviderInit
|
|
{
|
|
LONG m_lRef;
|
|
IWbemClassObject *m_pClassDef;
|
|
|
|
public:
|
|
CStdProvider();
|
|
~CStdProvider();
|
|
|
|
// Interface members.
|
|
// ==================
|
|
|
|
ULONG STDMETHODCALLTYPE AddRef();
|
|
ULONG STDMETHODCALLTYPE Release();
|
|
STDMETHODIMP QueryInterface(REFIID riid, void** ppv);
|
|
|
|
|
|
// IWbemProviderInit method.
|
|
// =========================
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE Initialize(
|
|
/* [unique][in] */ LPWSTR wszUser,
|
|
/* [in] */ LONG lFlags,
|
|
/* [in] */ LPWSTR wszNamespace,
|
|
/* [unique][in] */ LPWSTR wszLocale,
|
|
/* [in] */ IWbemServices __RPC_FAR *pNamespace,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [in] */ IWbemProviderInitSink __RPC_FAR *pInitSink
|
|
);
|
|
|
|
|
|
|
|
// IWbemServices methods.
|
|
// ======================
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE OpenNamespace(
|
|
/* [in] */ BSTR strNamespace,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [unique][in][out] */ IWbemServices __RPC_FAR *__RPC_FAR *ppWorkingNamespace,
|
|
/* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppResult
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE CancelAsyncCall(
|
|
/* [in] */ IWbemObjectSink __RPC_FAR *pSink
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE QueryObjectSink(
|
|
/* [in] */ long lFlags,
|
|
/* [out] */ IWbemObjectSink __RPC_FAR *__RPC_FAR *ppResponseHandler
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE GetObject(
|
|
/* [in] */ BSTR strObjectPath,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [unique][in][out] */ IWbemClassObject __RPC_FAR *__RPC_FAR *ppObject,
|
|
/* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE GetObjectAsync(
|
|
/* [in] */ BSTR strObjectPath,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE PutClass(
|
|
/* [in] */ IWbemClassObject __RPC_FAR *pObject,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE PutClassAsync(
|
|
/* [in] */ IWbemClassObject __RPC_FAR *pObject,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE DeleteClass(
|
|
/* [in] */ BSTR strClass,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE DeleteClassAsync(
|
|
/* [in] */ BSTR strClass,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE CreateClassEnum(
|
|
/* [in] */ BSTR strSuperclass,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE CreateClassEnumAsync(
|
|
/* [in] */ BSTR strSuperclass,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE PutInstance(
|
|
/* [in] */ IWbemClassObject __RPC_FAR *pInst,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE PutInstanceAsync(
|
|
/* [in] */ IWbemClassObject __RPC_FAR *pInst,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE DeleteInstance(
|
|
/* [in] */ BSTR strObjectPath,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE DeleteInstanceAsync(
|
|
/* [in] */ BSTR strObjectPath,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE CreateInstanceEnum(
|
|
/* [in] */ BSTR strClass,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync(
|
|
/* [in] */ BSTR strClass,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE ExecQuery(
|
|
/* [in] */ BSTR strQueryLanguage,
|
|
/* [in] */ BSTR strQuery,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE ExecQueryAsync(
|
|
/* [in] */ BSTR strQueryLanguage,
|
|
/* [in] */ BSTR strQuery,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE ExecNotificationQuery(
|
|
/* [in] */ BSTR strQueryLanguage,
|
|
/* [in] */ BSTR strQuery,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync(
|
|
/* [in] */ BSTR strQueryLanguage,
|
|
/* [in] */ BSTR strQuery,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE ExecMethod(
|
|
/* [in] */ BSTR strObjectPath,
|
|
/* [in] */ BSTR strMethodName,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [in] */ IWbemClassObject __RPC_FAR *pInParams,
|
|
/* [unique][in][out] */ IWbemClassObject __RPC_FAR *__RPC_FAR *ppOutParams,
|
|
/* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult
|
|
);
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE ExecMethodAsync(
|
|
/* [in] */ BSTR strObjectPath,
|
|
/* [in] */ BSTR strMethodName,
|
|
/* [in] */ long lFlags,
|
|
/* [in] */ IWbemContext __RPC_FAR *pCtx,
|
|
/* [in] */ IWbemClassObject __RPC_FAR *pInParams,
|
|
/* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
|
|
);
|
|
|
|
};
|
|
|
|
void ObjectCreated();
|
|
void ObjectDestroyed();
|
|
|
|
#endif
|