ServiceProvider.IServiceProvider.QueryService Method

Performs as a factory for services that are exposed through an implementation of IServiceProvider.

Namespace:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

Syntax

'宣言
Private Function QueryService ( _
    ByRef guidService As Guid, _
    ByRef riid As Guid, _
    <OutAttribute> ByRef ppvObject As IntPtr _
) As Integer Implements IServiceProvider.QueryService
'使用
Dim instance As ServiceProvider
Dim guidService As Guid
Dim riid As Guid
Dim ppvObject As IntPtr
Dim returnValue As Integer

returnValue = CType(instance, IServiceProvider).QueryService(guidService, _
    riid, ppvObject)
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
JScript does not support explicit interface implementations.

Parameters

  • guidService
    Type: System.Guid%

    A unique identifier of the requested service.

  • riid
    Type: System.Guid%

    A unique identifier of the interface that the caller wants to receive for the service.

  • ppvObject
    Type: System.IntPtr%

    The address of the interface specified by the riid parameter.

Return Value

Type: System.Int32

An integer specifying the address of the interface for the requested service.

Implements

IServiceProvider.QueryService(Guid%, Guid%, IntPtr%)

Permissions

See Also

Reference

ServiceProvider Class

ServiceProvider Members

Microsoft.VisualStudio.Data.Framework Namespace