勇芳软件工作室.汉化:  Windows Management Instrumentation > COM API for WMI > Interfaces > IWbemDecoupledBasicEventProvider >

GetSink Method

Previous pageReturn to chapter overviewNext page

描述

 

IWbemDecoupledBasicEventProvider.GetSink方法检索用于事件转发到WMI的IWbemObjectSink对象。此方法提供完全并发访问。

 

C++ 语法

 

HRESULT GetSink(

[in]   LONG lFlags,

[in]   IWbemContext *pContext,

[out]  IWbemObjectSink *ppSink

);

 

PowerBASIC 语法

 

METHOD GetSink ( _

BYVAL lFlags AS LONG, _

BYVAL pContext AS IWbemContext, _

BYREF ppSink AS IWbemObjectSink _

) AS LONG

 

参数

 

lFlags

 

留作将来使用。

 

pContext

 

留作将来使用。

 

ppSink

 

指向用于将事件转发到WMI的IWbemObjectSink实例。

 

返回值

 

此方法返回一个HRESULT,指示方法调用的状态。下表列出了HRESULT中包含的值。

 

退货代码

描述

WBEM_E_ACCESS_DENIED

对对象的访问被拒绝。

WBEM_E_CRITICAL_ERROR

发生内部错误。

WBEM_E_NOT_FOUND

指定的命名上下文值不存在。

WBEM_E_NOT_REGISTERED

该对象未注册。

WBEM_E_OUT_OF_MEMORY

系统内存不足。

WBEM_E_TIMED_OUT

系统超时

WBEM_S_NO_ERROR

通话成功。

 

备注

 

Windows 2000和Windows NT:需要WMI SDK Update或Microsoft .NET Framework SDK。

 

Windows NT:需要Microsoft .NET Framework SDK。

 

要求

 

客户

需要Windows Vista或Windows XP。

服务器

需要Windows Server 2008或Windows Server 2003。

可再发行

需要Windows 2000和Windows NT上的WMI可重新分发组件版本1.0。在Windows NT上,它也需要Microsoft .NET Framework。

在Wbemprov.inc中声明。

DLL

需要Wmidcprv.dll。