共用方式為


ServiceProvider.IServiceProvider.QueryService 方法

執行可藉由 IServiceProvider的實作公開服務的 Factory。

命名空間:  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
    類型:Guid%

    要求的服務的唯一識別項。

  • riid
    類型:Guid%

    呼叫端要用於服務接收介面的唯一識別項。

  • ppvObject
    類型:IntPtr%

    riid 參數指定之介面的位址。

傳回值

類型:Int32
指定之介面的位址整數為要求的服務。

實作

IServiceProvider.QueryService(Guid, Guid, IntPtr)

.NET Framework 安全性

請參閱

參考

ServiceProvider 類別

Microsoft.VisualStudio.Data.Framework 命名空間