执行为通过 IServiceProvider的实现中显示的服务的一个工厂。
命名空间: Microsoft.VisualStudio.Data.Framework
程序集: Microsoft.VisualStudio.Data.Framework(在 Microsoft.VisualStudio.Data.Framework.dll 中)
语法
声明
Private Function QueryService ( _
ByRef guidService As Guid, _
ByRef riid As Guid, _
<OutAttribute> ByRef ppvObject As IntPtr _
) As Integer Implements IServiceProvider.QueryService
int IServiceProvider.QueryService(
ref Guid guidService,
ref Guid riid,
out IntPtr ppvObject
)
private:
virtual int QueryService(
Guid% guidService,
Guid% riid,
[OutAttribute] IntPtr% ppvObject
) sealed = IServiceProvider::QueryService
private abstract QueryService :
guidService:Guid byref *
riid:Guid byref *
ppvObject:IntPtr byref -> int
private override QueryService :
guidService:Guid byref *
riid:Guid byref *
ppvObject:IntPtr byref -> int
JScript 不支持显式接口实现。
参数
- guidService
类型:System.Guid%
请求的服务的唯一标识符。
- riid
类型:System.Guid%
调用方希望为服务接收接口的唯一标识符。
- ppvObject
类型:System.IntPtr%
riid 参数指定的接口的地址。
返回值
类型:System.Int32
指定接口的地址的整数为请求的服务。
实现
IServiceProvider.QueryService(Guid%, Guid%, IntPtr%)
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。